Relaxed risk budgeting
PortfolioOptimisers.RelaxedRiskBudgetingAlgorithm Type
abstract type RelaxedRiskBudgetingAlgorithm <: OptimisationAlgorithmAbstract supertype for relaxed risk budgeting algorithm variants.
Related Types
sourcePortfolioOptimisers.BasicRelaxedRiskBudgeting Type
struct BasicRelaxedRiskBudgeting <: RelaxedRiskBudgetingAlgorithmBasic Relaxed Risk Budgeting formulation.
Uses the basic Second Order Cone (SOC) relaxation of the risk budgeting problem without additional regularisation.
Related Types
sourcePortfolioOptimisers.RegularisedRelaxedRiskBudgeting Type
struct RegularisedRelaxedRiskBudgeting <: RelaxedRiskBudgetingAlgorithmRegularised Relaxed Risk Budgeting formulation.
Extends the basic SOC formulation with a regularisation term to improve numerical stability.
Related Types
sourcePortfolioOptimisers.RegularisedPenalisedRelaxedRiskBudgeting Type
struct RegularisedPenalisedRelaxedRiskBudgeting{__T_p} <: RelaxedRiskBudgetingAlgorithmRegularised and penalised Relaxed Risk Budgeting formulation.
Extends the regularised formulation with a penalty on deviations from target risk budgets, controlled by parameter p.
Fields
p: Power or order parameter.
Constructors
RegularisedPenalisedRelaxedRiskBudgeting(;
p::Number = 1.0
) -> RegularisedPenalisedRelaxedRiskBudgetingKeywords correspond to the struct's fields.
Validation
isfinite(p)andp > 0.
Related Types
sourcePortfolioOptimisers.RelaxedRiskBudgeting Type
struct RelaxedRiskBudgeting{__T_opt, __T_rba, __T_wi, __T_alg, __T_fb} <: JuMPOptimisationEstimatorRelaxed Risk Budgeting (RRB) portfolio optimiser.
RelaxedRiskBudgeting implements a relaxed formulation of the risk budgeting problem using a Second Order Cone constraint on the portfolio variance. Unlike RiskBudgeting, it does not require a logarithmic or mixed-integer formulation, making it computationally more tractable.
Fields
opt:JuMPoptimiser configuration.rba: Risk budget algorithm.wi: Initial portfolio weights for warm-starting the solver.alg: Relaxed risk budgeting algorithm variant.fb: Fallback result or estimator.
Constructors
RelaxedRiskBudgeting(;
opt::JuMPOptimiser = JuMPOptimiser(),
rba::RiskBudgetingAlgorithm = AssetRiskBudgeting(),
wi::Option{<:VecNum} = nothing,
alg::RelaxedRiskBudgetingAlgorithm = BasicRelaxedRiskBudgeting(),
fb::Option{<:OptE_Opt} = nothing
) -> RelaxedRiskBudgetingKeywords correspond to the struct's fields.
Validation
- If
wiis provided:!isempty(wi).
Mathematical definition
The Relaxed Risk Budgeting (RRB) formulation replaces the non-convex risk-parity constraint with a second-order cone (SOC) relaxation. Let
The risk cone constraint (basic variant):
Where:
: Portfolio weight vector. , : Scalar auxiliary variables. : Auxiliary vector equal to . : Risk budget for asset . : Cholesky factor of (so ). : Covariance matrix. : Second-order cone.
Related
sourcePortfolioOptimisers.needs_previous_weights Method
needs_previous_weights(opt::RelaxedRiskBudgeting) -> AnyReturn true if the JuMP optimiser or fallback requires previous portfolio weights.
PortfolioOptimisers.factory Method
factory(
rrb::RelaxedRiskBudgeting,
w::AbstractVector
) -> RelaxedRiskBudgetingBuild an updated RelaxedRiskBudgeting with all estimators that track previous weights updated via factory using w.
PortfolioOptimisers.port_opt_view Method
port_opt_view(
rrb::RelaxedRiskBudgeting,
i,
X::AbstractMatrix{<:Union{var"#s20", var"#s19"} where {var"#s20"<:Number, var"#s19"<:AbstractJuMPScalar}},
args...
) -> RelaxedRiskBudgetingReturn a cluster-sliced copy of RelaxedRiskBudgeting for asset index set i and returns matrix X.
PortfolioOptimisers.set_relaxed_risk_budgeting_alg_constraints! Function
set_relaxed_risk_budgeting_alg_constraints!(alg, model, w, sigma, chol)Add algorithm-specific second-order cone constraints for Relaxed Risk Budgeting.
Dispatches based on the RRB algorithm variant. Adds second-order cone constraints implementing the basic, regularised, or regularised-penalised RRB formulation.
Arguments
alg: RRB algorithm (BasicRelaxedRiskBudgeting,RegularisedRelaxedRiskBudgeting, orRegularisedPenalisedRelaxedRiskBudgeting).model::JuMP.Model: JuMP optimisation model.w::VecJuMPScalar: Portfolio weight variables.sigma::MatNum: Covariance matrix.chol::Option{<:MatNum}: Optional pre-computed Cholesky factor.
Returns
nothing.
Related
sourcePortfolioOptimisers._set_relaxed_risk_budgeting_constraints! Method
_set_relaxed_risk_budgeting_constraints!(model, ...)Internal function to set relaxed risk budgeting constraints in the JuMP model.
Configures inequality constraints for the relaxed risk budgeting formulation, allowing small deviations from exact budget targets.
Arguments
model: JuMP model.Additional relaxed risk budgeting parameters.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_relaxed_risk_budgeting_constraints! Function
set_relaxed_risk_budgeting_constraints!(model, rrb, pr, wb, args...)Add Relaxed Risk Budgeting (RRB) constraints and weight variables to the JuMP model.
Dispatches based on the risk budgeting algorithm type. Configures weight variables, budget constraints, second-order cone constraints, and weight bounds.
Arguments
model::JuMP.Model: JuMP optimisation model.rrb::RelaxedRiskBudgeting: RRB estimator configuration.pr::AbstractPriorResult: Prior result with asset moments.wb::WeightBounds: Weight bounds configuration.args...: Additional arguments (e.g. returns data for factor risk budgeting).
Returns
- Processed risk budgeting attributes.
Related
sourcePortfolioOptimisers.optimise Function
optimise(rrb::RelaxedRiskBudgeting{<:Any, <:Any, <:Any, <:Any, Nothing},
rd::ReturnsResult = ReturnsResult(); dims::Int = 1,
str_names::Bool = false, save::Bool = true, kwargs...) -> RiskBudgetingResultRun the Relaxed Risk Budgeting portfolio optimisation.
Arguments
rrb: The relaxed risk budgeting optimiser to use.rd: The returns result to use. Ifisa(rrb.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.str_names: Whether to use string names for the assets in the optimisation.save: Whether to save the JuMP model in the optimisation result.kwargs: Additional keyword arguments passed to the optimisation function.
Related
source