Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Moving Average Trading System

Looking for someone to work with to build this idea please get in touch

Markets are usually not random. Prices can be expected to open at a certain distance away from the price they closed.

Moving averages are telling you what the property of the instrument is at that moment in time.

The property of the instrument lies within a spectrum of accelerating down, to down, to sideways, to up, to accelerating up.

Each moving average has a different sensitivity to its underlying instrument.

Taking three moving averages, the 10 day the 20 day and the 50 day we know that the 10 day will move faster versus the instrument than the 20 day or 50 day so this is the riskier moving average or the shorter-term trade.

The 10d will keep you in the short term trend.
The 20d in the medium term trend
The 50d in the longer term trend

We back test the S&P moving average weighing the allocations:
10d at 20% the 20d at 30% and the 50d at 50%. This should smooth volatility but may not be optimum.

Allocation is made based on the slope of the line at the close of the day.
When the slope is up there is 100% allocation.
When it is flat there is a 0% allocation.
When it is down there is -50% allocation.

This is a concept that should be back tested to search for the most effective combinations of different length moving averages and different weights and allocations to the slope of the moving averages.

Statistically significant extension of price from the moving averages can also be used to take partial profits.

3 responses

This is the right forum. If someone is interested in the idea they might decide to write the algorithm or help you in doing it. Lots of people share their ideas/code here.

Also you might want to give links to some papers that back up your trading idea or give some reasons why it should work as incentive to the people that might consider coding the strategy.

Ray F, I just cant seem to validate the logic behind it. Specially when almost all the parameters you mention, as you say, must be optimized by backtesting which leads me to believe a great deal of overfiting is inevitable. Just my opinion.

Thanks Peyman.

Its conceptual at the moment based on my trading experience, and yes it is an experiment, not backed up by any previous research I have seen.

The question is whether or not there is value to be extracted from the slope of a moving average.

Of course backtesting without over optimizing is part of the art.

Am looking for someone to work with on this, very interested to backtest some simple versions and see the return characteristics.