Fees Constraints
PortfolioOptimisers.add_to_fees! Function
add_to_fees!(model::Model, expr::AbstractJuMPScalar)Accumulate a JuMP expression into the :fees expression of the optimisation model.
Creates the :fees expression if it does not yet exist; otherwise adds expr to it in place.
Arguments
model::JuMP.Model: The JuMP optimisation model.expr::JuMP.AbstractJuMPScalar: The fee expression to accumulate.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_turnover_fees! Function
set_turnover_fees!(args...)Add a turnover-based transaction fee expression to the JuMP optimisation model.
The fall-through method does nothing. The concrete method computes val' * |w - wt| via NormOneCone constraints and accumulates the result into the model's :fees expression via add_to_fees!.
Mathematical definition
Where:
: Portfolio weight for asset . : Benchmark weight for asset . : Budget scaling / homogenisation variable. : Per-asset fee rate vector. : Auxiliary absolute-deviation variable vector. : Total turnover fee.
Arguments
model::JuMP.Model: The JuMP optimisation model.tn::Turnover: Turnover specification containing benchmark weightswand per-unit feeval.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_non_fixed_fees! Function
set_non_fixed_fees!(args...)Add all non-fixed (proportional and turnover) fee expressions to the JuMP optimisation model.
The fall-through method does nothing. The concrete method delegates to set_long_non_fixed_fees!, set_short_non_fixed_fees!, and set_turnover_fees!.
Arguments
model::JuMP.Model: The JuMP optimisation model.fees::Fees: Fee specification containing long, short, and turnover fee rates.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_long_non_fixed_fees! Function
set_long_non_fixed_fees!(args...)Add proportional long-side fee expression to the JuMP optimisation model.
The fall-through method does nothing. The concrete method adds fl' * lw to the model's :fees expression via add_to_fees!.
Mathematical definition
Where:
: Total long-side fee. : Per-asset long-side fee rate vector. : Long-weight vector.
Arguments
model::JuMP.Model: The JuMP optimisation model.fl: Long-side fee rate(s). Accepts a scalarNumberor aVecNum.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_short_non_fixed_fees! Function
set_short_non_fixed_fees!(args...)Add proportional short-side fee expression to the JuMP optimisation model.
The fall-through method does nothing. The concrete method adds fs' * sw to the model's :fees expression via add_to_fees!. Does nothing when no short-weight variable :sw exists in the model.
Mathematical definition
Where:
: Total short-side fee. : Per-asset short-side fee rate vector. : Short-weight vector.
Arguments
model::JuMP.Model: The JuMP optimisation model.fs: Short-side fee rate(s). Accepts a scalarNumberor aVecNum.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_fixed_fees! Function
set_fixed_fees!(
model::Model,
sp::AbstractMIPSpace,
ind::AbstractMIPIndicators,
ffl::Union{Nothing, Number, AbstractVector{<:Union{var"#s34", var"#s33"} where {var"#s34"<:Number, var"#s33"<:AbstractJuMPScalar}}},
ffs::Union{Nothing, Number, AbstractVector{<:Union{var"#s34", var"#s33"} where {var"#s34"<:Number, var"#s33"<:AbstractJuMPScalar}}},
ffl_flag::Bool,
ffs_flag::Bool
)Add fixed-fee expressions to the JuMP optimisation model.
A fixed fee is charged per position held, whatever its size, so unlike the proportional fees above it cannot be written against the weights — it needs a binary saying whether the position is there at all. That is the only reason this one takes an indicator bundle, and the only reason a MIP builder has to run before it.
Mathematical definition
Where:
, : Long and short binaries ( long_bin,short_bin). These are the binaries themselves, never the gates: a fee is incurred by the decision to hold, which is what the bit records, and the gates relax to continuous variables when the budget is free., : Long and short fixed-fee rates.
Under a long-only builder the held bit is the long bit (HeldIndicators), and there is no short side to charge.
Arguments
model::JuMP.Model: The JuMP optimisation model.sp::AbstractMIPSpace: Weight space the fees are charged in.ind::AbstractMIPIndicators: Indicator bundle supplying the binaries.ffl::Option{<:Num_VecNum}: Long-side fixed fee rate(s).ffs::Option{<:Num_VecNum}: Short-side fixed fee rate(s).ffl_flag::Bool: Whether to add the long fixed-fee expression.ffs_flag::Bool: Whether to add the short fixed-fee expression.
Returns
nothing.
Related
source