Lesson 0020

Trades Have Schedules: The Multiperiod State

Everything so far answers one question: what book should I hold? A real desk faces a different one every morning: what should I trade today, given where I already am and where I'll want to be tomorrow? You glimpsed this in Lesson 0015's 120-day race — each day's w became the next day's w_prev. This lesson makes that loop formal: the state, the dynamics, and the reason multiperiod optimization exists at all.

The One-Step Skill

Write the multiperiod problem in state–transition notation, and answer the screening question that decides whether you need it: what couples the periods? If nothing does, the myopic loop — re-solve the single-period problem daily — is already optimal, and the fancy machinery buys nothing.

The Notation: Three Lines

state:      w_t            the book you wake up with
control:    z_t            today's trades (the decision)
dynamics:   w_{t+1} = w_t + z_t         (plus returns drift, in full dress)

choose z_1 ... z_H:   maximize  Σ_t [ α_tᵀw_t - γ·risk(w_t) - cost(z_t) ]

That's it — your single-period objective, summed over a horizon, with one new character: the state. Every w_t is both an outcome (of yesterday's trade) and a starting point (for tomorrow's). This is the notation of control theory, and the Boyd et al. paper you'll read next lesson is written entirely in it.

The Contrast First: Why Isn't Myopic Already Optimal?

The plausible position — and it's almost right: “just re-solve the single-period problem each day with today's w_prev. Why plan?” Test it against the L1 cost you know best:

L1 fee:  cost of trading D  in one lump  =  κD
         cost of trading D  in m pieces  =  m · κ(D/m)  =  κD     SAME.

linear costs don't care about schedules → periods decouple → myopic is fine

impact:  cost per day = c·(trade)²
         one lump:   cD²
         m pieces:   m · c(D/m)²  =  cD²/m      SPLITTING DIVIDES THE COST.

There it is — the L1-vs-quadratic contrast a third time, now deciding whether time exists. The kink decides whether to trade (Lesson 0012); the square decides how fast. Quadratic-ish impact is real market physics for any size that moves the price, and it couples the periods: the cheap way to trade a big D is to spread it, which only a planner spanning several days can choose. Two things couple periods in practice:

Nonlinear (impact) costs

Splitting divides the bill, so today's trade size depends on how much trading remains — a schedule, not a decision. This lesson's lab.

Alpha with a clock

Signals decay. Trading slower is cheaper but arrives after the alpha is gone. The race between the impact meter and the alpha clock has an interior optimum — also this lesson's lab.

The tradeoff has a clean back-of-envelope answer. Spread a trade of size Δ over m days: impact falls like cΔ²/m, alpha forgone grows like aΔ(m-1)/2. Balance the marginals and:

m* ≈ √(2cΔ/a)         lab numbers: √(2 × 0.5 × 0.6 / 0.012) ≈ 7.1 days

Finally, the practical algorithm the paper builds to: model predictive control (MPC). Solve the H-day plan, execute only day one, wake up, re-solve with fresh data. Planning gives you scheduling; re-solving gives you honesty about forecasts. It's the myopic loop's discipline wrapped around a planner's objective.

Memory hook: myopic asks “what's the best book?” A planner asks “what's the best path?” The questions differ exactly when the cost of a path isn't the sum of independent days — impact and decaying alpha are what make the path matter.

Lab: Schedule the Trade

You must move a position from weight 0.20 to 0.80. The signal pays 0.012×(w - 0.20) per day for 30 days; impact costs 0.5×(trade)² each day. The right panel shows the whole tradeoff — net alpha against schedule length — and the left panel animates your chosen schedule. Three experiments: (1) lump it, m = 1 — alpha capture is instant but impact eats 83% of it (net 0.036); (2) find the peak — m* = 7 days nets 0.169, 4.7× the lump sum, and matches √(2cΔ/a) ≈ 7.1; (3) overshoot to m = 20 — impact is nearly free now but the alpha clock ran out while you dawdled. Then re-read the curve: its two ends are the two coupling forces, and every real execution desk lives at its peak.

Day-
Alpha collected-
Impact paid-
Net-

-

Retrieval Practice

Costs are purely L1 (κ|z|), alphas are static. What does multiperiod planning add over the myopic loop?

Impact coefficient c quadruples (a much less liquid name). The optimal schedule length m* ≈ √(2cΔ/a)?

Model predictive control, in one sentence?

Primary Source

Boyd, Busseti, Diamond, Kahn, Koh, Nystrup, Speth — “Multi-Period Trading via Convex Optimization” is the primary source — this entire lesson is its opening chapters compressed: normalized weights and trades as state and control, transaction cost functions with kinked and superlinear terms, and MPC as the practical algorithm. You will read it properly next lesson, so a skim of its table of contents counts as tonight's homework. Cheat sheet: multiperiod notation card.

Questions?

Ask your agent anything unclear — good prompts: “derive m* = √(2cΔ/a) from the two marginal costs,” “add a risk term to the lab's tradeoff — what changes,” or “show me the myopic loop failing on a two-day alpha with impact costs, numerically.”