Black Littermann#

sigtech.framework.analytics.math.black_littermann.equilibrium_returns(covariance, market_capitalization_weights, risk_aversion: Optional[float] = None) pandas.core.frame.DataFrame

Return market equilibrium returns (the prior distribution) using reverse optimization method. Also referred to as the Implied excess equilibrium return vector.

Please check this guide by Idzorek, for more information about the Black-Littermann model and how it is applied, as well as how to construct and define the inputs.

Note

All matrices passed in must have the same indices in the same order, regardless if they are DataFrames or ndarrays.

The implied excess equilibrium return vector is defined as:

\[\Pi = \lambda \Sigma w_{mkt}\]

Where:

  • \(\Pi\): Implied excess equilibrium return vector (N x 1 column vector).

  • \(\lambda\): Risk aversion coefficient.

  • \(\Sigma\): Covariance matrix of excess returns (N x N matrix).

  • \(w_{mkt}\): Market capitalisation weight (N x 1 column vector) of the assets.

Parameters
  • covariance – Covariance matrix of excess returns (N x N matrix).

  • risk_aversion – Risk aversion coefficient - float representing the expected risk/return trade-off.

  • market_capitalization_weights – Market capitalisation weight (N x 1 column vector) of the assets.

Returns

DataFrame of market equilibrium returns.

sigtech.framework.analytics.math.black_littermann.blended_returns(covariance, view_matrix, view_covariance, eq_returns, view_returns, tau: float = 1.0) pandas.core.frame.DataFrame

Return the new, blended return vector (the posterior distribution) according to the Black-Littermann formula. Also referred to as the Combined Return Vector.

Note

All matrices passed in must have the same indices in the same order, regardless if they are DataFrames or ndarrays.

Please check this guide by Idzorek, for more information about the Black-Littermann model and how it is applied, as well as how to construct and define the inputs.

Parameters
  • covariance – Covariance matrix of excess returns (N x N matrix).

  • view_matrix – A matrix that identifies the assets involved in the views (K x N matrix or 1 x N row vector in the special case of 1 view).

  • view_covariance – Diagonal covariance matrix of error terms from the expressed views representing the uncertainty in each view (K x K matrix).

  • eq_returns – Implied equilibrium return vector (N x 1 column vector).

  • view_returns – View vector (K x 1 column vector).

  • tau – Scalar to adjust covariance matrix.

Returns

DataFrame of the new (posterior) combined return vector (N x 1 column vector).

sigtech.framework.analytics.math.black_littermann.blended_weights(covariance_matrix, risk_aversion_coefficient: float, posterior_returns) pandas.core.frame.DataFrame

Back out the blended Black-Littermann model weights from the blended returns (the posterior distribution).

Note

All matrices passed in must have the same indices in the same order, regardless if they are DataFrames or ndarrays.

The function solves the following equation:

\[w = ( \lambda \Sigma )^{-1} \mu\]

Where:

  • \(w\) is the final blended Black-Littermann weights;

  • \(\lambda\) is the risk aversion coefficient;

  • \(\Sigma\) is the covariance matrix of the asset returns; and

  • \(\mu\) is the blended Black-Littermann vector of returns.

Parameters
  • covariance_matrix – Covariance matrix of excess returns (N x N matrix).

  • risk_aversion_coefficient – Risk aversion coefficient - float representing the expected risk/return trade-off.

  • posterior_returns – New (posterior) Combined Return Vector (N x 1 column vector).

Returns

Weights backed out from the given blended returns.