I have been trying everything to use the 64 day SMA of SPY but I have gotten nothing to work. Does anyone know how to do it?
I have been trying everything to use the 64 day SMA of SPY but I have gotten nothing to work. Does anyone know how to do it?
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.
Hey Tommy,
We can create a 64 day SMA of SPY with
sma = self.SMA("SPY", 64, Resolution.Daily)
This creates a 64 period simple moving average indicator that takes daily resolution SPY data.
I highly recommend you complete the boot camps. Check out the Momentum-Based Tactical Allocation Boot Camp, which covers creating and using indicators.
Check out the documentation on indicators and the back test below to learn more.
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!