Skip to content
13

Turnover risk measure

PortfolioOptimisers.TurnoverRiskMeasure Type
julia
struct TurnoverRiskMeasure{__T_settings, __T_w, __T_fixed} <: RiskMeasure

Represents the Turnover risk measure.

TurnoverRiskMeasure penalises portfolio rebalancing by measuring the L1 distance between the new portfolio weights and a reference weight vector. It controls trading costs and limits portfolio drift.

Mathematical definition

Let w be the new portfolio weights and w0 the reference (previous or target) weights:

Turnover(w)=w0w1=i=1N|w0,iwi|.

Where:

  • Turnover(w): Portfolio turnover.

  • w: Portfolio weights vector N×1.

  • w0: Reference (previous or target) portfolio weights vector N×1.

  • N: Number of assets.

Fields

  • settings: Risk measure settings.

  • w: Reference portfolio weights vector.

  • fixed: Whether the estimator is fixed and does not update with new weights.

Constructors

julia
TurnoverRiskMeasure(;
    settings::RiskMeasureSettings = RiskMeasureSettings(),
    w::VecNum,
    fixed::Bool = false
) -> TurnoverRiskMeasure

Keywords correspond to the struct's fields.

Validation

  • !isempty(w).

Functor

julia
(r::TurnoverRiskMeasure)(w::VecNum)

Computes the Turnover risk of a portfolio weight vector w.

Arguments

  • w::VecNum: New portfolio weights vector.

Examples

julia
julia> TurnoverRiskMeasure(; w = [0.5, 0.5])
TurnoverRiskMeasure
  settings ┼ RiskMeasureSettings
           │   scale ┼ Float64: 1.0
           │      ub ┼ nothing
           │     rke ┴ Bool: true
         w ┼ Vector{Float64}: [0.5, 0.5]
     fixed ┴ Bool: false

Related

source
PortfolioOptimisers.port_opt_view Method
julia
port_opt_view(
    r::TurnoverRiskMeasure,
    i,
    args...
) -> TurnoverRiskMeasure{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, <:AbstractVector{var"#s21"}, Bool} where {__T_scale, __T_ub, __T_rke, var"#s21"<:(Union{var"#s20", var"#s19"} where {var"#s20"<:Number, var"#s19"<:AbstractJuMPScalar})}

Return a view of TurnoverRiskMeasure r sliced to the asset indices i.

Used for cluster-based optimisation where only a subset of assets is considered.

Related

source
PortfolioOptimisers.needs_previous_weights Method
julia
needs_previous_weights(r::TurnoverRiskMeasure) -> Any

Return whether TurnoverRiskMeasure r requires previous portfolio weights.

Returns true if r.fixed is false (i.e., the reference weights are updated each period).

Related

source
PortfolioOptimisers.factory Method
julia
factory(
    r::TurnoverRiskMeasure,
    w::AbstractVector{<:Union{var"#s20", var"#s19"} where {var"#s20"<:Number, var"#s19"<:AbstractJuMPScalar}}
) -> TurnoverRiskMeasure

Create an instance of TurnoverRiskMeasure updating the reference weights to w.

If r.fixed is true, returns r unchanged. Otherwise, constructs a new instance with w as the reference weight vector.

Related

source
PortfolioOptimisers.factory Function
julia
factory(
    r::TurnoverRiskMeasure,
    ,
    ,
    ;
    ...
) -> TurnoverRiskMeasure
factory(
    r::TurnoverRiskMeasure,
    ,
    ,
    ,
    w::Union{Nothing, AbstractVector{<:Union{var"#s20", var"#s19"} where {var"#s20"<:Number, var"#s19"<:AbstractJuMPScalar}}},
    args...;
    kwargs...
) -> TurnoverRiskMeasure

Create an instance of TurnoverRiskMeasure from a full optimisation context, forwarding the optional weight argument w to factory(r, w).

Ignores prior result, solver, and uncertainty set arguments — only w is used.

Related

source