Stochasta::Portfolio::BlackLitterman
Class methods
estimate_returns(prior_returns : Array(Float64), covariance : Array(Array(Float64)), p_matrix : Array(Array(Float64)), q_vector : Array(Float64), tau : Float64 = 0.025, omega : Array(Array(Float64)) | Nil = nil) : Array(Float64)
Computes the Black-Litterman expected returns vector Params:
- prior_returns: expected returns prior (Pi vector, size N)
- covariance: asset covariance matrix (Sigma matrix, size N x N)
- p_matrix: view picker matrix (P matrix, size K x N)
- q_vector: investor views vector (Q vector, size K)
- tau: scale factor of prior covariance (usually 0.025 to 0.05)
- omega: covariance of view uncertainty (K x K diagonal matrix, or estimated automatically if nil)
Invert matrix using Gauss-Jordan elimination
Matrix multiplication: A * B
Matrix-Vector multiplication: A * v