Equilibrium expected returns: private API
PortfolioOptimisers.equilibrium_mu — Function
equilibrium_mu(l::Number, sigma::MatNum, w::Option{<:VecNum})Compute equilibrium expected returns from a risk aversion parameter, a covariance block, and equilibrium weights.
equilibrium_mu is the single owner of the $\lambda \mathbf{\Sigma} \boldsymbol{w}$ expression and of its equal-weight fallback. EquilibriumExpectedReturns, FactorBlackLittermanPrior and AugmentedBlackLittermanPrior all reach it, so the fallback and the length check are stated once.
The result is an excess return. Reverse optimisation implies a risk premium, so no risk-free rate is in it. This is why the Black-Litterman members apply apply_rf to the result of this function, and only on the branch where they call it: a mean taken from a wrapped prior estimator is a total return already and needs no conversion.
sigma is a covariance block, not necessarily a square covariance matrix. Its columns are the assets the weights are written over, so size(sigma, 2) is the length w must have. A square covariance gives the plain equilibrium returns. A rectangular block gives the equilibrium returns of the rows it spans, which is how the factor Black-Litterman members build a prior mean over factors from asset weights.
Mathematical definition
\[\begin{align} \hat{\boldsymbol{\mu}}_{\text{eq}} &= \lambda \, \mathbf{\Sigma} \, \boldsymbol{w}\,. \end{align}\]
Where:
- $\lambda$: Risk aversion parameter.
- $\mathbf{\Sigma}$: $M \times N$ covariance block.
- $\boldsymbol{w}$: $N \times 1$ equilibrium portfolio weights.
Algorithm
- When
wisnothing, read the asset countNfromsize(sigma, 2), and build the equal-weight vectorfill(inv(N), N). - When
wis a vector, check thatlength(w)equalssize(sigma, 2). - Apply the expression above to
l,sigmaand the weights of step 1 or step 2, givingmu.
Arguments
l: Risk aversion parameter.sigma: Covariance block whose columns are the assets.w: Equilibrium weights, ornothingfor equal weights.
Validation
- If
wis a vector,length(w) == size(sigma, 2).
Returns
mu::VecNum: Equilibrium expected returns vector of lengthsize(sigma, 1).
Related