MathFin
Map / Choice · Portfolio choice / MathFin.Choice.Portfolio.BlackLittermanND

N-dimensional Black-Litterman posterior (matrix form)

MathFin.Choice.Portfolio.BlackLittermanNDMSC 91G10MSC 62F10JEL G11 source

The pre-existing Choice/Portfolio/BlackLitterman.lean derives the 1-D Bayesian update for a single asset with a single direct view. This file extends to the N-asset / m-view matrix formulation, the standard form used in production.

Setup

  • π : Fin n → ℝ — prior mean of expected returns.
  • Sg_inv : Matrix (Fin n) (Fin n) ℝ — prior precision (inverse covariance).
  • Q : Fin m → ℝ — view vector (target values).
  • P : Matrix (Fin m) (Fin n) ℝ — view-selection matrix (which linear combinations of μ the views talk about).
  • Om_inv : Matrix (Fin m) (Fin m) ℝ — view precision (inverse covariance of view noise).

Posterior identities

In the Gaussian prior/view model, the Bayesian-conjugate update gives

posterior_precision = Sg_inv + Pᵀ · Om_inv · P, (additive precision) posterior_precision · μ_post = Sg_inv · π + Pᵀ · Om_inv · Q. (normal equation)

The Gaussian conditioning behind these identities is not formalized: this file takes the normal equation as the definition of the posterior mean (IsBLPosteriorMean). When posterior precision is invertible, the posterior mean has the explicit form

μ_post = (posterior_precision)⁻¹ · (Sg_inv · π + Pᵀ · Om_inv · Q).

This file proves: (a) the explicit form satisfies the normal equation, (b) the solution to the normal equation is unique (when precision is invertible), and (c) for positive semidefinite precisions, every solution of the normal equation minimises the mixed-estimation loss of Theil and Goldberger,

½ (μ − π)ᵀ Sg_inv (μ − π) + ½ (Pμ − Q)ᵀ Om_inv (Pμ − Q),

the generalized-least-squares fit of μ to the prior and the views together — by the KKT sufficiency theorem of Choice/Portfolio/ConvexQPKKT.lean with no constraints.

Characterisations

The 1-D BlackLitterman.lean stated the posterior as a closed form and verified three equivalent forms (symmetric, precision-weighted, harmonic- variance). This file characterises the N-dim posterior as the unique solution of a linear system — the natural way to characterise it without ad-hoc inverses, and the way it is used in practice (LU/Cholesky solve rather than explicit inversion) — and as a minimiser of the mixed-estimation loss.

Connection to the 1-D module

At n = 1, m = 1, P = (1), Sg_inv = (1/s0sq), Om_inv = (1/s1sq) the normal equation below reduces to the scalar Bayesian update behind posteriorMean1d (Choice/Portfolio/BlackLitterman.lean); isBLPosteriorMean_one_dim makes this precise (the scalar posteriorMean1d is the BL posterior mean at n = 1), and the matrix form here is its N-asset generalisation.

Main definitions

  • blPosteriorPrecision: the posterior precision Sg_inv + Pᵀ·Om_inv·P.
  • blPrecisionWeightedMean: the right-hand side Sg_inv·π + Pᵀ·Om_inv·Q of the normal equation.
  • IsBLPosteriorMean: μ_post solves the Black-Litterman normal equation.
  • blPosteriorMean: the explicit solution, the inverse of the posterior precision applied to the precision-weighted mean (when the posterior precision is invertible).
  • blLoss: the Theil-Goldberger mixed-estimation loss, half the prior-precision-weighted squared distance from π plus half the view-precision-weighted squared distance of P·μ from Q.

Main results

  • blPosteriorMean_satisfies_normal_eq: when the posterior precision is invertible, the explicit form blPosteriorMean satisfies the normal equation IsBLPosteriorMean.
  • IsBLPosteriorMean.unique: solution to the normal equation is unique (when posterior precision is invertible); dot-notation h.unique.
  • blLoss_eq_qpObj: for symmetric Sg_inv and Om_inv, the mixed-estimation loss blLoss is the convex QP objective qpObj with Hessian the posterior precision, up to a constant.
  • IsBLPosteriorMean.blLoss_le: a solution of the normal equation minimises blLoss when Sg_inv and Om_inv are positive semidefinite.

References

Tags

Black-Litterman model, posterior precision, mixed estimation, Theil-Goldberger, normal equation, investor views, generalized least squares, MSC 91G10, MSC 62F10, JEL G11

Import neighbourhood

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

Corpus entries

mf-black-litterman-gls-minimizer · portfolio_and_performance.json · full statement
Black–Litterman Posterior Mean Minimises the Mixed-Estimation Loss

If μ_post solves the Black–Litterman normal equation (Σ⁻¹ + PᵀΩ⁻¹P) μ_post = Σ⁻¹π + PᵀΩ⁻¹Q and the precisions Σ⁻¹, Ω⁻¹ are positive semidefinite, then μ_post minimises the Theil–Goldberger mixed-estimation loss ½(μ − π)ᵀΣ⁻¹(μ − π) + ½(Pμ − Q)ᵀΩ⁻¹(Pμ − Q). The normal equation is taken as the definition of the posterior mean; its derivation by Gaussian conditioning is not formalized.

Declarations 10

defMathFin.blPosteriorPrecisionsource
{n m : ℕ} → Matrix (Fin n) (Fin n) ℝ → Matrix (Fin m) (Fin n) ℝ → Matrix (Fin m) (Fin m) ℝ → Matrix (Fin n) (Fin n) ℝ

N-dim BL posterior precision: additive Bayesian update of precision. posterior_precision = prior_precision + view_precision, where the view precision is Pᵀ · Om_inv · P (the information about μ provided by the linear views).

defMathFin.blPrecisionWeightedMeansource
{n m : ℕ} → (Fin n → ℝ) → (Fin m → ℝ) → Matrix (Fin n) (Fin n) ℝ → Matrix (Fin m) (Fin n) ℝ → Matrix (Fin m) (Fin m) ℝ → Fin n → ℝ

N-dim BL precision-weighted mean RHS: Sg_inv · π + Pᵀ · Om_inv · Q. This is the RHS of the BL normal equation.

defMathFin.IsBLPosteriorMeansource
{n m : ℕ} → (Fin n → ℝ) → (Fin n → ℝ) → (Fin m → ℝ) → Matrix (Fin n) (Fin n) ℝ → Matrix (Fin m) (Fin n) ℝ → Matrix (Fin m) (Fin m) ℝ → Prop

N-dim BL posterior mean as the normal-equation solution (variational characterisation). A vector μ_post : Fin n → ℝ is a BL posterior mean iff it satisfies

(Sg_inv + Pᵀ · Om_inv · P) · μ_post = Sg_inv · π + Pᵀ · Om_inv · Q.

This characterisation does not require the precision to be invertible — it is well-defined for any precision (the existence of a solution requires the RHS to be in the column span of the LHS; uniqueness requires invertibility).

defMathFin.blPosteriorMeansource
{n m : ℕ} → (Fin n → ℝ) → (Fin m → ℝ) → Matrix (Fin n) (Fin n) ℝ → Matrix (Fin m) (Fin n) ℝ → Matrix (Fin m) (Fin m) ℝ → Fin n → ℝ

Explicit form of the N-dim BL posterior mean (when posterior precision is invertible): apply the inverse to the precision-weighted mean.

theoremMathFin.blPosteriorMean_satisfies_normal_eqsource
∀ {n m : ℕ} (π : Fin n → ℝ) (Q : Fin m → ℝ) (Sg_inv : Matrix (Fin n) (Fin n) ℝ) (P : Matrix (Fin m) (Fin n) ℝ) (Om_inv : Matrix (Fin m) (Fin m) ℝ) [Invertible (blPosteriorPrecision Sg_inv P Om_inv)], IsBLPosteriorMean (blPosteriorMean π Q Sg_inv P Om_inv) π Q Sg_inv P Om_inv

Explicit form satisfies the normal equation (when posterior precision is invertible).

theoremMathFin.IsBLPosteriorMean.uniquesource
∀ {n m : ℕ} {μ_post π : Fin n → ℝ} {Q : Fin m → ℝ} {Sg_inv : Matrix (Fin n) (Fin n) ℝ} {P : Matrix (Fin m) (Fin n) ℝ} {Om_inv : Matrix (Fin m) (Fin m) ℝ} [Invertible (blPosteriorPrecision Sg_inv P Om_inv)], IsBLPosteriorMean μ_post π Q Sg_inv P Om_inv → μ_post = blPosteriorMean π Q Sg_inv P Om_inv

Uniqueness of the BL posterior mean (when posterior precision is invertible): any solution to the normal equation equals the explicit form.

theoremMathFin.isBLPosteriorMean_one_dimsource
∀ (π₀ Q₀ s0sq s1sq : ℝ), 0 < s0sq → 0 < s1sq → IsBLPosteriorMean ![posteriorMean1d π₀ Q₀ s0sq s1sq] ![π₀] ![Q₀] !![1 / s0sq] 1 !![1 / s1sq]

n = 1 recovers the scalar posterior: at n = m = 1, P = 1, Sg_inv = (1/s0sq), Om_inv = (1/s1sq), the scalar posteriorMean1d is the BL posterior mean — the 1-D case of the matrix normal equation, showing the N-asset form specialises to Choice/Portfolio/BlackLitterman.

defMathFin.blLosssource
{n m : ℕ} → (Fin n → ℝ) → (Fin m → ℝ) → Matrix (Fin n) (Fin n) ℝ → Matrix (Fin m) (Fin n) ℝ → Matrix (Fin m) (Fin m) ℝ → (Fin n → ℝ) → ℝ

Black–Litterman mixed-estimation loss (Theil–Goldberger): half the prior-precision-weighted squared distance of μ from the prior mean π, plus half the view-precision-weighted squared residual of the views P μ − Q.

theoremMathFin.blLoss_eq_qpObjsource
∀ {n m : ℕ} (π : Fin n → ℝ) (Q : Fin m → ℝ) {Sg_inv : Matrix (Fin n) (Fin n) ℝ}, Sg_inv.IsSymm → ∀ (P : Matrix (Fin m) (Fin n) ℝ) {Om_inv : Matrix (Fin m) (Fin m) ℝ}, Om_inv.IsSymm → ∀ (μ : Fin n → ℝ), blLoss π Q Sg_inv P Om_inv μ = qpObj (-blPrecisionWeightedMean π Q Sg_inv P Om_inv) (blPosteriorPrecision Sg_inv P Om_inv) μ + (1 / 2 * π ⬝ᵥ Sg_inv.mulVec π + 1 / 2 * Q ⬝ᵥ Om_inv.mulVec Q)

For symmetric precisions, the mixed-estimation loss is the convex QP objective qpObj with linear term −(Sg_inv π + Pᵀ Om_inv Q) and Hessian the posterior precision Sg_inv + Pᵀ Om_inv P, plus a constant: expanding the two quadratics, the cross terms are collected by symmetry and (Pμ) ⬝ (Om_inv x) = μ ⬝ (Pᵀ Om_inv x).

theoremMathFin.IsBLPosteriorMean.blLoss_lesource
∀ {n m : ℕ} {μ_post π : Fin n → ℝ} {Q : Fin m → ℝ} {Sg_inv : Matrix (Fin n) (Fin n) ℝ} {P : Matrix (Fin m) (Fin n) ℝ} {Om_inv : Matrix (Fin m) (Fin m) ℝ}, IsBLPosteriorMean μ_post π Q Sg_inv P Om_inv → Sg_inv.PosSemidef → Om_inv.PosSemidef → ∀ (μ : Fin n → ℝ), blLoss π Q Sg_inv P Om_inv μ_post ≤ blLoss π Q Sg_inv P Om_inv μ

The Black–Litterman posterior mean minimises the mixed-estimation loss. If μ_post solves the normal equation and the prior and view precisions are positive semidefinite, then blLoss μ_post ≤ blLoss μ for every μ: the posterior mean is the generalized-least-squares fit of μ to the prior and the views (Theil–Goldberger mixed estimation). Proof: blLoss_eq_qpObj and the unconstrained case (κ = Fin 0) of kkt_sufficient_of_eq, whose stationarity condition is the normal equation; the posterior precision Sg_inv + Pᵀ Om_inv P is positive semidefinite as a sum of positive semidefinite matrices.