Here are the core Black-Litterman formulas as used in the canonical expression of the Black-Litterman model. The investor is uncertain in their estimates (prior and views), and expresses them as distributions of the unknown mean about the estimated mean. As a result, the posterior estimate is also a distribution.

Note that there are authors who do not use the canonical expression of the model. You can track down which authors use which expression of the model at author's methods.

Given the following inputs

w | Equilibrium market capitalization weights for each asset. |

Σ | Matrix of covariances between the assets. Usually computed from historical data. |

rf | Risk free rate |

δ | The risk aversion coeffficient of the market portfolio. This can be specified, or can be computed if the investor knows the market return and standard deviation of returns. |

τ | A measure of the uncertainty of the prior estimate of the mean returns. |

First we use reverse optimization to compute the vector of equilibrium returns, Π, using the following equation.

At this point the investor needs to quantify their uncertainty in the prior by selecting a value for τ. If the covariance matrix has been generated from historical data, then τ = 1/n is a good place to start.

Next the investor formulates their views, specifying P, Ω, and Q. Given k views and n assets, then P is a k × n matrix where each row sums to 0 (relative view) or 1 (absolute view). Q is a k × 1 vector of the excess returns for each view. Ω is a diagonal k × k matrix of the variance of the estimated view mean about the unknown view mean. As a starting point, some authors call for the diagonal values of Ω to be set equal to pTτΣp (where p is the row from P for the specific view). This weights the views the same as the prior estimates.

Next, we apply the Black-Litterman 'master equation' to compute the posterior estimate of the returns using the following equation.

Then we must compute the posterior variance of the estimated mean about the unknown mean using the following equation.

Closely followed by the computation of the variance of returns about the estimated mean. Note that because we have assumed the uncertainty in the estimates is independent of the known covariance of returns about the unknown mean, that we can just add the two together to get the covariance of retujrns about the estimated mean.

And now we can compute the portfolio weights for the optimal portfolio on the unconstrained efficient frontier. The Black-Litterman model does not require a specific method for portfolio choice. Here we use unconstrained mean variance optimization because it is very easy to understand, but you can add constraints or use another objective function such as CVAR.

Implementations in SciLab and MATLAB are available from here. For a more thorough discussion see my paper on the Black-Litterman model.