Budget: compliance-shaped
Mandates, regulators, and investment committees speak in hard limits (“≤ 10% monthly turnover”). Guarantees are absolute — but the implied fee λ* silently changes every rebalance.
Lesson 0012 priced trading with a fee in the objective. Real mandates often do it the other way: a hard cap like “turnover at most 10% per rebalance.” These two forms are secretly the same problem — and the dual variable is the secret.
Given a solved problem with a binding turnover budget, read its dual as the fee that would have produced the same trade — and convert freely between the penalty form and the budget form of any cost or risk term. This conversion is one of the most-tested ideas in quant interviews.
penalty form (Lesson 0012):
minimize f0(w) + κ |w - w_prev|
"trading costs κ per unit; spend wisely"
budget form (this lesson):
minimize f0(w)
subject to |w - w_prev| <= τ
"trade at most τ; the fee is somebody else's problem"
The budget draws a trading band around yesterday's holding: [w_prev - τ, w_prev + τ]. The optimizer moves toward the frictionless target w = 1.00, and either reaches it inside the band (budget loose, dual zero) or slams into the band's edge (budget binds, dual positive). This is exactly the wall geometry from Lessons 0004–0010 — except the wall is now relative to yesterday and moves when w_prev moves.
Attach a multiplier λ to the budget, exactly as in Lesson 0004:
L(w, λ) = f0(w) + λ ( |w - w_prev| - τ )
group the terms:
L(w, λ) = [ f0(w) + λ |w - w_prev| ] - λτ
↑
this bracket IS Lesson 0012's penalty
objective, with fee κ = λ
Read that twice, because it is the whole lesson. Minimizing the Lagrangian at the optimal multiplier λ* is literally solving the penalty problem with κ = λ*. The constant -λτ doesn't move the minimizer. Therefore:
budget τ with optimal dual λ*
produces the same trade as
penalty with fee κ = λ*
and in reverse: solve with fee κ, measure the turnover
τ = |w* - w_prev| you got, and the budget-τ problem
has dual λ* = κ.
Solving our numbers for a binding budget (trading upward, so w* = w_prev + τ):
stationarity at the band edge (Lesson 0005 pattern):
f0'(w*) + λ = 0
λ* = -f0'(w_prev + τ) = 0.30 (1 - w_prev - τ)
sanity checks:
τ = 0 (no trading allowed) λ* = 0.30(1 - w_prev)
τ grows λ* decays linearly — Lesson 0010's decay, again
τ >= 1 - w_prev (target inside band) λ* = 0, budget loose
And the dual keeps its old job from Lessons 0008–0009: λ* is the objective improvement per extra point of trading budget. A risk manager asking “what would 1% more turnover buy us?” is asking for this exact number.
The band walls sit at w_prev ± τ. Three experiments: (1) widen τ and watch the dual decay linearly to zero at the moment the target 100% enters the band — Lesson 0010's decay curve reborn; (2) fix τ and slide w_prev toward the target — the same budget gets cheaper because less trading is wanted; (3) check equivalence against Lesson 0012: set w_prev = 40%, τ = 40 pts — the dual reads 0.060, and in the previous lab κ = 0.06 at w_prev = 40% produced exactly this trade to 80%.
The last two metrics are always identical — that is the theorem, displayed. When the dual reads 0.000 the budget is loose and the equivalent fee is “any fee small enough to be absorbed,” per Lesson 0012's no-trade condition.
Mandates, regulators, and investment committees speak in hard limits (“≤ 10% monthly turnover”). Guarantees are absolute — but the implied fee λ* silently changes every rebalance.
If you can estimate the true cost per unit traded, put it in the objective and let turnover float. The trade size then responds smoothly to how strong the signal is.
Run the budget form, read λ*. If λ* vastly exceeds the real trading cost, the mandate is starving the strategy — a quantified argument for renegotiating τ.
Risk works identically: “variance ≤ s” with dual γ* equals “penalize variance with weight γ*”. Every hard limit has a shadow penalty; every penalty is a soft limit.
λ* = 0.045. Which penalty problem yields the same trade?Papers split roughly evenly between the two forms, and you can now read them as one. Markowitz-style papers put risk in the objective and return in a constraint (or vice versa) — that whole “efficient frontier” is a sweep of this same penalty–budget equivalence, with the frontier's slope playing the dual. Boyd et al. deliberately choose penalty form for everything precisely so that a single unconstrained-looking convex objective encodes all the economics. When two papers seem to disagree — one caps turnover, the other prices it — check the dual: at the right (τ, κ) pair they are the identical strategy.
Section 5.6 (perturbation and sensitivity) of Boyd and Vandenberghe is the formal home of the penalty–budget equivalence; section 4.7.4 covers the risk version (scalarization vs. constraint). In code, solve the budget form in CVXPY and the fee is sitting in constraint.dual_value. Keep the budget–penalty reference open, alongside the dual sensitivity cheatsheet.
Ask your agent anything unclear — good prompts: “show the risk-budget version of this equivalence with numbers,” “when does the equivalence break?” (hint: non-convexity), or “walk me through reading λ* off a CVXPY turnover constraint.”