Hello everyone,
I am proud to present some of my work in bringing Time Series Analysis into Lean! The TimeSeriesIndicator is a new indicator sub-class allowing for the statistical treatment of data in the framework described by Brockwell and Davis. As a particular implementation of this new class, the AutoRegressiveIntegratedMovingAverage is an indicator which allows you to fit AR, ARMA, and ARIMA models to your data. Most importantly, given that these indicators are fully integrated with the Lean engine, performance is demonstrably fast when compared to pure-Python implementations. Such and more is described in the attached QuantBook (the .ipynb file in the backtest after clicking `</>Code` ).
Moreover, the attached QuantBook should provide some useful snippets for anyone wishing to employ these methods in their own work!
Happy coding,
Aaron
Aaron Janeiro Stone
Some additional notes:
Spacetime
thank you!
Grant Forman
Thumbs up!
Sunil Mishra
Fantastic! Can't wait to give it a spin.
Arthur Asenheimer
This is good work, Aaron. Thanks for sharing.
Jonathan Rogers
Aaron this is great stuff. Do you have any recommendations on how to handle the "Runtime Error: Matrix must be positive definite. (Open Stacktrace)" when the resolution is switched from daily to minute on the algo that you shared?
Aaron Janeiro Stone
Jonathan Rogers,
I'd first try increasing the period and see if the additional data results in the required linear independence to decompose the matrix. If the above does not work, this might suggest that you should try out some different parameters.
https://stackoverflow.com/questions/47115466/matrix-must-be-positive-definite-math-net-c-sharp-library
Emiliano Fraticelli
thank you
Jovad Uribe
This is great!
Dan Root
Awesome!
Edinson Leandro Medina Alfonzo
Good work! Thanks for sharing!
Aaron Janeiro Stone
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!