Hi, I'm having a query regarding whether we can use any in-built feature to perform the Monte-Carlo and Walk-forward tests on the QuantConnect platform.
QUANTCONNECT COMMUNITY
Hi, I'm having a query regarding whether we can use any in-built feature to perform the Monte-Carlo and Walk-forward tests on the QuantConnect platform.
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.
Louis Szeto
Hi Manav
We can do walk-forward test by deploying a paper live trade. As per Monte-Carlo simulation, although you may still do so in the research environment, it is very seldom to do so for this purpose, since you would be under heavy assumptions on unchanged future market conditions, unchanged universe, perfect executions, etc.
Best
Louis
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.
Manav Trivedi
Hi Louis, can you send a sample for me for both, like any resource would also work. Thanks.
Louis Szeto
Hi Manav
For paper live trade, refer to the link I attached on the above comment. As per MC in research environment, you'll have to implement your whole trading logic in there and find out the daily mean return and variance. Then use random sampling of your guessed distribution of your return to generate the daily simulation. The cumulative products of the daily simulation are what you want.
Best
Louis
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.
Manav Trivedi
Thanks Louis, your help is much appreciated.
Garrett Grow
Louis, Manav can correct me if I am mistaken, but I think you may have misunderstood Manav's request. Usually “Walk-Forward Testing,” as popularized by Bob Pardo, describes backtesting wherein a strategy is reoptimized every so often during the backtest rather than just once. I believe that you are you referring to simple “Forward Testing” (testing on live data). I just want to clarify because I would also like to see QuantConnect implement some way of performing walk-forward optimization, since it usually produces more robust and reliable optimizations. I believe that TradeStation has walk-forward optimization capability.
Louis Szeto
Hi Garrett
Thank you for pointing that out. In that case, it would require a in-algorithm method to handle the parameter optimization job. Consider schedule a training session per time interval to reoptimize the parameters. You might also consider using library methods like sklearn's GridCV search or scipy's optimize and save the output as a global variable.
Best
Louis
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.
Non Compete
Here is an article on both methods (I think ) .
https://financial-hacker.com/why-90-of-backtests-fail/#more-4373
Non Compete
Has there been an update on perhaps adding Montecarlo and Walk Forward analysis to Quantconnect? Not sure if i missed them and they are already added. Or is there an example of in-algorithm optimization Louis mentioned? I saw this thread about it as well
https://www.quantconnect.com/forum/discussion/8628/monte-carlo-simulations/p1
Algo_dude
Jared opened an issue on it a bit ago:
Manav Trivedi
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!