Trading Dev AcademyFree quant education

Free lesson · Optimization

Trading costs and a no-trade decision

Open interactive lessonPractice calculationsExplore labs

Start with the idea

A small improvement in the forecast may not justify paying to change the position.

Symbols, units & horizon
  • μ: expected return over next holding period
  • a>0: risk penalty in holding-period return units per squared weight
  • w₀: current dimensionless exposure
  • c≥0: one-way proportional trading cost fraction per unit weight changed
  • w*: maximizer of μw−aw²/2−c|w−w₀|

When and why to use this

Use this calculation to justify unchanged weights and limit noisy rebalancing.

A small improvement in the forecast may not justify paying to change the position.

A one-period scalar objective can subtract a one-way proportional cost on the change from the current exposure. At no change, the absolute-value cost has a kink. The kink creates a range in which keeping the existing weight is optimal.

The cost must cover the same decision horizon as the expected benefit. Spread crossing, commissions and expected liquidation costs may be separate terms; do not mix annual alpha with a one-day holding decision.

|μ−aw0|≤c ⟹ w∗=w0
Concave optimization using an absolute-value subgradient

Trading costs and a no-trade decision

  1. Frictionless marginal benefit at the current position is μ−aw₀.
  2. At no trade the cost subgradient is any number from −c to c.
  3. If marginal benefit lies in that interval, zero belongs to the objective subgradient and concavity makes no change optimal.
Work it by hand

μ=.006, a=.02, w₀=.2 and c=.003 give marginal benefit .002. Since .002≤.003, keep .2; a frictionless rule would move to .3.

Apply it in a strategy

  • Freeze inputs at the stated decision time and record their units.
  • Use this calculation to justify unchanged weights and limit noisy rebalancing.
  • Recompute the example, then change the material assumption and explain the difference.

Research deliverable

Trading costs and a no-trade decision: produce the worked calculation, a timestamped input record and a written decision addressing this limitation: Quadratic impact, multiple correlated assets and minimum lots change the scalar no-trade region.

These are synthetic mechanics examples, not historical performance or paper replications. Module evidence and research boundaries record the 12 September 2026 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.

# Python 3.10+; standard library and NumPy only.
# Synthetic teaching inputs; conventions and units are defined in the notation above.
def cost_aware_weight(mean,penalty,current,cost):
    if penalty<=0 or cost<0: raise ValueError('Invalid penalty or cost')
    edge=mean-penalty*current
    if abs(edge)<=cost: return current
    return (mean-cost)/penalty if edge>cost else (mean+cost)/penalty

assert cost_aware_weight(.006,.02,.2,.003)==.2
print(cost_aware_weight(.006,.02,.2,.003))

Continue learning

Optimization: Feasibility, Costs & Robust Decisions — all lessons
  1. Exposure constraints before optimization
  2. Curvature and a bounded quadratic decision
  3. Derive the fully invested minimum-variance portfolio
  4. Project a desired allocation onto the long-only simplex
  5. Trading costs and a no-trade decision
  6. An uncertainty bound becomes a position penalty
  7. Read a binding constraint through its shadow price
  8. Numerical residuals and independent solution checks

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