Module 5 of 14 · Directional strategies
Trend following with moving averages
Trend following bets that prices which have been rising will keep rising for a while, and falling ones keep falling. It is the oldest systematic futures strategy and still the backbone of most managed-futures funds, because the effect shows up across equities, bonds, currencies and commodities over many decades.
The simplest detector is a moving-average crossover: long when a fast average is above a slow one, short when below. Use exponentially weighted averages: they respond smoothly instead of lurching when an old price drops out of a fixed window, which cuts pointless trading. A slow span of about four times the fast span works well; anything from two to six times behaves similarly.
A yes/no signal throws information away. A gap of a few cents and a gap of several dollars both say “long”. Instead turn the gap into a forecast of trend strength:
- Divide the gap between the averages by the daily price volatility, so the signal means the same thing in every market.
- Multiply by a forecast scalar chosen so that the average absolute forecast over history is 10.
- Cap it at ±20 so no single reading can more than double your average risk.
Feed that forecast into the sizing formula from Module 2 and the position grows as the trend strengthens and shrinks as it fades — often before the averages have actually crossed.
🎛 Crossover lab
Sharpe ratio
0.83
Monthly skew
1.37
Turnover
12
average positions / yr
Time at the cap
13.6%
scalar 3.80
Price is a synthetic market with hidden slow-moving drift. The slow average always uses four times the fast span. In “strength” mode the gap between the averages is divided by daily price volatility, multiplied by a scalar so its average absolute value is 10, then capped. Positions are volatility-targeted at 20% per year for an average forecast. Statistics cover 20 synthetic years; charts show the last three.
Why trend strength helps, and what it costs
Toggling between modes shows the trade-off. The strength forecast usually improves the Sharpe ratio because it holds big positions in strong, established trends and small ones when the averages are tangled. It also trades more, because the position adjusts every day rather than only at crossings, and it tends to give up some of trend following's attractive positive skew.
Notice there is no stop-loss anywhere. The rule exits by itself when the trend reverses, and because positions are already scaled to volatility, a separate stop is largely redundant. If you do use stops, set them in volatility units so they fire at about the same time the trend signal would flip.
Things to try
- • Compare a fast span of 2 with 16 in strength mode: the fastest version loses money even with no costs at all, and trades far more — Module 6 explains why.
- • Lower the cap to 10: the forecast spends a lot of time pinned at the cap and the rule starts to behave like a binary one again.
- • In binary mode, look at the skew tile, then switch to strength mode. Which would you rather hold through a bad year?
Original interactive lesson. Labs run on a seeded synthetic market in your browser, built to illustrate mechanics, not to predict any real market. Contract figures are illustrative; check exchange specifications. Educational analysis, not investment advice.