MathFin
Map / Choice · Market microstructure / MathFin.Markets.Execution.AlmgrenChriss

Almgren-Chriss optimal execution (deterministic closed form)

MathFin.Markets.Execution.AlmgrenChrissJEL G11MSC 91G80MSC 49L20 source

Liquidating X_0 units of an asset over horizon T with linear temporary impact (coefficient η) and price-variance risk aversion (coefficient λ), the optimal trajectory X(t) (remaining inventory) minimises the deterministic cost functional

∫_0^T (σ² λ · X(t)² + η · X'(t)²) dt

subject to X(0) = X_0 and X(T) = 0. The Euler-Lagrange equation reduces to

X''(t) = κ² · X(t), κ² := σ² λ / η,

a linear ODE with hyperbolic-cosine/sinh solutions. The boundary-condition- satisfying solution is

X(t) = X_0 · sinh(κ · (T − t)) / sinh(κ · T).

We verify the closed form satisfies:

  • the initial condition X(0) = X_0,
  • the terminal condition X(T) = 0,
  • the EL equation X''(t) = κ² · X(t).

The continuous minimisation (that this closed form is optimal among all admissible trajectories) is a calculus-of-variations claim that needs function-space machinery beyond Mathlib's current pin and is not proved here. What is proved is its discrete counterpart: over N periods of length Δ the cost liquidationCost is a positive-definite quadratic form on the feasible paths (X_0 at the start, flat at the end), so it has exactly one minimizer (existsUnique_minimizer_liquidationCost). That minimizer is the hyperbolic-sine path X_0 sinh(κ̃ (N − k) Δ) / sinh(κ̃ N Δ), cosh (κ̃ Δ) = 1 + c Δ² / (2 η): the continuous almgrenChrissPath at the discrete rate κ̃ (liquidationPath), or the straight line when c = 0.

Main definitions

  • almgrenChrissPath: the closed-form trajectory X(t) = X_0 · sinh (κ (T − t)) / sinh (κ T).
  • liquidationCost: the finite quadratic liquidation cost over N periods.
  • liquidationPaths: the feasible inventory paths, from X_0 down to 0.
  • liquidationRate, liquidationPath: the discrete rate κ̃ and the candidate minimizer.

Main results

  • almgrenChrissPath_at_zero: X(0) = X_0.
  • almgrenChrissPath_at_terminal: X(T) = 0.
  • hasDerivAt_almgrenChrissPath: first derivative.
  • almgrenChrissPath_satisfies_EL: X''(t) = κ² · X(t).
  • cosh_liquidationRate_mul: cosh (κ̃ Δ) = 1 + c Δ² / (2 η).
  • isMinOn_liquidationPath, eq_liquidationPath_of_isMinOn: liquidationPath minimizes liquidationCost on the feasible paths, and every minimizer equals it.
  • existsUnique_minimizer_liquidationCost: the finite liquidation cost has a unique feasible minimizer.

Neither derivative needs sinh(κT) ≠ 0: under Lean's x / 0 = 0 the degenerate closed form is the zero path, which satisfies both. Only the initial condition uses it.

References

Tags

optimal execution, market impact, liquidation, calculus of variations, Euler–Lagrange equation, inventory, JEL G11, MSC 91G80, MSC 49L20

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-almgren-chriss-EL · market_microstructure.json · full statement
Almgren-Chriss Trajectory Satisfies EL Equation

The closed-form Almgren-Chriss trajectory X(t) = X_0 · sinh(κ(T-t))/sinh(κT) satisfies the Euler-Lagrange equation X''(t) = κ² · X(t) at every t. No condition on sinh(κT) is needed: under Lean's x/0 = 0 the degenerate closed form is the zero path, which satisfies the equation too.

Declarations 15

defMathFin.almgrenChrissPathsource
ℝ → ℝ → ℝ → ℝ → ℝ

Almgren-Chriss optimal-execution trajectory: X(t) = X_0 · sinh(κ (T − t)) / sinh(κ T). Liquidation rate −X'(t) is slow at the start and accelerates near T.

theoremMathFin.almgrenChrissPath_at_zerosource
∀ (X_0 κ T : ℝ), Real.sinh (κ * T) ≠ 0 → almgrenChrissPath X_0 κ T 0 = X_0

Initial condition: X(0) = X_0.

theoremMathFin.almgrenChrissPath_at_terminalsource
∀ (X_0 κ T : ℝ), almgrenChrissPath X_0 κ T T = 0

Terminal condition: X(T) = 0.

theoremMathFin.hasDerivAt_almgrenChrissPathsource
∀ (X_0 κ T t : ℝ), HasDerivAt (almgrenChrissPath X_0 κ T) (-(X_0 * κ * Real.cosh (κ * (T - t)) / Real.sinh (κ * T))) t

First derivative: X'(t) = −X_0 · κ · cosh(κ (T − t)) / sinh(κ T).

theoremMathFin.almgrenChrissPath_satisfies_ELsource
∀ (X_0 κ T t : ℝ), HasDerivAt (deriv (almgrenChrissPath X_0 κ T)) (κ ^ 2 * almgrenChrissPath X_0 κ T t) t

Almgren-Chriss EL equation: the closed-form trajectory satisfies X''(t) = κ² · X(t), the Euler-Lagrange equation of the cost functional: hasDerivAt_almgrenChrissPath gives X' at every t, and the derivative of that formula is κ² · X(t).

defMathFin.liquidationCostsource
(N : ℕ) → ℝ → ℝ → ℝ → (Fin (N + 1) → ℝ) → ℝ

The discrete liquidation cost of the inventory path x over N periods of length Δ: ∑ₖ Δ (η ((xₖ₊₁ − xₖ)/Δ)² + c xₖ²), the Riemann sum of ∫ (η X'² + c X²) dt (impact η, risk c).

defMathFin.liquidationPathssource
(N : ℕ) → ℝ → Set (Fin (N + 1) → ℝ)

The feasible inventory paths: the paths starting at X₀ and ending flat.

defMathFin.liquidationRatesource
ℝ → ℝ → ℝ → ℝ

The discrete rate κ̃ = 2 arsinh (√(c/η) Δ / 2) / Δ, the solution of cosh (κ̃ Δ) = 1 + c Δ² / (2 η) (cosh_liquidationRate_mul); as Δ → 0 it should tend to the continuous rate √(c/η), which is not proved here.

defMathFin.liquidationPathsource
(N : ℕ) → ℝ → ℝ → ℝ → ℝ → Fin (N + 1) → ℝ

The minimizing liquidation path: X₀ sinh(κ̃ (N − k) Δ) / sinh(κ̃ N Δ), that is the continuous almgrenChrissPath at the discrete rate κ̃ and the dates k Δ; with no risk penalty (c = 0, where κ̃ = 0 and the closed form degenerates) the straight line X₀ (N − k) / N.

theoremMathFin.cosh_liquidationRate_mulsource
∀ {Δ η c : ℝ}, Δ ≠ 0 → 0 ≤ c / η → Real.cosh (liquidationRate Δ η c * Δ) = 1 + c * Δ ^ 2 / η / 2

The discrete rate solves cosh (κ̃ Δ) = 1 + c Δ² / (2 η).

theoremMathFin.solves_secondDifference_of_profilesource
∀ {N : ℕ} {φ : ℝ → ℝ} {a X₀ : ℝ}, (∀ (t : ℝ), φ (t + 1) + φ (t - 1) = (2 + a) * φ t) → φ 0 = 0 → φ ↑N ≠ 0 → ∀ {X : ℕ → ℝ}, (∀ (k : ℕ), X k = X₀ * φ (↑N - ↑k) / φ ↑N) → X 0 = X₀ ∧ X N = 0 ∧ ∀ (k : ℕ), k + 2 ≤ N → X k - 2 * X (k + 1) + X (k + 2) = a * X (k + 1)

A profile φ with φ (t + 1) + φ (t − 1) = (2 + a) φ t and φ 0 = 0, φ N ≠ 0, scaled to X k = X₀ φ (N − k) / φ N, starts at X₀, ends at 0, and satisfies the discrete Euler–Lagrange equation with coefficient a: it solves the discrete boundary-value problem X k − 2 X (k+1) + X (k+2) = a X (k+1), X 0 = X₀, X N = 0.

theoremMathFin.liquidationPath_mem_liquidationPathssource
∀ {N : ℕ}, 0 < N → ∀ {Δ η c : ℝ}, 0 < Δ → 0 < η → 0 ≤ c → ∀ (X₀ : ℝ), liquidationPath N Δ η c X₀ ∈ liquidationPaths N X₀

The liquidation path is feasible.

theoremMathFin.isMinOn_liquidationPathsource
∀ {N : ℕ}, 0 < N → ∀ {Δ η c : ℝ}, 0 < Δ → 0 < η → 0 ≤ c → ∀ (X₀ : ℝ), IsMinOn (liquidationCost N Δ η c) (liquidationPaths N X₀) (liquidationPath N Δ η c X₀)

The liquidation path minimizes the cost on the feasible paths.

theoremMathFin.eq_liquidationPath_of_isMinOnsource
∀ {N : ℕ}, 0 < N → ∀ {Δ η c : ℝ}, 0 < Δ → 0 < η → 0 ≤ c → ∀ (X₀ : ℝ) {x : Fin (N + 1) → ℝ}, x ∈ liquidationPaths N X₀ → IsMinOn (liquidationCost N Δ η c) (liquidationPaths N X₀) x → x = liquidationPath N Δ η c X₀

Every minimizer of the cost on the feasible paths is the liquidation path.

theoremMathFin.existsUnique_minimizer_liquidationCostsource
∀ {N : ℕ}, 0 < N → ∀ {Δ η c : ℝ}, 0 < Δ → 0 < η → 0 ≤ c → ∀ (X₀ : ℝ), ∃! x, x ∈ liquidationPaths N X₀ ∧ IsMinOn (liquidationCost N Δ η c) (liquidationPaths N X₀) x

The discrete liquidation problem has exactly one solution. Over N > 0 periods of length Δ > 0, with impact η > 0 and risk c ≥ 0, the cost liquidationCost has a unique minimizer among the paths from X₀ to 0; it is liquidationPath, the discrete hyperbolic-sine path.