quantlab.portfolio.predefined.black_litterman#

Black-Litterman on a factor risk model: BlackLittermanOptimizer.

A mean-variance rule (ADR 0047) whose expected return and covariance are a Black-Litterman posterior: an equilibrium prior from the declared market portfolio, blended with the views of the rule’s expected return model by Bayes’ rule, in the risk model’s factor space. Returns are r = B f + e, the factor returns and the specific returns with prior means pi_f and pi_e and prior covariances tau F and tau diag(D), so the expected return has the prior N(pi, tau Sigma), Sigma = B F B' + diag(D) the forecast over the expected-return label’s span. A symbol view says mu_j = q_j, q_j the expected return model’s mu_j (a total return) or the equilibrium return plus it (an alpha, views_relative_to_prior), with variance omega_j: tau Sigma_jj (He-Litterman), tau (1 - C)/C Sigma_jj (Walters’ closed form of Idzorek’s confidence C) or tau D_j (the specific variance). The posterior mean and the posterior covariance Sigma + M, M the posterior mean’s uncertainty, are solved on the factor dimension: one K x K solve, never a symbol-by-symbol inverse, and the posterior covariance is diagonal plus rank 2K, the factor form the optimiser’s risk term reads.

The equilibrium pi = delta (Sigma + M) w is the expected return that makes the market w optimal under the covariance the rule optimises on, delta the rule’s risk_aversion: with no views (M = tau Sigma) the decided book is the market, and views equal to pi leave it there. pi splits as pi_f = delta F x and pi_e = pi - B pi_f, x = B' w the market’s factor exposures (market_exposures).

The user’s views (ReturnView: FactorReturnView, RelativeFactorReturnView, MarketReturnView) are views on the factor returns alone: a factor view says f_k = q, a relative one f_k - f_l = q, a market view x' f = q (the market’s specific return neglected), q an annualised return times span / 252, with variance tau (1 - C)/C p' F p (Idzorek’s confidence C, p the view’s row) or the squared standard deviation, converted the same way. They update the factor prior first, N(pi_f, tau F) to N(f_1, F_1), in the form that takes a zero variance; the symbol views then update that, which is the one Bayes update over all the views, since the views’ errors are independent. A view is constant or a series read point-in-time from a store, the last finite value dated at or before the bar; a view not known yet at a bar, or on a factor the bar’s forecast lacks, is left out at that bar.

The approximate backtest runs this rule (quantlab.portfolio.predefined.approximate.black_litterman), handing moments each bar’s arrays.

Classes

BlackLittermanOptimizer

Mean-variance weights on a Black-Litterman posterior.

FactorReturnView

The user's view on one risk-model factor's return, for BlackLittermanOptimizer.

MarketReturnView

The user's view on the market portfolio's return, for BlackLittermanOptimizer.

RelativeFactorReturnView

The user's view on one risk-model factor's return less another's, for BlackLittermanOptimizer.

ReturnView

Base class of the user's views of a BlackLittermanOptimizer: one portfolio's return.