Schur Complement Hierarchical Risk Parity
PortfolioOptimisers.SchurComplementAlgorithm Type
abstract type SchurComplementAlgorithm <: AbstractAlgorithmAbstract supertype for Schur Complement algorithm variants.
Related Types
sourcePortfolioOptimisers.NonMonotonicSchurComplement Type
struct NonMonotonicSchurComplement <: SchurComplementAlgorithmNon-monotonic Schur Complement algorithm variant for SCHRP.
Uses the raw Schur complement formula without monotonicity correction.
Related Types
sourcePortfolioOptimisers.MonotonicSchurComplement Type
struct MonotonicSchurComplement{__T_N, __T_tol, __T_iter, __T_strict} <: SchurComplementAlgorithmMonotonic Schur Complement algorithm variant for SCHRP.
Applies a bisection-based correction to ensure the Schur complement allocation factor tol and maximum iterations iter.
Fields
N: Number of bisection steps.tol: Convergence tolerance.iter: Maximum iterations (ornothingfor no limit).strict: Iftrue, raises an error if convergence is not achieved.
Constructors
MonotonicSchurComplement(;
N::Integer = 10,
tol::Number = 1e-4,
iter::Option{<:Integer} = nothing,
strict::Bool = false
) -> MonotonicSchurComplementKeywords correspond to the struct's fields.
Related Types
sourcePortfolioOptimisers.SchurComplementParams Type
struct SchurComplementParams{__T_r, __T_gamma, __T_pdm, __T_alg, __T_flag} <: AbstractAlgorithmParameters for the Schur Complement step of SCHRP.
SchurComplementParams collects the risk measure, initial allocation factor
Fields
r: Risk measure (VarianceorStandardDeviation) used for intra-cluster risk.gamma: Initial allocation factor (). pdm: Positive definite matrix correction method.alg: Schur Complement algorithm variant.flag: Iftrue, uses the Schur Complement inversion; iffalse, uses the direct Schur inverse.
Constructors
SchurComplementParams(;
r::Sd_Var = Variance(),
gamma::Number = 0.5,
pdm::Option{<:Posdef} = Posdef(),
alg::SchurComplementAlgorithm = MonotonicSchurComplement(),
flag::Bool = true
) -> SchurComplementParamsKeywords correspond to the struct's fields.
Validation
0 <= gamma <= 1.
Related
sourcePortfolioOptimisers.SchurComplementHierarchicalRiskParityResult Type
struct SchurComplementHierarchicalRiskParityResult{__T_oe, __T_pr, __T_wb, __T_clr, __T_gamma, __T_retcode, __T_w, __T_fb} <: NonFiniteAllocationOptimisationResultResult 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
sourcePortfolioOptimisers.SchurComplementHierarchicalRiskParity Type
struct SchurComplementHierarchicalRiskParity{__T_opt, __T_params, __T_fb} <: ClusteringOptimisationEstimatorSchur 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
SchurComplementHierarchicalRiskParity(;
opt::HierarchicalOptimiser = HierarchicalOptimiser(),
params::ScP_VecScP = SchurComplementParams(),
fb::Option{<:OptE_Opt} = nothing
) -> SchurComplementHierarchicalRiskParityKeywords correspond to the struct's fields.
Validation
- If
paramsis a vector:!isempty(params).
Examples
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 ┴ nothingRelated
PortfolioOptimisers.optimise Function
optimise(sh::SchurComplementHierarchicalRiskParity{<:Any, <:Any, Nothing},
rd::ReturnsResult = ReturnsResult(); dims::Int = 1, kwargs...) -> HierarchicalResultArguments
sh: The Schur complement hierarchical risk parity optimiser to use.rd: The returns result to use. Ifisa(hrp.opt.pe, AbstractPriorResult),rdis 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.