Skip to content
13

Augmented Black-Litterman Prior

PortfolioOptimisers.AugmentedBlackLittermanPrior Type
julia
struct AugmentedBlackLittermanPrior{__T_a_pe, __T_f_pe, __T_mp, __T_re, __T_a_views, __T_f_views, __T_a_sets, __T_f_sets, __T_a_views_conf, __T_f_views_conf, __T_w, __T_rf, __T_l, __T_tau} <: AbstractLowOrderPriorEstimator_F

Augmented 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.

  • 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, if nothing, defaults to 1/T where T is the number of observations.

Constructors

julia
AugmentedBlackLittermanPrior(;
    a_pe::AbstractLowOrderPriorEstimator_A_AF = EmpiricalPrior(),
    f_pe::AbstractLowOrderPriorEstimator_A_AF = EmpiricalPrior(),
    mp::AbstractMatrixProcessingEstimator = DenoiseDetoneAlgMatrixProcessing(),
    re::AbstractRegressionEstimator = StepwiseRegression(),
    a_views::Lc_BLV,
    f_views::Lc_BLV,
    a_sets::Option{<:AssetSets} = nothing,
    f_sets::Option{<:AssetSets} = nothing,
    a_views_conf::Option{<:Num_VecNum} = nothing,
    f_views_conf::Option{<:Num_VecNum} = nothing,
    w::Option{<:VecNum} = nothing,
    rf::Number = 0.0,
    l::Option{<:Number} = nothing,
    tau::Option{<:Number} = nothing
) -> AugmentedBlackLittermanPrior

Keywords correspond to the struct's fields.

Validation

Examples

julia
julia> AugmentedBlackLittermanPrior(;
                                    a_sets = AssetSets(; key = "nx",
                                                       dict = Dict("nx" => ["A", "B", "C"])),
                                    f_sets = AssetSets(; key = "nx",
                                                       dict = Dict("nx" => ["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 ┼ DenoiseDetoneAlgMatrixProcessing
               │           │      │     pdm ┼ Posdef
               │           │      │         │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton
               │           │      │         │   kwargs ┴ @NamedTuple{}: NamedTuple()
               │           │      │      dn ┼ nothing
               │           │      │      dt ┼ nothing
               │           │      │     alg ┼ nothing
               │           │      │   order ┴ DenoiseDetoneAlg()
               │        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 ┼ DenoiseDetoneAlgMatrixProcessing
               │           │      │     pdm ┼ Posdef
               │           │      │         │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton
               │           │      │         │   kwargs ┴ @NamedTuple{}: NamedTuple()
               │           │      │      dn ┼ nothing
               │           │      │      dt ┼ nothing
               │           │      │     alg ┼ nothing
               │           │      │   order ┴ DenoiseDetoneAlg()
               │        me ┼ SimpleExpectedReturns
               │           │   w ┴ nothing
               │   horizon ┴ nothing
            mp ┼ DenoiseDetoneAlgMatrixProcessing
               │     pdm ┼ Posdef
               │         │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton
               │         │   kwargs ┴ @NamedTuple{}: NamedTuple()
               │      dn ┼ nothing
               │      dt ┼ nothing
               │     alg ┼ nothing
               │   order ┴ DenoiseDetoneAlg()
            re ┼ StepwiseRegression
               │   crit ┼ PValue
               │        │   t ┴ Float64: 0.05
               │    alg ┼ Forward()
               │    tgt ┼ LinearModel
               │        │   kwargs ┴ @NamedTuple{}: NamedTuple()
       a_views ┼ LinearConstraintEstimator
               │   val ┼ Vector{String}: ["A == 0.03", "B + C == 0.04"]
               │   key ┴ nothing
       f_views ┼ LinearConstraintEstimator
               │   val ┼ Vector{String}: ["F1 == 0.01", "F2 == 0.02"]
               │   key ┴ nothing
        a_sets ┼ AssetSets
               │    key ┼ String: "nx"
               │   ukey ┼ String: "ux"
               │   dict ┴ Dict{String, Vector{String}}: Dict("nx" => ["A", "B", "C"])
        f_sets ┼ AssetSets
               │    key ┼ String: "nx"
               │   ukey ┼ String: "ux"
               │   dict ┴ Dict{String, Vector{String}}: Dict("nx" => ["F1", "F2"])
  a_views_conf ┼ nothing
  f_views_conf ┼ nothing
             w ┼ nothing
            rf ┼ Float64: 0.0
             l ┼ nothing
           tau ┴ nothing

Related

source
PortfolioOptimisers.prior Method
julia
prior(pe::AugmentedBlackLittermanPrior, X::MatNum, F::MatNum; 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 perform the computation.

  • strict: If true, enforce strict validation of views and sets. Default is false.

  • 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.w is not nothing, length(pe.w) == size(X, 2).

Details

  • If dims == 2, X and F are transposed to ensure assets/factors are in columns.

  • Asset and factor priors are computed using the embedded prior estimators pe.a_pe and pe.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.

  • tau defaults to 1/T if not specified, where T is 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