Skip to content
13

Base clustering optimisation

PortfolioOptimisers.BaseClusteringOptimisationEstimator Type
julia
abstract type BaseClusteringOptimisationEstimator <: BaseOptimisationEstimator

Abstract supertype for base clustering optimisation estimators.

These are intermediate configuration types used in hierarchical/clustering optimisation pipelines.

Related Types

source
PortfolioOptimisers.ClusteringOptimisationEstimator Type
julia
abstract type ClusteringOptimisationEstimator <: NonFiniteAllocationOptimisationEstimator

Abstract supertype for clustering-based portfolio optimisation estimators.

Clustering optimisation estimators use asset clustering to decompose the portfolio optimisation problem. Subtypes include HRP, HERC, and SCHRP.

Related Types

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

Result type for hierarchical (clustering-based) portfolio optimisation.

Fields

  • oe: Type of the optimisation estimator that produced this result.

  • pr: Prior result used in optimisation.

  • clr: Clustering result.

  • wb: Weight bounds applied.

  • fees: Fee structure applied (or nothing).

  • retcode: Optimisation return code.

  • w: Optimal portfolio weights vector.

  • fb: Fallback result (if a fallback optimiser was used).

Related

source
PortfolioOptimisers.HierarchicalOptimiser Type
julia
struct HierarchicalOptimiser{__T_pe, __T_cle, __T_slv, __T_wb, __T_fees, __T_sets, __T_wf, __T_brt, __T_cle_pr, __T_strict} <: BaseClusteringOptimisationEstimator

Base configuration for hierarchical clustering-based portfolio optimisers.

HierarchicalOptimiser combines a prior estimator, a clustering estimator, and weight bound/fee specifications to provide a reusable base configuration for hierarchical optimisers (HRP, HERC, SCHRP, etc.).

Fields

  • pe: Prior estimator or prior result.

  • cle: Hierarchical clustering estimator or clustering result.

  • slv: Solver or vector of solvers (for risk measures requiring conic optimisation).

  • wb: Weight bounds estimator or bounds.

  • fees: Fee estimator or fee structure.

  • sets: Asset sets.

  • wf: Weight finaliser for enforcing bounds.

  • brt: If true, uses bootstrap returns.

  • cle_pr: If true, passes the prior result to the clustering estimator.

  • strict: If true, strictly enforces weight bounds.

Constructors

julia
HierarchicalOptimiser(;
    pe::PrE_Pr = EmpiricalPrior(),
    cle::HClE_HCl = ClustersEstimator(),
    slv::Option{<:Slv_VecSlv} = nothing,
    wb::Option{<:WbE_Wb} = WeightBounds(),
    fees::Option{<:FeesE_Fees} = nothing,
    sets::Option{<:AssetSets} = nothing,
    wf::WeightFinaliser = IterativeWeightFinaliser(),
    brt::Bool = false,
    cle_pr::Bool = true,
    strict::Bool = false
) -> HierarchicalOptimiser

Keywords correspond to the struct's fields.

Examples

julia
julia> HierarchicalOptimiser()
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

Related

source