MathFin
Map / Choice · Market microstructure / MathFin.Markets.Microstructure.MatrixMarketMakingRiccati

Multi-asset market making — the matrix Riccati closed form

MathFin.Markets.Microstructure.MatrixMarketMakingRiccatiMSC 91G80MSC 49L20JEL G14 source

The multi-asset Avellaneda–Stoikov market-making problem of Bergault, Evangelista, Guéant and Vieira (Closed-form approximations in multi-asset market making, arXiv:1810.04383) reduces, via a quadratic (LQ) approximation of the trade-intensity Hamiltonians, to a matrix Riccati system (their Proposition 2). Its closed-form solution is the matrix analogue of the scalar a(t) = Â · tanh (Â (T − t)) verified in MathFin.Markets.Microstructure.MarketMakingRiccati.

We work by spectral reduction: for a real symmetric (Hermitian) matrix  with eigendecomposition  = U · diag(λ) · Uᴴ (U = hÂ.eigenvectorUnitary, λ = hÂ.eigenvalues), we define the matrix Riccati coefficient in already-diagonalised form using the scalar riccatiCoeff. This is the construction behind Mathlib's functional calculus for Hermitian matrices, Matrix.IsHermitian.cfc, applied to riccatiCoeff; it is spelled out here rather than taken from cfc:

matrixRiccatiCoeff h T t = U · diag (fun i ↦ riccatiCoeff (λ i) T t) · Uᴴ.

This equals  · tanh ( (T − t)) spectrally without ever constructing a matrix tanh, and the matrix Riccati ODE a' = a·a − · reduces, on each eigenvalue, to the scalar identity hasDerivAt_riccatiCoeff already proven.

Where this sits (the Riccati is one, approximate, view)

The Riccati is the LQ-approximation view of optimal market making, not the fundamental structure. For exponential order-arrival intensities the single-asset Avellaneda–Stoikov HJB equation is exactly linearisable — a Hopf–Cole change of variables turns it into a linear ODE system (Guéant–Lehalle–Fernandez-Tapia), i.e. a matrix-exponential object with no approximation. The exact multi-asset problem has no closed form, which is precisely why BEGV quadratically approximate the Hamiltonians to recover a solvable Riccati. So this module formalises the tractable approximate closed form (the spectral route below); the exact linearisation is the deeper, more faithful target (not formalised here; the matrix-exponential derivative it needs is Mathlib's hasDerivAt_exp_smul_const). Read the result as "this closed form solves this approximate Riccati", not as "optimal market making, mechanised".

We verify, in two layers:

  • §1 Abstract matrix Riccati — matrixRiccatiCoeff solves a'(t) = a(t)·a(t) − · with a(T) = 0 (matrix-valued HasDerivAt, taken under the L∞ operator norm — MathFin's committed instance; since n is finite the space is finite-dimensional, all norms are equivalent, and the derivative statement is norm-independent), for every Hermitian Â. This is the genuine multi-asset matrix tanh-Riccati closed form (an identification with ·tanh(Â(T−t)) made in prose under the Hermitian functional calculus — no matrix tanh is built here, though Mathlib's hÂ.cfc Real.tanh would give one).
  • §2 Market-making instantiation — with a positive diagonal D₊ and a symmetric Σ, and  the Hermitian square root scale · = γ • (D₊^{½} Σ D₊^{½}), the coefficient A(t) = ½ • (D₊^{-½} · matrixRiccatiCoeff h T t · D₊^{-½}) solves the market-making matrix Riccati A'(t) = 2 • (A(t) D₊ A(t)) − (γ/2) • Σ with A(T) = 0 (the paper's Eq. 11 in matrix form).

Scope (mirroring MarketMakingRiccati.lean)

We verify the closed-form solution of the approximate (quadratic-Hamiltonian) matrix Riccati system. Out of scope: the stochastic optimal-control substrate (existence/uniqueness of the true value function and the verification theorem linking it to optimal quotes); the B(t)/C(t) closed forms (matrix variation-of-parameters / integrals) and the general-d value-function verification; that the approximate value function approximates the true one; and the construction of  as a matrix square root (in §2  enters by its defining relation · = γ • (D₊^{½}ΣD₊^{½}), so the content is the change of variables, not matrix-square-root existence).

Main definitions

  • matrixRiccatiCoeff: for a Hermitian  = U diag(λ) Uᴴ, the matrix U · diag (riccatiCoeff (λᵢ) T t) · Uᴴ.
  • mmMatrixValueCoeff: the matrix ½ • (D₊^{-½} · a(t) · D₊^{-½}) with D₊ = diagonal d and a = matrixRiccatiCoeff.

Main results

  • matrixRiccatiCoeff_terminal, matrixRiccatiCoeff_isHermitian: a(T) = 0, and a(t) is Hermitian.
  • hasDerivAt_matrixRiccatiCoeff: a' = a·a − ·Â.
  • matrixRiccatiCoeff_spectral_sq: Â · Â = U · diag (λᵢ²) · Uᴴ.
  • mmMatrixValueCoeff_terminal: A(T) = 0.
  • hasDerivAt_mmMatrixValueCoeff: for d > 0, any matrix cov and  ·  equal to γ • (√D₊ · cov · √D₊), the coefficient satisfies A' = 2 • (A · D₊ · A) − (γ/2) • cov.

References

Tags

multi-asset market making, matrix Riccati equation, Avellaneda–Stoikov, spectral reduction, Hermitian functional calculus, inventory risk, MSC 91G80, MSC 49L20, JEL G14

Import neighbourhood

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

Corpus entries

mf-mm-matrix-riccati · market_microstructure.json · full statement
Matrix Riccati Coefficient — Multi-Asset Closed Form

The matrix analogue of the scalar market-making Riccati: the spectral closed form a(t)=U·diag(riccatiCoeff(λᵢ))·Uᴴ solves the matrix Riccati ODE a'=a·a−· for any Hermitian  (no matrix tanh required).

mf-mm-matrix-value · market_microstructure.json · full statement
Matrix Value Coefficient — Multi-Asset Market-Making Riccati

The change of variables A(t)=½·D₊^{-½}·matrixRiccatiCoeff·D₊^{-½} solves the market-making matrix Riccati A'=2·A·D₊·A−(γ/2)·Σ, given a positive diagonal D₊ and  with ·Â=γ·(D₊^{½}·Σ·D₊^{½}).

Declarations 8

defMathFin.matrixRiccatiCoeffsource
{n : Type u_1} → [Fintype n] → [DecidableEq n] → {Â : Matrix n n ℝ} → Â.IsHermitian → ℝ → ℝ → Matrix n n ℝ

Matrix Riccati coefficient a(t) = U · diag (riccatiCoeff (λᵢ) T t) · Uᴴ, the spectral closed form of the normalised matrix Riccati equation a' = a·a − · with terminal value a(T) = 0. Here U = hÂ.eigenvectorUnitary and λ = hÂ.eigenvalues diagonalise the Hermitian Â, and riccatiCoeff is the scalar Âᵢ · tanh (Âᵢ (T − t)).

theoremMathFin.matrixRiccatiCoeff_terminalsource
∀ {n : Type u_1} [Fintype n] [DecidableEq n] { : Matrix n n ℝ} (h : Â.IsHermitian) (T : ℝ), matrixRiccatiCoeff h T T = 0

Terminal condition: a(T) = 0.

theoremMathFin.matrixRiccatiCoeff_spectral_sqsource
∀ {n : Type u_1} [Fintype n] [DecidableEq n] { : Matrix n n ℝ} (h : Â.IsHermitian),  *  = (↑hÂ.eigenvectorUnitary * Matrix.diagonal fun i => hÂ.eigenvalues i ^ 2) * star ↑hÂ.eigenvectorUnitary

Spectral form of ²:  ·  = U · diag (λᵢ²) · Uᴴ. The conjugation M ↦ U · M · Uᴴ is a ⋆-algebra homomorphism, so  ·  = (U · diag λ · Uᴴ)² = U · diag λ² · Uᴴ by map_mul.

theoremMathFin.matrixRiccatiCoeff_isHermitiansource
∀ {n : Type u_1} [Fintype n] [DecidableEq n] { : Matrix n n ℝ} (h : Â.IsHermitian) (T t : ℝ), (matrixRiccatiCoeff h T t).IsHermitian

Symmetry: the matrix Riccati coefficient is Hermitian (its diagonal core is real, and conjugation by a unitary preserves Hermitian-ness) — the value function's Hessian is symmetric.

theoremMathFin.hasDerivAt_matrixRiccatiCoeffsource
∀ {n : Type u_1} [Fintype n] [DecidableEq n] { : Matrix n n ℝ} (h : Â.IsHermitian) (T t : ℝ), HasDerivAt (matrixRiccatiCoeff h T) (matrixRiccatiCoeff h T t * matrixRiccatiCoeff h T t -  * Â) t

Matrix Riccati ODE: a'(t) = a(t)·a(t) − · (matrix-valued derivative under the L∞ operator norm). The t-dependence lives entirely in the diagonal core; its derivative is diag (riccatiCoeff (λᵢ)² − λᵢ²) by the scalar hasDerivAt_riccatiCoeff, and conjugating by the constant U, Uᴴ and re-collapsing (star U · U = 1, map_mul) turns U · diag(riccatiCoeff² − λ²) · Uᴴ into a·a − ·Â.

defMathFin.mmMatrixValueCoeffsource
{n : Type u_1} → [Fintype n] → [DecidableEq n] → (n → ℝ) → {Â : Matrix n n ℝ} → Â.IsHermitian → ℝ → ℝ → Matrix n n ℝ

Market-making matrix value coefficient A(t) = ½ • (D₊^{-½} · a(t) · D₊^{-½}), the change of variables that turns the normalised matrix Riccati a (matrixRiccatiCoeff) into the solution of the market-making matrix Riccati A' = 2 A D₊ A − (γ/2) Σ. Here D₊ = diagonal d is the positive diagonal (α₂ᵢᵇ + α₂ᵢᵃ)zⁱ and D₊^{-½} = diagonal (√dᵢ)⁻¹.

theoremMathFin.mmMatrixValueCoeff_terminalsource
∀ {n : Type u_1} [Fintype n] [DecidableEq n] (d : n → ℝ) { : Matrix n n ℝ} (h : Â.IsHermitian) (T : ℝ), mmMatrixValueCoeff d h T T = 0

Terminal condition: A(T) = 0.

theoremMathFin.hasDerivAt_mmMatrixValueCoeffsource
∀ {n : Type u_1} [Fintype n] [DecidableEq n] (d : n → ℝ), (∀ (i : n), 0 < d i) → ∀ (cov : Matrix n n ℝ) (γ : ℝ) { : Matrix n n ℝ} (h : Â.IsHermitian),  *  = γ • ((Matrix.diagonal fun i => √(d i)) * cov * Matrix.diagonal fun i => √(d i)) → ∀ (T t : ℝ), HasDerivAt (mmMatrixValueCoeff d h T) (2 • (mmMatrixValueCoeff d h T t * Matrix.diagonal d * mmMatrixValueCoeff d h T t) - (γ / 2) • cov) t

Market-making matrix Riccati ODE: A'(t) = 2 • (A(t) D₊ A(t)) − (γ/2) • Σ, with D₊ = diagonal d positive and  the Hermitian generator scale · = γ • (D₊^{½} Σ D₊^{½}) (the paper's  = √γ (D₊^{½}ΣD₊^{½})^{½}). The change of variables collapses because D₊^{-½} D₊ D₊^{-½} = 1 and D₊^{-½} ² D₊^{-½} = γ Σ, reducing everything to the abstract matrix Riccati ODE hasDerivAt_matrixRiccatiCoeff.