Comments (4)
Exploring sentiment analysis would be fun with a lot of the open-source NLP libraries now available.
Guess we'd implement a "NEWS" event that the backtester or live engine could also handle, which could be passed to a strategy in the same way.
Most providers I've seen pass "NEWS" tick events with a simple URL link?
That might lead to something which will have to be tackled eventually; how to run multiple strategies concurrently?
from qstrader.
Ryan,
Your last comment is an interesting point actually. In the fund I used to work at the model we used consisted of a top-level portfolio that allocated funds to a set of strategies, with proportionality of funds decided by an additional algorithm.
Some of the strategies would have counteractive orders (e.g. Strat #1 would long a security by a certain amount while Strat #2 would short it by a certain amount) and thus we needed to net out the difference to avoid unnecessary trades (and thus transaction costs).
It does however make it difficult to discuss individual strategy performance and thus it is sometimes best to talk about overall portfolio performance. All prop trading houses have this problem and they often have centralised risk management to make sure the firm itself is not too far long/short in a particular asset or direction.
from qstrader.
Great Mike, glad to hear what I was thinking is roughly in line with standard practice.
One thought I had was to allow a reference from a Position
to a Strategy
, or vice-versa. This should only be a few lines, which keeps complexity low, and could allow for things like the RiskManager
to see how much capital is allocated to each strategy just by looping through the Positions
in the Portfolio
.
Either way, I guess in the simplest implementation, a backtest or live-loop would be passed a list of Strategies, rather than just one, and pass the events along to each of those strategies. That kind of computation scales out nicely, so Python's multiprocessing would make that quite efficient.
from qstrader.
A simple DisplayStrategy
which will print ticks, bars is also necessary. See #41
from qstrader.
Related Issues (20)
- BUG: AttributeError: 'SMASignal' object has no attribute 'update' HOT 1
- Use with crypto
- QSTrader Documentation links are broken or moved
- no module named qstrader
- Dangling function
- Use of Assets!
- Documentation correction
- Pandas 1.3.x?
- How should a pair/pool trading strategy be implemented? HOT 2
- strategy_backtest.run() error, your assistance please HOT 1
- Please provide SPY CSV file please !! HOT 1
- Documentation HOT 1
- SimulatedBroker Issue HOT 1
- Lack of timestamp data from yahoo finance results in testing of qstrader with sixty_forty.py impossible
- Massive fail of the modules from qstrader HOT 2
- No module named 'qstrader.price_parser' ,for help HOT 2
- Scaled down order in simulated broker mentioned but not implemented?
- Compatibility with python 3.11 -error when plotting HOT 1
- timestamp date format in 60-40 portfolio HOT 3
- Click version requirement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qstrader.