Skip to content

Portfolio

Black-Litterman expected returns and weights

Equilibrium returns from market weights, views blended in with He-Litterman or Idzorek uncertainty, the posterior returns and covariance, and the unconstrained optimal weights.

Model id
portfolio.black_litterman, version 1
Domain
Portfolio
Evidence
standard
Cost class
instant: A closed-form calculation; a hosted run may take up to 2 seconds.

Formula

Π=δΣwmkt\Pi = \delta \Sigma w_{\mathrm{mkt}}μ=Π+τΣP′(PτΣP′+Ω)−1(Q−PΠ)\mu = \Pi + \tau\Sigma P'(P\tau\Sigma P' + \Omega)^{-1}(Q - P\Pi)M=τΣ−τΣP′(PτΣP′+Ω)−1PτΣM = \tau\Sigma - \tau\Sigma P'(P\tau\Sigma P' + \Omega)^{-1}P\tau\SigmaΩHL=diag(PτΣP′),ωk=1−ckck pkτΣpk′\Omega_{\mathrm{HL}} = \mathrm{diag}(P\tau\Sigma P'), \quad \omega_k = \frac{1 - c_k}{c_k}\, p_k \tau\Sigma p_k'w=(δΣ)−1μ=wmkt+τδP′(PτΣP′+Ω)−1(Q−PΠ)\begin{aligned} w &= (\delta\Sigma)^{-1}\mu \\ &= w_{\mathrm{mkt}} + \tfrac{\tau}{\delta} P'(P\tau\Sigma P' + \Omega)^{-1}(Q - P\Pi) \end{aligned}wHL=(δ(Σ+M))−1μw_{\mathrm{HL}} = (\delta(\Sigma + M))^{-1}\mu

Where

Π\Pi
The equilibrium excess returns the market's weights imply equilibrium_returns
δ\delta
Risk aversion of the market risk_aversion
Σ\Sigma
Covariance matrix of the assets' returns covariance
wmktw_{\mathrm{mkt}}
The market's weights market_weights
μ\mu
Posterior expected excess returns posterior_returns
τ\tau
The scale of the uncertainty in the equilibrium returns tau
PP
The pick matrix: one row for each view, giving the assets it is about picks
QQ
The returns the views expect view_returns
Ω\Omega
The views' uncertainty: the variance of each view view_variances
MM
The uncertainty left in the expected returns after the views
ΩHL\Omega_{\mathrm{HL}}
He and Litterman's view uncertainty, in proportion to the prior's
ωk\omega_k
Idzorek's variance of view k, from the confidence in it
ckc_k
The confidence in view k, between 0 and 1 confidences
pkp_k
Row k of the pick matrix
ww
The weights the posterior returns imply weights
wHLw_{\mathrm{HL}}
He and Litterman's weights, under the posterior covariance posterior_weights

Each symbol's field is named beside it; the inputs and outputs, with their units and bounds, are under Variables, and the citations give each formula's source.

Variables

Rates, returns and yields are decimals: 0.05 is five percent. Bounds in brackets include their end; in parentheses they exclude it.

Inputs

Inputs
NameDescription
Covariancecovarianceratio (array) (array) · each length min 1, max 100; each [-100, 100]Covariance matrix of the asset returns per period, as rows; or give volatilities and correlations, or returns
Volatilitiesvolatilitiesvolatility (array) · each (0, 10]Volatility of each asset per period, with correlations
Correlationscorrelationscorrelation (array) (array) · each length min 1, max 100; each [-1, 1]Correlation matrix of the asset returns, as rows, with volatilities
Returnsreturnsreturn (array) (array) · each length min 1, max 100; each [-1, 5]The assets' returns, as rows: one per period, one value per asset; their sample covariance (divisor T - 1) is used
Market weightsmarket_weightsratio (array) · length min 1, max 100; each [0, 1]Each asset's weight in the market portfolio
Risk aversionrisk_aversionratio · [0.001, 100]The market's risk aversion delta, the excess return per unit of variance (He and Litterman use 2.5)
Tautauratio · [1e-06, 1]The uncertainty of the equilibrium, relative to Sigma
Pickspicksratio (array) (array) · length min 1, max 100; each length min 1, max 100; each [-10, 10]The pick matrix P: one row per view, one weight per asset (a relative view's row sums to zero, an absolute view's has a single 1)
View returnsview_returnsreturn (array) · each [-10, 10]Q: each view portfolio's expected return per period
ConfidenceconfidencetextHow the views' uncertainty is set: 'he_litterman', Omega = diag(P tau Sigma P'), or 'idzorek', from confidence levels
Confidencesconfidencesprobability (array) · each [1e-06, 1]Idzorek's confidence in each view, from near 0 to 1 (certain); only with confidence='idzorek'

Outputs

Outputs
NameDescription
Equilibrium returnsequilibrium_returnsreturn (array) · length max 100; each [-1e+06, 1e+06]Pi = delta Sigma w_mkt: the returns that make the market optimal
Posterior returnsposterior_returnsreturn (array) · length max 100; each [-1e+09, 1e+09]The Black-Litterman expected returns per period
Posterior covarianceposterior_covarianceratio (array) (array) · length max 100; each length max 100; each [-200, 200]Sigma + M: the posterior covariance of returns, as rows
Weightsweightsratio (array) · length max 100; each [-1e+09, 1e+09]The unconstrained optimal weights (delta Sigma)^-1 mu: the market's with no views
Posterior weightsposterior_weightsratio (array) · length max 100; each [-1e+09, 1e+09]He and Litterman's weights against the posterior covariance, (delta (Sigma + M))^-1 mu
View variancesview_variancesratio (array) · length max 100; each [0, 1e+15]The diagonal of Omega, one variance per view; empty with no views

Calculator

Run the model on your own inputs, starting from its example. Rates are decimals: 0.05 is five percent. The run goes to the pyeconomics API on this site: your values travel only in the request, and nothing is stored.

Live data runs on your own computer only

This model reads Twelve industry portfolios, monthly. Its source, Ken French Data Library, lets pyeconomics read the data on your own computer but not serve them from this website.

Here, enter your own values, or bring them as a file with "Use my own data". To run this page with every profile's live data, install the local app and start it: pip install "pyeconomics[app]" then pyeconomics serve.

Loading the calculator…

Worked example

The first asset outperforms the second by 0.2% a period.

Example three_assets_one_view. Inputs:

{
  "confidence": "he_litterman",
  "confidences": null,
  "correlations": [
    [1, 0.5, 0.3],
    [0.5, 1, 0.4],
    [0.3, 0.4, 1]
  ],
  "covariance": null,
  "market_weights": [0.5, 0.3, 0.2],
  "picks": [
    [1, -1, 0]
  ],
  "returns": null,
  "risk_aversion": 2.5,
  "tau": 0.05,
  "view_returns": [0.002],
  "volatilities": [0.16, 0.2, 0.24]
}

Outputs:

{
  "equilibrium_returns": [0.049760000000000006, 0.05960000000000001, 0.0576],
  "posterior_covariance": [
    [
      0.026811428571428573,
      0.01697142857142857,
      0.012150857142857142
    ],
    [
      0.01697142857142857,
      0.041571428571428586,
      0.020022857142857144
    ],
    [
      0.012150857142857142,
      0.020022857142857144,
      0.060436114285714285
    ]
  ],
  "posterior_returns": [
    0.05145142857142858,
    0.05537142857142858,
    0.05624685714285714
  ],
  "posterior_weights": [
    0.5422266467562634,
    0.2196781151484985,
    0.19047619047619044
  ],
  "view_variances": [0.0016800000000000005],
  "weights": [0.5704761904761905, 0.22952380952380952, 0.2]
}

Assumptions

  • The market portfolio is mean-variance optimal for the risk aversion given; returns are per period, as the covariance is.
  • Views are portfolios of the assets with normally distributed expected returns; Idzorek's confidence c moves the returns a share c of the way to a certain view, each view taken alone.
  • Profile: default binds 120 months of the Ken French 12 industry portfolios' returns for the covariance; the market weights and the views are the user's own.
  • The outputs follow from the inputs the user supplies, the same for every user: they are formula results, not investment advice.

Limitations

  • A covariance matrix that is not symmetric and positive definite to working precision raises DomainError; so do certain views that are combinations of each other, and an output beyond its bounds.
  • tau, the risk aversion and the confidences are judgement calls the results depend on; the model does not estimate them.
  • The weights are unconstrained (short sales allowed); long-only and other constraints are not supported.
  • The Ken French portfolios are library-only: fetched at run time and never stored.

Evidence

Status: standard. Textbook consensus, such as bond duration or the CAPM formula.

Every model declares one status: standard (textbook consensus), practitioner (a widely used convention), contested (under active debate), rejected (failed out of sample) or historical (a superseded methodology).

Syllabus

The 2027 CFA® Program's topic areas this model relates to, as factual tags. Each links to CFA Institute's page for its level; pyeconomics holds none of the curriculum's text.

Data

This model can read its data for you: each bound field names a data series, and the sources listed can fill it, in the order they are tried. This website reads only the sources whose terms let it serve their data (marked "hosted"); every source is available when you run pyeconomics on your own computer.

Profile: Default
FieldConceptRead asSources (licence class; hosted)
returnsTwelve industry portfolios, monthlyportfolios.industry12.us.monthlythe last 120 observations on or before the date; real time: as published by the date
  • Ken French Data Library (library-only; not hosted)

Citations

  1. Black, F. and Litterman, R. (1992). Global Portfolio Optimization. Financial Analysts Journal, 48(5), 28-43. doi:10.2469/faj.v48.n5.28 (Equilibrium returns and the combination of views with them)
  2. He, G. and Litterman, R. (2002). The Intuition Behind Black-Litterman Model Portfolios. SSRN working paper 334304; first issued by Goldman Sachs Investment Management Research, 1999. doi:10.2139/ssrn.334304 (Eqs. (8)-(13) and (17), pp. 4-7: the posterior, Sigma + M and the weights (w_eq + P' Lambda) / (1 + tau); omega = tau p Sigma p' in the 1999 version's footnote 6)
  3. Idzorek, T. M. (2005). A Step-by-Step Guide to the Black-Litterman Model: Incorporating User-Specified Confidence Levels. Ibbotson Associates working paper; in Forecasting Expected Returns in the Financial Markets (2007), ch. 2, Elsevier. doi:10.1016/B978-075068321-0.50003-0 (Formula (2), the weights against Sigma; eq. (9), the 100% confidence posterior; section 3, confidence levels from 0% to 100%, which the closed form here solves exactly)
  4. French, K. R. Data Library: 12 industry portfolios, monthly. Tuck School of Business, Dartmouth College. https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html (12 Industry Portfolios, value-weighted monthly returns)

Changelog

  • Version 1: First version.

Use it elsewhere

Documentation
The model's reference page
REST API
GET or POST /v1/models/portfolio.black_litterman/run
MCP tool
run_model with the model's id, portfolio.black_litterman. Connect an assistant
Command line
pyeconomics models run portfolio.black_litterman --help

The worked example, from Python and from the command line:

Python
import pyeconomics

inputs = {
    "confidence": "he_litterman",
    "confidences": None,
    "correlations": [
        [1, 0.5, 0.3],
        [0.5, 1, 0.4],
        [0.3, 0.4, 1],
    ],
    "covariance": None,
    "market_weights": [0.5, 0.3, 0.2],
    "picks": [
        [1, -1, 0],
    ],
    "returns": None,
    "risk_aversion": 2.5,
    "tau": 0.05,
    "view_returns": [0.002],
    "volatilities": [0.16, 0.2, 0.24],
}
result = pyeconomics.run("portfolio.black_litterman", inputs)
print(result.to_json())
Command line
pyeconomics models run portfolio.black_litterman --inputs - <<'JSON'
{
  "confidence": "he_litterman",
  "confidences": null,
  "correlations": [
    [1, 0.5, 0.3],
    [0.5, 1, 0.4],
    [0.3, 0.4, 1]
  ],
  "covariance": null,
  "market_weights": [0.5, 0.3, 0.2],
  "picks": [
    [1, -1, 0]
  ],
  "returns": null,
  "risk_aversion": 2.5,
  "tau": 0.05,
  "view_returns": [0.002],
  "volatilities": [0.16, 0.2, 0.24]
}
JSON