Trend
10-month moving-average filter
A classic guard against big falls. The rule does not guess tops: it leaves a prolonged decline late and comes back after the turn, but it sits out the deepest crashes.
Rules
- The average is a 10-month simple moving average: about 210 candles on daily stock candles, 10 on monthly ones.
- Close above the average: buy at the next candle’s open.
- Close below the average: sell at the next candle’s open.
Out of the market, cash in the test earns nothing. In real life you can keep it in bonds or a money market fund, and at a high interest rate this changes the result noticeably.
Code for the lab
months = input(10, 2, 24, 1) n = round(bars_per_year * months / 12) avg = sma(close, n) plot avg buy when close > avg sell when close < avg
You can change the code right in the lab: the numbers in input(…) become sliders.
Results on eight markets
| Market | CAGR | Drawdown | Trades | Buy and hold: CAGR | Buy and hold: drawdown |
|---|---|---|---|---|---|
| MOEX Russia Index | — | — | — | — | — |
| Sberbank | — | — | — | — | — |
| Gazprom | — | — | — | — | — |
| Gold, $ per ounce | — | — | — | — | — |
| Brent crude, $ per barrel | — | — | — | — | — |
| Bitcoin | — | — | — | — | — |
| Ether | — | — | — | — | — |
| VN-Index | — | — | — | — | — |
| Market | CAGR | Drawdown | Trades | Buy and hold: CAGR | Buy and hold: drawdown |
|---|---|---|---|---|---|
| MOEX Russia Index | — | — | — | — | — |
| Sberbank | — | — | — | — | — |
| Gazprom | — | — | — | — | — |
| Gold, $ per ounce | — | — | — | — | — |
| Brent crude, $ per barrel | — | — | — | — | — |
| Bitcoin | — | — | — | — | — |
| Ether | — | — | — | — | — |
| VN-Index | — | — | — | — | — |
The numbers are calculated in your browser from fresh source candles.
Default parameters, daily candles, a fee and slippage of 0.05% each per trade, no return on cash out of the market, prices without dividends. The test starts once all of the rule’s indicators are calculated.
What research says
Mebane Faber (2007) tested a similar rule on monthly data: a 10-month average, one decision a month, Treasury bills while out of the market. In the updated version of the paper, on US stocks over 1901–2012: 10.2% a year against 9.3% for buy and hold, and a worst drawdown of −50% against −84% (before costs and taxes).
Our table shows the same picture: the rule’s return is usually below the market, and its worst drawdown is almost half as deep.
Original source: Faber. A Quantitative Approach to Tactical Asset Allocation. Journal of Wealth Management, 2007
When the rule breaks
- A sawtooth market: the price crosses the average many times, and each trade is a small loss plus fees.
- A crash within days, as in March 2020: the exit comes after the fall.
- A sharp turn upward: the return to the market comes late, and part of the rise is missed.