Hi.
How do i create a way to see the smooth acceleration of a sma(200) in an easy and right way?
My strategy relies on when the SMA starts to gain or loose momentum.
My problem is that when I use the MOM on SMA I get a very noisy graph is there a clever way to make it less noisy? preferebly totaly smooth. I don't really wanna take the mooving average of it.
I guess the best way would be to noise filter/ smoothing the SMA(200) first and then get the mom of the smooth SMA? Is there a SMOOTH() or NoiseFilter() method?
I guess I can always use a filtering method for numpy arrray. but its just a hassle.
i attached the back test. thanks for any advice :)
kind regards martin.
Vladimir
Martin etellerandet,
I'm wondering why you used the 200 day momentum.
Changing the momentum period to 21 and adding WarmUp made self.momMA pretty smooth.
Enjoy
Martin etellerandet
Thank you so much :) that really made my day :)I guess I just used the example in the indicator documentation in the bottom. Like so:
how is the calculation made? is it like this?
Momentum = (Current closing price)- (Closing price n periods ago)
Momentum percent = Momentum / (Closing price n periods ago) * 100
Vladimir
Martin etellerandet,
I would define MomentumPercent(period) this way:
def MomentumPercent(self, symbol, period):
prices = self.History(symbol, period + 1, Resolution.Daily).close
return float(100*(prices.iloc[-1] / prices.iloc[0] - 1))
Note: for MomentumPercent(period) we need period + 1 data points.
If you are happy with my first answer please accept it.
Derek Melchin
Hi Martin,
That example from the documentation is computing the simple moving average of the values produced from the RSI indicator. Although, the formulas above for the momentum and momentum percent indicators are correct.
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.
Martin etellerandet
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!