Skip to content
13

Schur Complement Hierarchical Risk Parity

PortfolioOptimisers.SchurComplementAlgorithm Type
julia
abstract type SchurComplementAlgorithm <: AbstractAlgorithm

Abstract supertype for Schur Complement algorithm variants.

Related Types

source
PortfolioOptimisers.NonMonotonicSchurComplement Type
julia
struct NonMonotonicSchurComplement <: SchurComplementAlgorithm

Non-monotonic Schur Complement algorithm variant for SCHRP.

Uses the raw Schur complement formula without monotonicity correction.

Related Types

source
PortfolioOptimisers.MonotonicSchurComplement Type
julia
struct MonotonicSchurComplement{__T_N, __T_tol, __T_iter, __T_strict} <: SchurComplementAlgorithm

Monotonic Schur Complement algorithm variant for SCHRP.

Applies a bisection-based correction to ensure the Schur complement allocation factor γ is monotonically increasing with cluster risk, controlled by convergence tolerance tol and maximum iterations iter.

Fields

  • N: Number of bisection steps.

  • tol: Convergence tolerance.

  • iter: Maximum iterations (or nothing for no limit).

  • strict: If true, raises an error if convergence is not achieved.

Constructors

julia
MonotonicSchurComplement(;
    N::Integer = 10,
    tol::Number = 1e-4,
    iter::Option{<:Integer} = nothing,
    strict::Bool = false
) -> MonotonicSchurComplement

Keywords correspond to the struct's fields.

Related Types

source
PortfolioOptimisers.SchurComplementParams Type
julia
struct SchurComplementParams{__T_r, __T_gamma, __T_pdm, __T_alg, __T_flag} <: AbstractAlgorithm

Parameters for the Schur Complement step of SCHRP.

SchurComplementParams collects the risk measure, initial allocation factor γ, positive-definite matrix correction, and monotonicity algorithm used in the Schur Complement Hierarchical Risk Parity optimisation.

Fields

  • r: Risk measure (Variance or StandardDeviation) used for intra-cluster risk.

  • gamma: Initial allocation factor (0γ1).

  • pdm: Positive definite matrix correction method.

  • alg: Schur Complement algorithm variant.

  • flag: If true, uses the Schur Complement inversion; if false, uses the direct Schur inverse.

Constructors

julia
SchurComplementParams(;
    r::Sd_Var = Variance(),
    gamma::Number = 0.5,
    pdm::Option{<:Posdef} = Posdef(),
    alg::SchurComplementAlgorithm = MonotonicSchurComplement(),
    flag::Bool = true
) -> SchurComplementParams

Keywords correspond to the struct's fields.

Validation

  • 0 <= gamma <= 1.

Related

source
PortfolioOptimisers.SchurComplementHierarchicalRiskParityResult Type
julia
struct SchurComplementHierarchicalRiskParityResult{__T_oe, __T_pr, __T_wb, __T_clr, __T_gamma, __T_retcode, __T_w, __T_fb} <: NonFiniteAllocationOptimisationResult

Result type returned by SchurComplementHierarchicalRiskParity optimisation.

Stores the optimisation estimator, prior result, weight bounds, clustering result, Schur complement scaling parameter, return code, optimised weights, and optional fallback estimator.

Fields

  • oe: Optimisation estimator used.

  • pr: Prior result containing asset moments.

  • wb: Weight bounds estimator.

  • clr: Clustering result.

  • gamma: Schur complement scaling parameter.

  • retcode: Optimisation return code.

  • w: Optimised asset weights.

  • fb: Optional fallback optimisation estimator.

Related

source
PortfolioOptimisers.SchurComplementHierarchicalRiskParity Type
julia
struct SchurComplementHierarchicalRiskParity{__T_opt, __T_params, __T_fb} <: ClusteringOptimisationEstimator

Schur Complement Hierarchical Risk Parity (SCHRP) portfolio optimiser.

SchurComplementHierarchicalRiskParity extends HRP by using the Schur complement of the covariance matrix to more accurately decompose inter-cluster risk when allocating portfolio weights across the dendrogram.

Fields

  • opt: Base hierarchical optimiser configuration.

  • params: Schur Complement parameters (single or vector).

  • fb: Fallback optimiser.

Constructors

julia
SchurComplementHierarchicalRiskParity(;
    opt::HierarchicalOptimiser = HierarchicalOptimiser(),
    params::ScP_VecScP = SchurComplementParams(),
    fb::Option{<:OptE_Opt} = nothing
) -> SchurComplementHierarchicalRiskParity

Keywords correspond to the struct's fields.

Validation

  • If params is a vector: !isempty(params).

Examples

julia
julia> SchurComplementHierarchicalRiskParity()
SchurComplementHierarchicalRiskParity
     opt ┼ HierarchicalOptimiser
         │       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
         │      cle ┼ ClustersEstimator
         │          │    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()
         │          │    de ┼ Distance
         │          │       │   power ┼ nothing
         │          │       │     alg ┴ CanonicalDistance()
         │          │   alg ┼ HClustAlgorithm
         │          │       │   linkage ┴ Symbol: :ward
         │          │   onc ┼ OptimalNumberClusters
         │          │       │   max_k ┼ nothing
         │          │       │     alg ┼ SecondOrderDifference
         │          │       │         │   alg ┼ StandardisedValue
         │          │       │         │       │   mv ┼ MeanValue
         │          │       │         │       │      │   w ┴ nothing
         │          │       │         │       │   sv ┼ StdValue
         │          │       │         │       │      │           w ┼ nothing
         │          │       │         │       │      │   corrected ┴ Bool: true
         │      slv ┼ nothing
         │       wb ┼ WeightBounds
         │          │   lb ┼ Float64: 0.0
         │          │   ub ┴ Float64: 1.0
         │     fees ┼ nothing
         │     sets ┼ nothing
         │       wf ┼ IterativeWeightFinaliser
         │          │   iter ┴ Int64: 100
         │      brt ┼ Bool: false
         │   cle_pr ┼ Bool: true
         │   strict ┴ Bool: false
  params ┼ SchurComplementParams
         │       r ┼ Variance
         │         │   settings ┼ RiskMeasureSettings
         │         │            │   scale ┼ Float64: 1.0
         │         │            │      ub ┼ nothing
         │         │            │     rke ┴ Bool: true
         │         │      sigma ┼ nothing
         │         │       chol ┼ nothing
         │         │         rc ┼ nothing
         │         │        alg ┴ SquaredSOCRiskExpr()
         │   gamma ┼ Float64: 0.5
         │     pdm ┼ Posdef
         │         │      alg ┼ UnionAll: NearestCorrelationMatrix.Newton
         │         │   kwargs ┴ @NamedTuple{}: NamedTuple()
         │     alg ┼ MonotonicSchurComplement
         │         │        N ┼ Int64: 10
         │         │      tol ┼ Float64: 0.0001
         │         │     iter ┼ nothing
         │         │   strict ┴ Bool: false
         │    flag ┴ Bool: true
      fb ┴ nothing

Related

source
PortfolioOptimisers.optimise Function
julia
optimise(sh::SchurComplementHierarchicalRiskParity{<:Any, <:Any, Nothing},
         rd::ReturnsResult = ReturnsResult(); dims::Int = 1, kwargs...) -> HierarchicalResult

Arguments

  • sh: The Schur complement hierarchical risk parity optimiser to use.

  • rd: The returns result to use. If isa(hrp.opt.pe, AbstractPriorResult), rd is not necessary if doing a standalone optimisation, but may be required/desired by fallbacks and/or clusterisation.

  • dims: The dimension along which observations advance in time.

  • kwargs: Additional keyword arguments passed to the optimisation function.

source