Hi,
I hear trading gurus always talk about how support levels are super important and how different assets have different support moving averages. So TSLA might find support at the 21-day exponential moving average while AAPL might do so at the 50-SMA.
It's fairly easy to look at a graph and find the moving averages yourself. However, I would like to write something that is not subjective. Any ideas on how you could implement finding the best support moving average for an asset?
I was thinking of somehow measuring the absolute distance between the current price and the moving average: | Price(x) - MA(x) |. Then do that for all data points and all moving averages and see which MA's on average get closes to the price. However, this falls short with slower-moving averages. Say, the 200-SMA is a very strong support level but the price almost never falls down to that level. However, if it did it would indeed work as a strong support level.
Any ideas are very appreciated. Thanks :-)
Stinus
Derek Melchin
Hi Stinus,
That seems like a reasonable approach. While developing this, this related thread may be helpful.
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.
Hector Barrio
Hello Stinus,
my suggestion for finding if a moving average acts reliably as a support is checking for an array of moving averages how many days the company traded below each of them. Every day the price closes below each moving average, that moving average value did not act as a support. I suppose it will vary a lot depending on the lookback period.
Stinus Hojensbo
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!