Weight norm constraints
PortfolioOptimisers.set_weight_norm_2_constraints! Function
set_weight_norm_2_constraints!(model::JuMP.Model, val::Number)
set_weight_norm_2_constraints!(args...)Constrain the 2-norm of the weights.
val is a direct upper bound on k: the constraint is val forces the weights to spread more evenly across the assets.
Mathematical definition
Where:
: Auxiliary variable upper-bounding . : Portfolio weights vector . : Budget scaling / homogenisation variable. : Upper bound on the 2-norm of the weights.
Diversification interpretation
The 2-norm and the effective number of assets are reciprocally related: for a fully invested portfolio (m effective assets, set val = 1 / sqrt(m):
Arguments
model::JuMP.Model: The JuMP optimisation model.val::Number: Upper bound on the 2-norm of the weights.
Returns
nothing.
Details
val::Number: Introduces the auxiliary variablel2c, bounds it below bywith a SecondOrderConeconstraint, and adds the linear constraintl2c <= val * k.args...: No-op, used when no 2-norm weight constraint is configured.
Related
sourcePortfolioOptimisers.set_weight_norm_p_constraints! Function
set_weight_norm_p_constraints!(model::JuMP.Model, lps::LpReg_VecLpReg)
set_weight_norm_p_constraints!(args...)Constrain the p-norm of the weights.
Generalises set_weight_norm_2_constraints! to an arbitrary norm order
Each term is an LpRegularisation, reused here as a constraint rather than a penalty: its p field is the norm order, and its val field is a direct upper bound on k. Smaller val forces a more evenly spread portfolio.
Mathematical definition
Where:
: Auxiliary variable upper-bounding . : Norm order of the -th term, its pfield.: Upper bound on the -norm of the weights, its valfield.: Portfolio weights vector . : Budget scaling / homogenisation variable.
Diversification interpretation
For a fully invested portfolio (m p-norm effective assets, set val = m^(-1/p):
Arguments
model::JuMP.Model: The JuMP optimisation model.lps::LpReg_VecLpReg: One or more p-norm weight constraints.
Returns
nothing.
Details
lps::LpReg_VecLpReg: For each term, introduces the auxiliary variablest_lpc_iandr_lpc_i, boundsabove by t_lpc_iwith a set ofMOI.PowerConeconstraints, and adds the linear constraintt_lpc_i <= val * k. Variables and constraints are suffixed by the term's index, so terms do not collide, and are named distinctly from those ofset_lp_regularisation!so a model may carry both an Lp penalty and a p-norm constraint.args...: No-op, used when no p-norm weight constraint is configured.
Related
PortfolioOptimisers.set_weight_norm_inf_constraints! Function
set_weight_norm_inf_constraints!(model::JuMP.Model, val::Number)
set_weight_norm_inf_constraints!(args...)Constrain the ∞-norm of the weights, capping the largest absolute weight.
The limiting case of set_weight_norm_p_constraints!. val is a direct upper bound on the largest absolute weight, expressed relative to the budget k: the constraint is val = 0.2 holds no position larger than 20%. Smaller val forces a more evenly spread portfolio.
Mathematical definition
Where:
: Auxiliary variable upper-bounding . : Upper bound on the largest absolute weight. : Portfolio weights vector . : Budget scaling / homogenisation variable.
Diversification interpretation
Capping the largest weight spreads the portfolio across a minimum number of assets. To spread across at least m assets, set val = 1 / m: no single position can then exceed a
Arguments
model::JuMP.Model: The JuMP optimisation model.val::Number: Upper bound on the largest absolute weight.
Returns
nothing.
Details
val::Number: Introduces the auxiliary variablet_linfc, bounds it below bywith a MOI.NormInfinityConeconstraint, and adds the linear constraintt_linfc <= val * k.args...: No-op, used when no ∞-norm weight constraint is configured.
Related
source