4.6.3Trading Strategies

Understand trend-following systems

2,461 words11 min readdifficulty · medium6 backlinks

WHY does trend-following even work?

The four pillars every system must define:

  1. Market universe — what you trade.
  2. Entry rule — when to get in.
  3. Exit rule — when to get out (this is where profit is actually made).
  4. Position size / risk — how much to bet.

HOW: build the simplest trend system from scratch

Let PtP_t be the closing price on day tt.

Step 1 — Measure the trend with a moving average

We want a smooth version of price that filters noise. Take the Simple Moving Average (SMA) over the last nn days:

SMAn(t)=1ni=0n1Pti\text{SMA}_n(t) = \frac{1}{n}\sum_{i=0}^{n-1} P_{t-i}

Step 2 — Turn the average into a signal

Compare a fast average (reacts quickly) with a slow average (the baseline trend). The classic moving-average crossover. Note the three distinct states — +1 long, −1 short, and 0 flat (in cash):

Signalt={+1 (long)if SMAfast(t)>SMAslow(t)1 (short)if SMAfast(t)<SMAslow(t)+0 (flat / cash)if you choose not to hold a position\text{Signal}_t = \begin{cases} +1 \ (\text{long}) & \text{if } \text{SMA}_{\text{fast}}(t) > \text{SMA}_{\text{slow}}(t)\\[4pt] -1 \ (\text{short}) & \text{if } \text{SMA}_{\text{fast}}(t) < \text{SMA}_{\text{slow}}(t)\\[4pt] \phantom{+}0 \ (\text{flat / cash}) & \text{if you choose not to hold a position} \end{cases}

Step 3 — Position return

If you hold the signal from close of day tt to close of t+1t+1, your daily strategy return is:

rt+1strat=Signaltrt+1,rt+1=Pt+1PtPtr^{\text{strat}}_{t+1} = \text{Signal}_t \cdot r_{t+1}, \qquad r_{t+1}=\frac{P_{t+1}-P_t}{P_t}

Compounded equity over NN days:

EquityN=t=1N(1+Signalt1rt)\text{Equity}_N = \prod_{t=1}^{N}\big(1 + \text{Signal}_{t-1}\cdot r_t\big)

Figure — Understand trend-following systems

The exit is the strategy: trailing stops

Where ATR (Average True Range) measures typical daily movement:

TRt=max(HtLt, HtPt1, LtPt1)\text{TR}_t = \max\big(H_t-L_t,\ |H_t-P_{t-1}|,\ |L_t-P_{t-1}|\big) ATRn(t)=1ni=0n1TRti\text{ATR}_n(t)=\frac{1}{n}\sum_{i=0}^{n-1}\text{TR}_{t-i}


Worked Example 1 — Crossover signal by hand

Prices (₹): day 1–5 = 100, 102, 101, 105, 108. Use fast SMA(2) vs slow SMA(4).

Day Price SMA2 SMA4 Signal
4 105 (105+101)/2 = 103 (100+102+101+105)/4 = 102 +1 long
5 108 (108+105)/2 = 106.5 (102+101+105+108)/4 = 104 +1 long

Why this step? SMA2 > SMA4 on day 4 → recent momentum has overtaken the baseline → go long. We entered after confirmation, accepting we miss the first 5 points to gain certainty.


Worked Example 2 — Compute a strategy return

Signal on day 4 = +1. Price day 4→5 goes 105→108.

r5=108105105=0.02857,r5strat=(+1)(0.02857)=+2.86%r_5 = \frac{108-105}{105}=0.02857,\quad r^{\text{strat}}_5 = (+1)(0.02857)=+2.86\%

Why this step? We were long into a rising day, so we captured the full move. Had the signal been 1-1 (short) we'd have lost 2.86%; had it been 00 (flat) our return would be exactly 0%.


Worked Example 3 — Trailing stop in action

Entered long at 100 on day tet_e. ATR = 4, use k=2k=2 ⇒ stop distance = 8. Price rises to 120 (new high since entry), then falls.

Stop=(maxtestPs)kATR=1202(4)=112\text{Stop} = \Big(\max_{t_e\le s\le t} P_s\Big) - k\cdot\text{ATR} = 120 - 2(4) = 112

Price drops to 111 → exit at ~112. Profit ≈ 112 − 100 = ₹12.

Why this step? The stop ratcheted up with the highest close since entry (from 92 at entry to 112 at the peak), locking in gains. It only triggers once the trend gives back one "ATR-unit" of movement — statistical proof the run is likely over.



Recall Feynman: explain to a 12-year-old

Imagine you're on a river in a boat. You don't try to guess where the river will bend. You just paddle with the current as long as it flows one way. When you feel the water start pushing you backward, you stop and get out. You lose a little each time you jump in and the current dies quickly, but sometimes you catch a long fast current that carries you super far — and that one big ride pays for all the tiny slips. That's trend-following: follow the flow, quit small when it turns.


Active Recall

What is a trend-following system?
A rule-based method that reacts to existing price trends (using past price/volume) to go long in uptrends and short/flat in downtrends — it never forecasts fundamentals.
Why does trend-following have an edge?
Herding and slow information diffusion create price autocorrelation (drift); the system harvests rare, large trends.
Formula for a Simple Moving Average of period n?
SMAn(t)=1ni=0n1Pti\text{SMA}_n(t)=\frac{1}{n}\sum_{i=0}^{n-1}P_{t-i}
Moving-average crossover long rule?
Go long when the fast SMA rises above the slow SMA.
Daily strategy return formula?
rt+1strat=Signaltrt+1r^{strat}_{t+1}=\text{Signal}_t\cdot r_{t+1} where signal is +1 (long), −1 (short), or 0 (flat).
What do signals +1, −1, and 0 mean?
+1 = long (own it, profit when it rises); −1 = active short (profit when it falls); 0 = flat/cash (no exposure, return = 0).
What is a trailing stop?
An exit that follows price at a fixed distance below the highest close SINCE ENTRY (often k×ATR), locking in gains as price rises.
Why must the trailing-stop max start from the entry date?
So a pre-entry price peak can't pin the stop far above current price and eject you instantly; the stop should ratchet from your own entry onward.
What does ATR measure and why use it for stops?
Average True Range = typical daily movement; scaling stops by ATR gives the trend room proportional to its own volatility.
Why is the EXIT more important than the entry?
Profits come from letting a few winners run far; the exit rule determines how much of a trend you capture.
Why is a low win-rate acceptable in trend-following?
Payoff is asymmetric — many small losses are outweighed by few large gains, giving positive expectancy.
Biggest overfitting danger in system design?
Adding many parameters/indicators curve-fits past noise; robust systems stay simple and test out-of-sample.

Connections

  • Moving Averages
  • Momentum vs Mean-Reversion
  • Average True Range (ATR)
  • Position Sizing and Risk Management
  • Backtesting and Overfitting
  • Expectancy and Payoff Asymmetry
  • Drawdown

Concept Map

creates

harvested by

reacts not predicts

edge from

small losses often, big wins rare

must define

measures trend via

smooths noise, reveals

fast vs slow compared

generates

+1 long, -1 short, 0 cash

fast above slow

Herding + slow info diffusion

Autocorrelation / drift

Trend-following system

Ride existing move

Payoff asymmetry, not accuracy

Four pillars: universe, entry, exit, size

Simple Moving Average n days

Underlying drift

MA crossover

Signal +1 / -1 / 0

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, trend-following ka matlab hai future ko predict karna nahi, balki jo price already kar raha hai usko follow karna. Socho ek nadi ki tarah — tum current ke against nahi lade, bas jis taraf paani beh raha hai usi taraf paddle karte ho. Jab tak trend upar ja raha hai, tum long rehte ho; jab trend palatne lage, tum nikal jaate ho. Iska core edge yeh hai ki markets mein herding aur slow news-spread ki wajah se price mein thoda drift (autocorrelation) hota hai — jo kal upar gaya, aaj bhi thoda upar jaane ka chance zyada hota hai.

System banane ke 4 hisse hain: kaunsa market, kab enter (entry), kab exit, aur kitna paisa lagao (position size). Sabse simple entry rule hai moving-average crossover — fast SMA jab slow SMA ke upar cross kare to long, neeche cross kare to exit/short. Ek baat clear rakho: signal ke teen states hote hain — +1 long (asset owned), −1 short (giravat pe profit), aur 0 flat (cash mein, koi exposure nahi). Flat ko short samajh lena galti hai. Backtest ka jaadu ek line mein: strategy return = signal × market return.

Sabse important cheez: exit hi asli strategy hai. Profit tab banta hai jab tum kuch bade winners ko lambe time tak ride karte ho. Isliye trailing stop use karte hain jo ATR (average daily movement) ke hisaab se price ko follow karta hai — trend ko "saans lene ki jagah" milti hai. Ek key point: trailing stop ka highest price sirf entry ke din se aage count hota hai, warna entry se pehle ka koi purana peak stop ko galat jagah pin kar dega aur tum turant bahar ho jaoge.

Yaad rakho: trend systems ka win-rate kam hota hai (35–45%), lekin phir bhi paise banate hain kyunki ek bada winner, bahut saare chhote losers ko cover kar deta hai — yeh hai asymmetric payoff. Isliye galti mat karna: losses ko jaldi cut karo, winners ko chalne do (CROWD yaad rakho). Aur agar 6 mahine loss ho raha hai to system "toota" nahi hai — choppy market mein drawdown normal hai.

Test yourself — Trading Strategies

Connections