Trading Dev AcademyFree quant education

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.

wt∗=clip⁡(μ^tλσ^t2,−wmax⁡,wmax⁡)
Differentiation + constrained solution

Optimise a one-asset quadratic objective

  1. Maximise U(w)=μw−λσ2w22. Set U′=μ−λσ2w=0, giving w=μ(λσ2).
  2. With positive λ and variance, the objective is concave. Bound the solution by ±wmax; this is the clipping operation.
Work it by hand

μ=.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.

trade ifΔU^>C^(Δw)+uncertainty buffer
Decision rule, not an empirical guarantee

Compare incremental benefit with friction

  1. Compute ΔU=U(wnew)−U(wold) using the same horizon. Trade only if this exceeds the cost of Δw plus the chosen uncertainty buffer.
  2. The inequality rearranges to ΔU−C^−buffer>0. Each term must be an objective contribution per NAV, not a mixture of price and return units.
Work it by hand

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 variableDecision it affects
Calibrated forecast and uncertaintyWhether the expected gain is large enough to investigate or trade
Covariance with current positionsWhether the trade diversifies or concentrates the book
Spread, impact and turnoverWhether to wait, use a limit, reduce size or skip
Borrow rate and availabilityWhether the short leg remains viable
Inventory, cash and marginWhether a new position is feasible even if attractive
Drawdown and stressed liquidityWhether 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
  1. 01 / Start with a source of return
  2. 02 / The variables that actually enter the decision
  3. 03 / Test predictive information before a complex model
  4. 04 / Momentum and trend: information that persists
  5. 05 / Mean reversion and relative value
  6. 06 / Carry, events, and liquidity provision
  7. 07 / Convert a forecast into a trade decision
  8. 08 / Build a bot that preserves the experiment
  9. 09 / Decide whether the edge is real enough to continue

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations