Augmented Black-Litterman Prior
PortfolioOptimisers.AugmentedBlackLittermanPrior Type
struct AugmentedBlackLittermanPrior{T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
T14, T15} <: AbstractLowOrderPriorEstimator_F
a_pe::T1
f_pe::T2
mp::T3
re::T4
ve::T5
a_views::T6
f_views::T7
a_sets::T8
f_sets::T9
a_views_conf::T10
f_views_conf::T11
w::T12
rf::T13
l::T14
tau::T15
endAugmented Black-Litterman prior estimator for asset returns.
AugmentedBlackLittermanPrior is a low order prior estimator that computes the mean and covariance of asset returns using an augmented Black-Litterman model. It combines asset and factor prior estimators, matrix post-processing, regression and variance estimators, asset and factor views, asset and factor sets, view confidences, weights, risk-free rate, leverage, and a blending parameter tau. This estimator supports both direct and constraint-based views, flexible confidence specification, and matrix processing, and incorporates joint asset-factor Bayesian updating for posterior inference.
Fields
a_pe: Asset prior estimator.f_pe: Factor prior estimator.mp: Matrix post-processing estimator.re: Regression estimator for factor loadings.ve: Variance estimator for residuals.a_views: Asset views estimator or views object.f_views: Factor views estimator or views object.a_sets: Asset sets.f_sets: Factor sets.a_views_conf: Asset view confidence(s).f_views_conf: Factor view confidence(s).w: Optional weights for assets.rf: Risk-free rate.l: Optional leverage parameter.tau: Blending parameter. When computing the prior, ifnothing, defaults to1/TwhereTis the number of observations.
Constructor
AugmentedBlackLittermanPrior(; a_pe::AbstractLowOrderPriorEstimator_A_AF = EmpiricalPrior(),
f_pe::AbstractLowOrderPriorEstimator_A_AF = EmpiricalPrior(),
mp::AbstractMatrixProcessingEstimator = DefaultMatrixProcessing(),
re::AbstractRegressionEstimator = StepwiseRegression(),
ve::AbstractVarianceEstimator = SimpleVariance(),
a_views::Union{<:LinearConstraintEstimator,
<:BlackLittermanViews},
f_views::Union{<:LinearConstraintEstimator,
<:BlackLittermanViews},
a_sets::Union{Nothing, <:AssetSets} = nothing,
f_sets::Union{Nothing, <:AssetSets} = nothing,
a_views_conf::Union{Nothing, <:Real, <:AbstractVector} = nothing,
f_views_conf::Union{Nothing, <:Real, <:AbstractVector} = nothing,
w::Union{Nothing, <:AbstractVector} = nothing, rf::Real = 0.0,
l::Union{Nothing, <:Real} = nothing,
tau::Union{Nothing, <:Real} = nothing)Keyword arguments correspond to the fields above.
Validation
If
wis provided,!isempty(w).If
a_viewsis aLinearConstraintEstimator,!isnothing(a_sets).If
f_viewsis aLinearConstraintEstimator,!isnothing(f_sets).If
a_views_confis notnothing, validated withassert_bl_views_conf.If
f_views_confis notnothing, validated withassert_bl_views_conf.If
tauis notnothing,tau > 0.
Examples
julia> AugmentedBlackLittermanPrior(;
a_sets = AssetSets(; key = "nx",
dict = Dict("nx" => ["A", "B", "C"])),
f_sets = AssetSets(; key = "fx",
dict = Dict("fx" => ["F1", "F2"])),
a_views = LinearConstraintEstimator(;
val = ["A == 0.03",
"B + C == 0.04"]),
f_views = LinearConstraintEstimator(;
val = ["F1 == 0.01",
"F2 == 0.02"]))
AugmentedBlackLittermanPrior
a_pe ┼ EmpiricalPrior
│ ce ┼ PortfolioOptimisersCovariance
│ │ ce ┼ Covariance
│ │ │ me ┼ SimpleExpectedReturns
│ │ │ │ w ┴ nothing
│ │ │ ce ┼ GeneralCovariance
│ │ │ │ ce ┼ StatsBase.SimpleCovariance: StatsBase.SimpleCovariance(true)
│ │ │ │ w ┴ nothing
│ │ │ alg ┴ Full()
│ │ mp ┼ DefaultMatrixProcessing
│ │ │ pdm ┼ Posdef
│ │ │ │ alg ┴ UnionAll: NearestCorrelationMatrix.Newton
│ │ │ denoise ┼ nothing
│ │ │ detone ┼ nothing
│ │ │ alg ┴ nothing
│ me ┼ SimpleExpectedReturns
│ │ w ┴ nothing
│ horizon ┴ nothing
f_pe ┼ EmpiricalPrior
│ ce ┼ PortfolioOptimisersCovariance
│ │ ce ┼ Covariance
│ │ │ me ┼ SimpleExpectedReturns
│ │ │ │ w ┴ nothing
│ │ │ ce ┼ GeneralCovariance
│ │ │ │ ce ┼ StatsBase.SimpleCovariance: StatsBase.SimpleCovariance(true)
│ │ │ │ w ┴ nothing
│ │ │ alg ┴ Full()
│ │ mp ┼ DefaultMatrixProcessing
│ │ │ pdm ┼ Posdef
│ │ │ │ alg ┴ UnionAll: NearestCorrelationMatrix.Newton
│ │ │ denoise ┼ nothing
│ │ │ detone ┼ nothing
│ │ │ alg ┴ nothing
│ me ┼ SimpleExpectedReturns
│ │ w ┴ nothing
│ horizon ┴ nothing
mp ┼ DefaultMatrixProcessing
│ pdm ┼ Posdef
│ │ alg ┴ UnionAll: NearestCorrelationMatrix.Newton
│ denoise ┼ nothing
│ detone ┼ nothing
│ alg ┴ nothing
re ┼ StepwiseRegression
│ crit ┼ PValue
│ │ threshold ┴ Float64: 0.05
│ alg ┼ Forward()
│ target ┼ LinearModel
│ │ kwargs ┴ @NamedTuple{}: NamedTuple()
ve ┼ SimpleVariance
│ me ┼ SimpleExpectedReturns
│ │ w ┴ nothing
│ w ┼ nothing
│ corrected ┴ Bool: true
a_views ┼ LinearConstraintEstimator
│ val ┴ Vector{String}: ["A == 0.03", "B + C == 0.04"]
f_views ┼ LinearConstraintEstimator
│ val ┴ Vector{String}: ["F1 == 0.01", "F2 == 0.02"]
a_sets ┼ AssetSets
│ key ┼ String: "nx"
│ dict ┴ Dict{String, Vector{String}}: Dict("nx" => ["A", "B", "C"])
f_sets ┼ AssetSets
│ key ┼ String: "fx"
│ dict ┴ Dict{String, Vector{String}}: Dict("fx" => ["F1", "F2"])
a_views_conf ┼ nothing
f_views_conf ┼ nothing
w ┼ nothing
rf ┼ Float64: 0.0
l ┼ nothing
tau ┴ nothingRelated
sourcePortfolioOptimisers.prior Method
prior(pe::AugmentedBlackLittermanPrior, X::AbstractMatrix, F::AbstractMatrix; dims::Int = 1,
strict::Bool = false, kwargs...)Compute augmented Black-Litterman prior moments for asset returns.
prior estimates the mean and covariance of asset returns using the augmented Black-Litterman model, combining asset and factor prior estimators, matrix post-processing, regression and variance estimators, asset and factor views, asset and factor sets, view confidences, weights, risk-free rate, leverage, and a blending parameter tau. This method supports both direct and constraint-based views, flexible confidence specification, and matrix processing, and incorporates joint asset-factor Bayesian updating for posterior inference.
Arguments
pe: Augmented Black-Litterman prior estimator.X: Asset returns matrix (observations × assets).F: Factor matrix (observations × factors).dims: Dimension along which to compute moments (1= columns/assets,2= rows). Default is1.strict: Iftrue, enforce strict validation of views and sets. Default isfalse.kwargs...: Additional keyword arguments passed to underlying estimators and matrix processing.
Returns
pr::LowOrderPrior: Result object containing asset returns, posterior mean vector, posterior covariance matrix, regression result, and factor prior details.
Validation
dims in (1, 2).length(pe.a_sets.dict[pe.a_sets.key]) == size(X, 2).length(pe.f_sets.dict[pe.f_sets.key]) == size(F, 2).If
pe.wis provided,length(pe.w) == size(X, 2).
Details
If
dims == 2,XandFare transposed to ensure assets/factors are in columns.Asset and factor priors are computed using the embedded prior estimators
pe.a_peandpe.f_pe.Factor regression is performed using the regression estimator
pe.re.Asset and factor views are extracted using
black_litterman_views, which returns the view matrices and view returns vectors.taudefaults to1/Tif not specified, whereTis the number of observations.View uncertainty matrices for assets and factors are computed using
calc_omega.The augmented prior mean and covariance are constructed by combining asset and factor priors and regression loadings.
The augmented Black-Litterman posterior mean and covariance are computed using
vanilla_posteriors.Matrix processing is applied to the augmented posterior covariance.
The final asset posterior mean and covariance are extracted from the augmented results and adjusted for regression intercepts and risk-free rate.
The result includes asset returns, posterior mean, posterior covariance, regression result, and factor prior details.
Related
source