Hi,
Here is a recent example of my coding.
Watch out trading it live. There are probably a bunch of people who are going to try that at once and they will all likely get lousy fills with the MarketOnOpen orders. You could add position building to spread out the orders over time, or better, analyze what the stochastic indicator is and apply it to fresh data. Next to my own custom indicators the stochastic is one of my favorites, I've run thousands of backtests. You can try different asset classes, different time resolutions, etc.
The backtest is for just one year. Previous performance is not as good. The algo does seem to be in sync with current market dynamics and with 1953 trades put through it might even be statistically relevant.
Regards,
Warren Harding
Varad Kabade
Hi Warren Harding,
Thank you for sharing the above example with the community. We have made the following changes keeping the best practices into consideration.
1. We have implemented SymbolData class which takes care of storing the properties required to calculate Stochastic value, and created a method in the class itself that does this.
2. We have replaced the List of trade bars by keeping a Max and Min indicator which increases the speed of the backtest.
Refer to the attached backtest.
Best,
Varad Kabade
Warren Harding
Just so you know Trend0 goes long when the stock is trending up and short when the stock is trending down. It is neutral and balanced in that respect, so the returns are not simply dependent upon the gains in AMZN and TSLA.
Warren Harding
Warren Harding
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!