Bayesian Black-Litterman Model
The Bayesian Black-Litterman Model of Kolm and Ritter (2017) puts the views on the factors of a factor model rather than on the assets: the prior is the factor model itself, with the historical average factor returns as the prior factor premiums, the views update those premiums, and the asset returns follow from the model. It takes views on the factors only, never on the assets, and needs no market weights.
The formula for the Bayesian Black-Litterman Model starts from the prior factor premiums \(\mu_{f}\), the historical average factor returns with uncertainty \(\tau \cdot \text{Sigma}_{f}\), and the views on the factors as the rows of P with the view returns Q and the uncertainties Omega; the posterior premiums \(\text{Pi}_{\text{hat}}\) and their uncertainty \(S_{\text{hat}}\) are:
\[S_{\text{hat}} = \tau \cdot \Sigma_{f} - \tau \cdot \Sigma_{f} \cdot P' \cdot (P \cdot \tau \cdot \Sigma_{f} \cdot P' + \Omega)^{-1} \cdot P \cdot \tau \cdot \Sigma_{f}\] \[\Pi_{\text{hat}} = \mu_{f} + \tau \cdot \Sigma_{f} \cdot P' \cdot (P \cdot \tau \cdot \Sigma_{f} \cdot P' + \Omega)^{-1} \cdot (Q - P \cdot \mu_{f})\]The asset returns and their covariance follow from the factor model, with alpha the intercepts, B the loadings and D the residual variances of the assets:
\[\mu = \alpha + B \cdot \Pi_{\text{hat}}\] \[\Sigma_{\text{Post}} = B \cdot \Sigma_{f} \cdot B' + D + B \cdot S_{\text{hat}} \cdot B'\]Without views the expected return of every asset is its average return, \(\alpha + B \cdot \mu_{f}\), and the weights are the mean-variance portfolio of mu and Sigma_Post; a view on a factor moves every asset in proportion to its loading on that factor.
The model of Black and Litterman (1992) starts from the returns at which holding the market portfolio is optimal and moves them towards the views of the investor, in proportion to the confidence in each. Historical average returns make mean-variance weights extreme and unstable; starting from the market keeps the weights at the market weights without views, and only the views move them away.
Views are absolute ({“AAPL”: 0.10}: AAPL returns 10% a year in total, risk free rate included) or relative ({“AAPL-MSFT”: 0.02}: AAPL beats MSFT by 2% a year). Without a confidence, a view is as uncertain as the variance of the view portfolio scaled by tau, the uncertainty of the implied returns relative to the covariance (He and Litterman, 1999); a confidence c scales that by (1 - c) / c, the method of Idzorek (2005) in the closed form of Walters (2014), so a confidence of 0.5 keeps that uncertainty and one close to 1 moves the return all the way to the view. The risk aversion is 2.5 by default, the value He and Litterman (1999) use for the world market, or the one the benchmark implies, its annualized average excess return over its annualized variance. The weights are the mean-variance portfolio of the posterior returns with the same risk aversion. Without views, or with relative views only, the risk free rate shifts every return by the same amount and leaves the weights unchanged; an absolute view is compared with the implied total return, so there it matters.
Also known as: Bayesian Black-Litterman, BLB, factor model views.
In the Finance Toolkit this is get_black_litterman_weights with method="bayesian", the same function as Black-Litterman.
Example · AAPL, MSFT, JNJ, XOM · 2021 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_black_litterman_weights:
from financetoolkit import Toolkit
toolkit = Toolkit(
["AAPL", "MSFT", "JNJ", "XOM"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
# The Bayesian model takes its views on the Fama and French factors
toolkit.portfolio.get_black_litterman_weights(
method="bayesian", factor_views={"HML": 0.03, "SMB-HML": 0.01}
)
| Parameter | Type | Description | Example |
|---|---|---|---|
views | dict[str, float] | None | The annualized views, absolute views as total returns, as described above, for the standard and augmented models (the Bayesian model takes factor views only). Defaults to None, which returns the market implied returns. | None, which returns the market implied returns |
view_confidences | dict[str, float] | None | The confidence per view, between 0 and 1. Defaults to None, which sets each view’s uncertainty to the variance of the view scaled by tau. | None, which sets each view's uncertainty to the variance of the view scaled by tau |
market_weights | dict[str, float] | None | The market weight per asset. Defaults to None, which uses the market capitalizations of the assets. | None, which uses the market capitalizations of the assets |
risk_aversion | float | str | The risk aversion \(\delta\) of the market, or “market” for the one the benchmark implies, \((E [r_{m}] - r_{f}) / \sigma_{m}^{2}\), with the benchmark’s arithmetic average return and variance (ddof=1) per period both annualized by the number of periods in a year. Defaults to 2.5. | 2.5 |
tau | float | The uncertainty of the implied returns relative to the covariance matrix. Defaults to 0.05. | 0.1 |
method | str | The model. Options are: “standard” (Black-Litterman Model, views on assets), “augmented” (Augmented Black-Litterman Model, views on assets and factors), “bayesian” (Bayesian Black-Litterman Model, views on factors only, given as factor_views). Defaults to “standard”. | "standard" |
factor_views | dict[str, float] | None | The annualized views on factors, a premium ({“HML”: 0.03}) or the difference of two ({“SMB-HML”: 0.01}), for the augmented and Bayesian models. Defaults to None. | None |
factor_view_confidences | dict[str, float] | None | The confidence per factor view, between 0 and 1. Defaults to None, which sets each view’s uncertainty to the variance of the view scaled by tau. | None, which sets each view's uncertainty to the variance of the view scaled by tau |
factors | pd.DataFrame | None | The factor returns, one column per factor, at the frequency of the period. Defaults to None, the Fama and French five factors of the region. | None, the Fama and French five factors of the region |
region | str | The region of the Fama and French factors. Defaults to “United States”. | "Europe" |
period | str | The frequency of the returns the covariance matrix is estimated from. Options are: “daily” (daily returns), “weekly” (weekly returns), “monthly” (monthly returns), “quarterly” (quarterly returns), “yearly” (yearly returns). Defaults to “daily”. | "weekly" |
covariance | str | The estimator of the covariance matrix. The shrinkage and denoised estimators stabilize the weights when there are many assets compared to the number of periods. Options are: “sample” (the sample covariance, ddof=1), “ledoit_wolf” (shrunk towards the scaled identity, Ledoit and Wolf, 2004), “ledoit_wolf_constant_correlation” (shrunk towards the average correlation, Ledoit and Wolf, 2004), “ledoit_wolf_single_factor” (shrunk towards the covariance that the benchmark as a single factor implies, Ledoit and Wolf, 2003), “oas” (Oracle Approximating Shrinkage, Chen et al., 2010), “shrunk” (a fixed 10% towards the scaled identity), “semicovariance” (the co-movement below a zero return, Estrada, 2008), “exponential” (exponentially weighted, recent periods weigh most, RiskMetrics), “denoised” (the eigenvalues of the correlation matrix that random returns could produce averaged, Laloux et al., 2000), “denoised_spectral” (those eigenvalues set to zero), “denoised_shrink” (the noise correlations shrunk towards their diagonal, López de Prado, 2020), “gerber” (co-movements beyond half a standard deviation, Gerber et al., 2022), “factor” (the covariance of the Fama and French five factor model with OLS loadings, Fama and French, 1993), “minimum_covariance_determinant” (the reweighted covariance of the half of the periods with the smallest covariance determinant, robust to outliers, Rousseeuw and Van Driessen, 1999), “jlogo” (the sparse inverse covariance on the TMFG planar graph of the correlations, Barfuss et al., 2016), “geodesic” (10% towards the scaled identity along the geodesic of the positive definite matrices, Bhatia, 2007), “regime_adjusted_ew” (exponentially weighted with a half-life of 40 periods, rescaled by the recent realized against predicted risk, Paleologo, 2025), “nercome” (eigenvectors from one part of the periods and the variances along them from the other, averaged over random splits, Lam, 2016), “ccc_garch” (the next-period covariance of GARCH(1, 1) volatilities with constant correlations, Bollerslev, 1990), “mm” (the robust MM-estimator, Maronna et al., 2019), “rocke” (Rocke’s robust S-estimator, Maronna et al., 2019). Defaults to “sample”. | "sample" |
covariance_span | int | The span in periods of the exponentially weighted covariance; the weight of a period halves after about span / 2.9 periods. Defaults to 180. | 180 |
minimum_weight | float | dict[str, float] | The lowest weight of every asset, or per asset, e.g. {“AAPL”: 0.05} (the others keep 0); a negative value allows short positions. Defaults to 0. | 0 |
maximum_weight | float | dict[str, float] | The highest weight of every asset, or per asset, e.g. {“AAPL”: 0.3} (the others keep 1). Defaults to 1. | 1 |
sector_bounds | dict[str, tuple[float, float]] | None | The minimum and maximum total weight per sector, e.g. {“Technology”: (0, 0.4)}, with the sector of each asset from its company profile. Defaults to None. | None |
country_bounds | dict[str, tuple[float, float]] | None | The minimum and maximum total weight per country, named in full or by its two-letter code, e.g. {“United States”: (0, 0.6)}, with the country of each asset from its company profile. Defaults to None. | None |
net_exposure | float | The sum of the weights: 1 for a fully invested portfolio, 0 for a market neutral one (which needs a negative minimum_weight). The rest, 1 minus the net exposure, is a Cash row at the risk free rate (negative when borrowed above one), which the Portfolio’s Expected Return and Sharpe Ratio include. Defaults to 1. | 1 |
gross_exposure | float | None | The highest sum of the absolute weights, which limits the leverage of a long-short portfolio, e.g. 1.6 for a 130/30 portfolio. Defaults to None, no limit. | None, no limit |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the Toolkit’s rounding. | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
Which returns:
| Item | Prior Return | Black-Litterman Return | Posterior Volatility | Weight |
|---|---|---|---|---|
| AAPL | 0.1932 | 0.2302 | 0.2822 | 0.0455 |
| MSFT | 0.2017 | 0.2385 | 0.2605 | 0.3802 |
| JNJ | 0.0977 | 0.0917 | 0.1677 | 0.0000 |
| XOM | 0.2911 | 0.2729 | 0.2725 | 0.5743 |
4 rows
References
- Paper Kolm, P. and Ritter, G. (2017). “On the Bayesian Interpretation of Black-Litterman.” European Journal of Operational Research, 258(2), 564-572.
- Library Referenced against Riskfolio-Lib’s black_litterman_bayesian (Bayesian Black-Litterman Model)