Turnover Constraints: private API
PortfolioOptimisers.set_turnover_constraints! — Function
set_turnover_constraints!(model::JuMP.Model, ::Nothing; prefix::Symbol = Symbol(""))
set_turnover_constraints!(model::JuMP.Model, tns::Tn_VecTn; prefix::Symbol = Symbol(""))Add turnover constraints to the JuMP optimisation model.
The method on nothing adds no row. Any other type or arity is a MethodError. The method on a Tn_VecTn iterates over the collection of Turnover objects tns and delegates each to _set_turnover_constraints!.
Arguments
model::JuMP.Model: The JuMP optimisation model.tns: One or moreTurnoverconstraint specifications.prefix::Symbol = Symbol(""): Model State namespace of the call. The builder reads the weights under it, and every entry that it registers takes it, so two calls under two prefixes add two sets of rows to one model. The empty default gives the bare names.
Returns
nothing.
Related
PortfolioOptimisers._set_turnover_constraints! — Function
_set_turnover_constraints!(model::Model, tn::Turnover; ...)
_set_turnover_constraints!(
model::Model,
tn::Turnover,
i::Integer;
prefix
)
Add a single turnover constraint for a Turnover object to the JuMP optimisation model.
Introduces auxiliary variable t_tn_i, expression tn_i = w - wb * k, and enforces |w[i] - wb[i] * k| ≤ v[i] * k for each asset i, one NormOneCone constraint per asset, where v is val broadcast to the assets. The bound is on the change of each asset, not on the sum of the changes.
Mathematical definition
\[\begin{align} \boldsymbol{t}_{tn} &\geq |\boldsymbol{w} - \boldsymbol{w}_b k|\,, \\ \boldsymbol{t}_{tn} &\leq \boldsymbol{v} k\,. \end{align}\]
Where:
- $\boldsymbol{w}$: Portfolio weights vector $N \times 1$.
- $\boldsymbol{w}_b$: Benchmark weight vector.
- $k$: Variable that scales the budget in the homogenised problem.
- $\boldsymbol{v}$: Per-asset turnover limit vector.
- $\boldsymbol{t}_{tn}$: Auxiliary absolute-deviation variable.
Arguments
model::JuMP.Model: The JuMP optimisation model.tn::Turnover: Turnover constraint specification containing benchmark weightswand toleranceval.i::Integer = 1: Index used to generate unique variable and constraint names.prefix::Symbol = Symbol(""): Model State namespace of the call. The builder reads the weights under it, and every entry that it registers takes it, so two calls under two prefixes add two sets of rows to one model. The empty default gives the bare names.
Returns
nothing.
Related