Comments (6)
Ryan,
Thank you for suggesting so many good ideas!
I'll try and answer the questions in order:
- I've not carried out any real work on the Statistics class yet. The only available code is that from QSForex (which we should borrow from, if there's any useful aspects, if only to save time).
- You're right, it's far from the final solution. This was designed as a simple mechanism to get people started. The file aspect works great for backtests as we're generally only interested in the results right at the end, so having in memory results for backtests is not necessary. However, for live trading it would certainly be great to have an in-memory store of the calculations. We'll need to come up with on-line mechanisms for calculating each of the values, i.e. on-line Sharpe, on-line max drawdown etc. If they're stored in memory then it is relatively straightforward for some client interface to come and obtain them somehow.
- I do like the idea of a Statistics.update() method, but equally I agree that it may be a bit excessive to update them on every event, in an HFT situation. This really comes down to what sort of frequency users will be trading at. I was intending, in live trading, to have the system ping the broker for market data between 1-10 minutes, which is the rough "heartbeat" of the system, but of course this is for my personal usage, others may want much less or much more. If we start considering second and sub-second trading, then we'd be doing a lot of extra work.
- I agree, in that case we should update the PnL calculations upon new market data input. I'll make a separate issue for this.
- I have actually done quite a bit with logging in QSForex, but as yet have not included it in QSTrader. If you have any suggestions about what you would like to see in this regard, let me know.
If you're happy to have a first go at the Statistics module, then feel free to submit a pull request. I'll be adding in other requests this week and working on the software myself, although I'll steer clear of the Statistics class for now.
Thanks again for the suggestions.
Mike.
from qstrader.
ffn
(http://pmorissette.github.io/ffn/) is a great tool for generating statistics - I use it a lot in my backtesting platform. You could add this as an optional dependency.
from qstrader.
Anjum,
That looks like an extremely useful library. I'll try and make use of it, if possible.
Mike.
from qstrader.
Ryan,
I've now added your Statistics class to the master branch. It seems to work fine on my system.
Thanks,
Mike.
from qstrader.
https://github.com/QuriQuant/qq-pat . Looks interesting.
from qstrader.
Cool, happy to consider the issue closed as it's now semi-functional at least.
ffn
looks pretty cool actually.
@mhallsmoore would it be possible to set up a longer-term branch to work on the other features outlined for this class ? I don't think with Github it's possible for me to fork, branch and then push the branch back to the original repo -- I think that the branch needs to be done from the original.
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.