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, bounding the effective number of assets from below.
Diversification is expressed as a bound on a norm of the weight vector: the smaller the norm, the more evenly the weights spread across the assets. For the 2-norm the reciprocal of the squared norm is the effective number of assets, so bounding the norm above by val effective assets.
Mathematical definition
Which, for a fully invested portfolio (
Where:
: Auxiliary variable upper-bounding . : Portfolio weights vector . : Budget scaling / homogenisation variable. : Effective number of assets. : Minimum required effective number of assets.
Arguments
model::JuMP.Model: The JuMP optimisation model.val::Number: Minimum required effective number of assets.
Returns
nothing.
Details
val::Number: Introduces the auxiliary variablewn2, bounds it below bywith a SecondOrderConeconstraint, and adds the linear constraintwn2 * sqrt(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, bounding the p-norm effective number of assets from below.
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 the minimum p-norm effective number of assets, not the maximum norm. Larger val forces a more evenly spread portfolio.
Mathematical definition
Which, for a fully invested portfolio (
Where:
: Auxiliary variable upper-bounding . : Norm order of the -th term, its pfield.: Minimum required p-norm effective number of assets of the -th term, its valfield.: Portfolio weights vector . : Budget scaling / homogenisation variable. : Effective number of assets under the -norm.
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_wnp_iandr_wnp_i, boundsabove by t_wnp_iwith a set ofMOI.PowerConeconstraints, and adds the linear constraintt_wnp_i * val^(1 / p) <= 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, linf::Number)
set_weight_norm_inf_constraints!(args...)Constrain the ∞-norm of the weights, bounding the largest weight from above.
The limiting case of set_weight_norm_p_constraints!. linf is the reciprocal of the largest permitted weight, not the weight itself: a fully invested portfolio constrained with linf = 5 holds no position larger than 1 / 5, and so is spread across at least five assets. Larger linf forces a more evenly spread portfolio, consistent with the other members of the family.
Mathematical definition
Which, for a fully invested portfolio (
Where:
: Auxiliary variable upper-bounding . : Reciprocal of the largest permitted weight. : Portfolio weight for asset . : Portfolio weights vector . : Budget scaling / homogenisation variable.
Arguments
model::JuMP.Model: The JuMP optimisation model.linf::Number: Reciprocal of the largest permitted weight.
Returns
nothing.
Details
linf::Number: Introduces the auxiliary variablet_wninf, bounds it below bywith a MOI.NormInfinityConeconstraint, and adds the linear constraintt_wninf * linf <= k.args...: No-op, used when no ∞-norm weight constraint is configured.
Related
source