Free lesson · Quant strategy development
07 / Convert a forecast into a trade decision
Open interactive lessonPractice calculationsExplore labs
Start with the idea
Sizing connects a forecast to a feasible change in the current portfolio. The relevant benefit is the incremental gain from changing exposure, not the standalone attractiveness of a signal already held.
Symbols, units & horizon
- w*: target capital weight
- μ̂: same-horizon expected excess return
- σ̂²: forecast return variance for that horizon
- λ: positive risk-aversion coefficient
- w_max: absolute weight limit
- clip(x,l,u): limit x to the interval [l,u]
- U: return-minus-risk objective in return units
- ΔÛ: forecast improvement over the current position
- Ĉ(Δw): estimated total cost of changing weight
- Buffer: extra hurdle for model uncertainty in matching return units
When and why to use this
Use a simple objective and cost buffer to reduce unnecessary churn. Include current positions, pending orders and correlated risk when determining whether another order is justified.
Optimise a one-asset quadratic objective
- Maximise . Set , giving .
- With positive λ and variance, the objective is concave. Bound the solution by ±wmax; this is the clipping operation.
μ=.01, variance=.04, λ=2 gives w=.125. If the position limit is .10, the feasible solution is .10.
This one-asset mean–variance example maps a return forecast and variance estimate for the same horizon into a weight. λ controls risk aversion. The unconstrained solution is extremely sensitive to noisy estimates; shrinking forecasts toward zero is often more defensible than treating an optimised backtest mean as known.
Compare incremental benefit with friction
- Compute using the same horizon. Trade only if this exceeds the cost of Δw plus the chosen uncertainty buffer.
- The inequality rearranges to . Each term must be an objective contribution per NAV, not a mixture of price and return units.
Estimated benefit 8 bp of NAV, cost 5 bp and buffer 2 bp leave 1 bp of surplus. At 7 bp cost, the same change fails the rule.
Compare the estimated benefit of changing the current position with the cost of that change. A no-trade region prevents tiny forecast changes from triggering constant rebalancing. Include outstanding orders when measuring potential exposure; otherwise two independently valid orders can violate the aggregate limit.
| Control variable | Decision it affects |
|---|---|
| Calibrated forecast and uncertainty | Whether the expected gain is large enough to investigate or trade |
| Covariance with current positions | Whether the trade diversifies or concentrates the book |
| Spread, impact and turnover | Whether to wait, use a limit, reduce size or skip |
| Borrow rate and availability | Whether the short leg remains viable |
| Inventory, cash and margin | Whether a new position is feasible even if attractive |
| Drawdown and stressed liquidity | Whether risk policy requires a reduction or review |
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
def quadratic_weight(expected_return, variance, risk_aversion, max_weight):
if variance <= 0 or risk_aversion <= 0 or max_weight < 0:
raise ValueError("Positive variance/aversion and nonnegative cap required")
raw = expected_return/(risk_aversion*variance)
return max(-max_weight, min(max_weight, raw))
def trade_hurdle(expected_utility_gain, estimated_cost, uncertainty_buffer):
return expected_utility_gain > estimated_cost+uncertainty_buffer
print(quadratic_weight(.01,.04,2,.2), trade_hurdle(.002,.001,.0005))Continue learning
Quant Strategy Development — all lessons- 01 / Start with a source of return
- 02 / The variables that actually enter the decision
- 03 / Test predictive information before a complex model
- 04 / Momentum and trend: information that persists
- 05 / Mean reversion and relative value
- 06 / Carry, events, and liquidity provision
- 07 / Convert a forecast into a trade decision
- 08 / Build a bot that preserves the experiment
- 09 / Decide whether the edge is real enough to continue
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations