Class BlackLitterman

java.lang.Object
com.quantfinlib.optimization.BlackLitterman

public final class BlackLitterman extends Object
Black-Litterman expected returns: start from the market-implied equilibrium (reverse optimization of the market portfolio) and blend in investor views with explicit confidences — the standard cure for mean-variance optimizers' hypersensitivity to raw return estimates (Black and Litterman 1992; He and Litterman 1999).

With pick matrix P (k views × n assets), view returns Q, view covariance Ω = diag(ω) and prior Π ~ N(μ, τΣ):

  μ_BL = Π + τΣP'(PτΣP' + Ω)⁻¹(Q − PΠ)
 M    = [(τΣ)⁻¹ + P'Ω⁻¹P]⁻¹ = τΣ − τΣP'(PτΣP' + Ω)⁻¹PτΣ
 Σ_BL = Σ + M

M is the posterior covariance of the mean estimate and Σ_BL the covariance of next-period returns to hand to an optimiser (He and Litterman 1999, eq. 13). The update is computed in the k×k view space, so Σ need not be invertible. heLittermanOmega(double, double[][], double[][]) gives the usual default ω_i = (PτΣP')_ii, under which each view counts as much as the prior.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Posterior mean, posterior covariance of the mean M, and Σ + M.
  • Method Summary

    Modifier and Type
    Method
    Description
    static double[]
    heLittermanOmega(double tau, double[][] covariance, double[][] p)
    He-Litterman default view variances ω_v = (P·τΣ·P')_vv: each view is as uncertain as the prior's estimate of the same portfolio.
    static double[]
    impliedEquilibriumReturns(double riskAversion, double[][] covariance, double[] marketWeights)
    Equilibrium (implied) returns from the market portfolio: Π = δ Σ w_mkt.
    posterior(double tau, double[][] covariance, double[] equilibriumReturns, double[][] p, double[] q, double[] omegaDiag)
    Full posterior: mean, covariance of the mean and covariance of returns.
    static double[]
    posteriorReturns(double tau, double[][] covariance, double[] equilibriumReturns, double[][] p, double[] q, double[] omegaDiag)
    Posterior expected returns blending equilibrium and views.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • impliedEquilibriumReturns

      public static double[] impliedEquilibriumReturns(double riskAversion, double[][] covariance, double[] marketWeights)
      Equilibrium (implied) returns from the market portfolio: Π = δ Σ w_mkt.
    • posteriorReturns

      public static double[] posteriorReturns(double tau, double[][] covariance, double[] equilibriumReturns, double[][] p, double[] q, double[] omegaDiag)
      Posterior expected returns blending equilibrium and views.
      Parameters:
      tau - uncertainty scaling of the prior (typically 0.01–0.05), > 0
      p - pick matrix [views][assets]; empty = no views
      q - expected return of each view
      omegaDiag - variance (uncertainty) of each view, > 0
    • posterior

      public static BlackLitterman.Posterior posterior(double tau, double[][] covariance, double[] equilibriumReturns, double[][] p, double[] q, double[] omegaDiag)
      Full posterior: mean, covariance of the mean and covariance of returns.
    • heLittermanOmega

      public static double[] heLittermanOmega(double tau, double[][] covariance, double[][] p)
      He-Litterman default view variances ω_v = (P·τΣ·P')_vv: each view is as uncertain as the prior's estimate of the same portfolio.