Hi all -very new here with limited to no coding experience but keen to learn. I have gone through some of the C# tutorials on the Microsoft site but may be trying to move too fast here. I have just read Andreas Clenow's book "Stocks on the Move" (great book) and I want to be able to code a backtest where by I buy members of the S&P500 based on their adjusted slope values. Basically, I want to:
1. Determine the 90 day annualized exponential regression slope for each stock
2. Determine the 90 day R-squared value for each of the stock
3. Multiply #1 * #2 and then sort from highest to lowest
4. Buy the top stocks based on the formula ((AccountValue * 0.001)/ATR(20))
There is some other logic that helps to determine when to buy and when to sell (like buy only if the S&P500 is above its 200 day SMA) I am not even sure where to start; but am not asking for someone to do it for me. Is there any suggestions on where to start with a coding challenge like this? Is there a better way to go about building this algorithm?
Thanks in advance!
Michael Handschuh
Jeremy McNeil
Michael Handschuh
Abhishek Singh
Hey Jeremy,
I am at the same place where you were three years back. Good to see someone started like me..
I haven't read the book and was wondering if you could provide mathematical construct of 90 day annualized exponential regression slope for each stock..
Jeremy McNeil
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!