Skip to content
13

Regularisation Constraints

PortfolioOptimisers.set_l1_regularisation! Function
julia
set_l1_regularisation!(args...)

No-op fallback for L1 regularisation setup.

Called when no L1 regularisation is configured. Returns nothing.

Mathematical definition

penalty=λ1w1.

Where:

  • λ1: L1 regularisation coefficient.

  • w: Portfolio weights vector N×1.

Related

source
PortfolioOptimisers.set_l2_regularisation! Function
julia
set_l2_regularisation!(args...)

No-op fallback for L2 regularisation setup.

Called when no L2 regularisation is configured. Returns nothing.

Mathematical definition

penalty=λ2w2.

Where:

  • λ2: L2 regularisation coefficient.

  • w: Portfolio weights vector N×1.

Related

source
PortfolioOptimisers.set_lp_regularisation! Function
julia
set_lp_regularisation!(args...)

No-op fallback for Lp regularisation setup.

Called when no Lp regularisation is configured. Returns nothing.

Related

source
PortfolioOptimisers.set_linf_regularisation! Function
julia
set_linf_regularisation!(args...)

No-op fallback for L∞ regularisation setup.

Called when no L∞ regularisation is configured. Returns nothing.

Mathematical definition

penalty=λw.

Where:

  • λ: L∞ regularisation coefficient.

  • w: Portfolio weights vector N×1.

Related

source
PortfolioOptimisers.AbstractRegularisationEstimator Type
julia
abstract type AbstractRegularisationEstimator <: AbstractEstimator

Abstract supertype for all portfolio weight regularisation estimators.

Related

source
PortfolioOptimisers.LpRegularisation Type
julia
struct LpRegularisation{__T_p, __T_val} <: AbstractRegularisationEstimator

Lp-norm regularisation term added to the optimisation objective.

Mathematical definition

penalty=val(i=1N|wi|p)1/p.

Where:

  • val: Regularisation coefficient.

  • wi: Portfolio weight for asset i.

  • p>1: Norm order.

  • N: Number of assets.

Penalises concentrated portfolios by encouraging weight smoothness for p>1.

Fields

  • p: Power or order parameter.

  • val: Default value to use for the estimator. If nothing, the estimator provides the default value.

Constructors

julia
LpRegularisation(; p::Number = 3, val::Number = 1e-3) -> LpRegularisation

Keywords correspond to the struct's fields.

Validation

  • isfinite(p).

  • p > 1.

  • val > 0 and finite.

Related

source
PortfolioOptimisers.VecLpReg Type
julia
const VecLpReg = AbstractVector{<:LpRegularisation}

Alias for a vector of LpRegularisation objects.

Represents a collection of Lp-norm regularisation terms to be added to the optimisation objective.

Related

source
PortfolioOptimisers.LpReg_VecLpReg Type
julia
const LpReg_VecLpReg = Union{<:LpRegularisation, <:VecLpReg}

Alias for a single or vector of Lp regularisation terms.

Matches either a single LpRegularisation or a vector of them (VecLpReg).

Related

source