Position sizing rules inside a system
Choose and code a sizing rule for a trading system, apply volatility-based sizing with caps and rounding, and see how the rule changes backtest results.
What you will learn
- The four common sizing rules in systematic trading and how each changes a backtest
- How to calculate an ATR-based position size with rounding and a position cap
- Why sizing must use the equity known at the time of the signal
- How compounding with fixed-fractional sizing changes losing streaks
Explanation
How to calculate a position size for shares, forex, crypto and CFDs is covered in the course on risk management. Here the question is different: which sizing rule do you write into a system, and how does that choice change the test result?
Four sizing rules
- Fixed units: always trade, for example, 100 shares. Simple and good for judging the raw signal, but risk changes when price or volatility changes.
- Fixed capital: always invest, for example, 10% of equity. Each position has the same euro value, but a volatile stock carries more risk than a calm one.
- Fixed-fractional risk: risk a fixed share of equity, for example 0.5%, between entry and stop. Position size = euro risk ÷ stop distance per unit.
- Volatility-based sizing: a form of fixed-fractional risk where the stop distance is a multiple of the ATR (average true range), a measure of typical daily price movement. Calm markets get larger positions, volatile markets smaller ones, so each trade carries similar risk.
The formula for ATR-based sizing is:
Units = (equity × risk %) ÷ (k × ATR)
where k is the stop multiple, for example 2. Always round down to whole units or to the minimum lot size.
Caps and limits
Volatility sizing can produce very large positions in very calm instruments. A system therefore needs hard limits, written as rules:
- a maximum position value, for example 20% of equity per position;
- a maximum total exposure, for example 100% of equity (no leverage) or a stated leverage limit;
- a maximum total open risk across positions, often called portfolio heat (covered in the risk management course).
Leverage, CFDs and futures can lose money quickly, and gaps can push losses beyond the planned risk. A cap protects against the case where a "calm" instrument suddenly moves.
Sizing in the backtest
- Use the equity and ATR known at the signal time, never later values. Using final equity or tomorrow's ATR is look-ahead bias.
- Fixed-fractional sizing makes results path-dependent: the same trades in a different order give a different final equity. Judge the raw signal first with fixed units or R-multiples, then add the sizing rule.
- When you compare systems, keep the same sizing rule, otherwise you compare sizing, not signals.
Worked example
Hypothetical example: equity €50,000, risk per trade 0.5%, stop = 2 × ATR, cap = 20% of equity per position. Three buy signals arrive on the same day. Fees, spreads and slippage are excluded.
Euro risk per trade: €50,000 × 0.5% = €250. Position cap: 20% × €50,000 = €10,000.
| Stock | Price | ATR | Stop distance (2 × ATR) | Raw units (€250 ÷ stop) | Final units | Position value |
|---|---|---|---|---|---|---|
| A | €60 | €2.40 | €4.80 | 52.08 | 52 | €3,120 (6.2%) |
| B | €40 | €0.80 | €1.60 | 156.25 | 156 | €6,240 (12.5%) |
| C | €25 | €0.25 | €0.50 | 500 | 400 (capped) | €10,000 (20%) |
Stock C: 500 units would be worth 500 × €25 = €12,500, which is 25% of equity and above the cap. The cap allows €10,000 ÷ €25 = 400 units, so the risk to the stop falls to 400 × €0.50 = €200. Stocks A and B each risk about €249.60 after rounding down.
Compounding effect: with fixed-fractional sizing at 1% risk, ten losses in a row leave 0.99^10 ≈ 0.904, i.e. 90.4% of starting equity, a loss of about 9.6%. With a fixed €500 risk on €50,000 (also 1% at the start), ten losses cost exactly €5,000, or 10%. Fixed-fractional sizing shrinks positions in a drawdown and grows them after gains.
Common mistake
Practice activity
On paper: equity €30,000, risk per trade 0.75%, stop = 2.5 × ATR, cap = 10% of equity per position. Calculate the number of shares and the euro risk for (a) stock X at €80 with ATR €3.00 and (b) stock Y at €20 with ATR €0.40.
Show solution
Euro risk = €30,000 × 0.75% = €225. Cap = €3,000.
(a) Stop = 2.5 × €3.00 = €7.50. Shares = €225 ÷ €7.50 = 30. Value = 30 × €80 = €2,400 (8%), below the cap. Risk €225.
(b) Stop = 2.5 × €0.40 = €1.00. Raw shares = 225, value €4,500 (15%), above the cap. Capped shares = €3,000 ÷ €20 = 150. Risk = 150 × €1.00 = €150.
Limitations: real losses can exceed the stop because of gaps and slippage, and costs are ignored.
Key takeaways
- Sizing rules change returns, drawdowns and path dependency, not only position values.
- ATR-based sizing equalises risk per trade; always round down and apply caps.
- Use only the equity and volatility known at the signal time.
- Test exactly the sizing rule you will use live.
Next step
In the next lesson you will combine several systems into one portfolio and calculate how diversification changes overall volatility.
Self-check
Answer the questions, then check your answers. You can retry as often as you like.
Automatic self-check for your own revision. Your answers are checked in your browser and are not seen or assessed by us. It is not an exam and not a qualification.
Your progress
“Complete” only means you marked the lesson as done. It is not a test of your understanding. Progress and notes are saved only in this browser on this device — not in an account.