Hi Everyone,
I am a complete newb when it comes to quant trading, but I have been noodling around for the last week and put together a very basic algo that seems to consistently produce positive backtest results. I understand that this likely would not work in live market conditions. I was hoping that you all could tell me why.
Please be brutal.
Best,
Matt
Bob Loblaw
Hi Matt,
I'm new as well, but I recently discovered that using daily resolution can lead to crazy results. Check out the paragraph in the middle of this post on resolution:
https://www.quantconnect.com/forum/discussion/6737/9-ways-to-get-your-alpha-rejected/p1AK M
Your answer is in your backtest, your equity decreased by 90% in 6 months. You might be able to mitigate some of that with stop losses.
Derek Melchin
Hi Matt,
In general, RSI does not have a cause-and-effect relationship to price. If a company has bad earnings or is sued by the SEC for insider trading, the share price falls. Furthermore, the algorithm lacks diversification. I recommend reviewing our documentation on universe selection to create algorithms which are diversified across a basket of securities instead of just trading BA. Additionally, when making investment decisions based off indicators, selecting hand-picked threshold values should be avoided as it can lead to overfitting. Instead, we can create an algorithm which longs the stocks in our universe with the lowest RSI values and shorts the ones with the highest.
In regards to position sizing, rather than using a fixed quantity, we can utilize a portfolio construction module like to EqualWeightingPortfolioConstructionModel to hold an equal weighting of each security we're invested in. Finally, to reduce drawdown, we can add a Risk Management module like the MaximumDrawdownPercentPerSecurity.
For your convenience , I've attached an algorithm that demonstrates these improvements. I recommend reviewing our documenation on the Algorithm Framework for full understanding.
Best,
Derek Melchin
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.
Matt Sain
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!