Budget Constraints
PortfolioOptimisers.BudgetConstraintEstimator Type
abstract type BudgetConstraintEstimator <: JuMPConstraintEstimatorAbstract supertype for all budget constraint estimators.
Related
sourcePortfolioOptimisers.Num_BgtCE Type
const Num_BgtCE = Union{<:Number, <:BudgetConstraintEstimator}Union of scalar budget values and BudgetConstraintEstimator instances.
PortfolioOptimisers.BudgetEstimator Type
abstract type BudgetEstimator <: BudgetConstraintEstimatorAbstract supertype for estimators that specify the portfolio budget range (sum of weights).
Related
sourcePortfolioOptimisers.BudgetCostEstimator Type
abstract type BudgetCostEstimator <: BudgetConstraintEstimatorAbstract supertype for estimators that specify transaction cost budgets.
Related
sourcePortfolioOptimisers.set_budget_costs! Function
set_budget_costs!(args...)Set transaction cost budget constraints in the JuMP model.
No-op fallback when no cost budget is specified.
Arguments
args...: Arguments (ignored).
Returns
nothing.
Related
sourcePortfolioOptimisers.BudgetRange Type
struct BudgetRange{__T_lb, __T_ub} <: BudgetEstimatorSpecifies the portfolio budget constraint as a closed interval lb or ub must be provided.
Fields
lb: Lower bound.ub: Upper bound.
Constructors
BudgetRange(; lb::Option{<:Number} = 1.0, ub::Option{<:Number} = 1.0) -> BudgetRangeKeywords correspond to the struct's fields.
Validation
At least one of
lb,ubmust not benothing.lbandubmust be finite.lb <= ubwhen both are provided.
Related
sourcePortfolioOptimisers.Num_BgtRg Type
const Num_BgtRg = Union{<:Number, <:BudgetRange}Alias for a scalar budget value or budget range.
Matches either a plain number (fixed budget, e.g. 1.0) or a BudgetRange (interval budget constraint). Used for dispatch in budget constraint generation.
Related
sourcePortfolioOptimisers.BudgetCosts Type
struct BudgetCosts{__T_bgt, __T_w, __T_vp, __T_vn, __T_up, __T_un} <: BudgetCostEstimatorBudget constraint that accounts for linear transaction costs.
Mathematical definition
Models the portfolio budget as:
Where:
, : Positive and negative weight increments. , : Cost coefficient vectors for positive and negative changes. , : Lower and upper budget bounds.
Fields
bgt: Budget target or range.w: Portfolio weights vectorassets × 1.vp: Cost coefficients for positive weight changes. Non-negative.vn: Cost coefficients for negative weight changes. Non-negative.up: Upper limit on positive weight changes. Non-negative.un: Upper limit on negative weight changes. Non-negative.
Constructors
BudgetCosts(;
bgt::Num_BgtRg = 1.0,
w::VecNum,
vp::Num_VecNum = 1.0,
vn::Num_VecNum = 1.0,
up::Num_VecNum = 1.0,
un::Num_VecNum = 1.0
) -> BudgetCostsKeywords correspond to the struct's fields.
Validation
!isempty(w).If
vpis a vector:!isempty(vp)and all elements>= 0. If scalar:>= 0.If
vnis a vector:!isempty(vn)and all elements>= 0. If scalar:>= 0.If
upis a vector:!isempty(up)and all elements>= 0. If scalar:>= 0.If
unis a vector:!isempty(un)and all elements>= 0. If scalar:>= 0.
View parameters
When port_opt_view is called on this type, the following @vprop-tagged fields are automatically subset to the selected indices:
w: Sliced to the selected indices viaport_opt_view.vp: Sliced to the selected indices viaport_opt_view.vn: Sliced to the selected indices viaport_opt_view.up: Sliced to the selected indices viaport_opt_view.un: Sliced to the selected indices viaport_opt_view.
Related
sourcePortfolioOptimisers.BudgetMarketImpact Type
struct BudgetMarketImpact{__T_bgt, __T_w, __T_vp, __T_vn, __T_up, __T_un, __T_beta} <: BudgetCostEstimatorBudget constraint that accounts for non-linear (power-law) market impact costs. Extends BudgetCosts with a beta exponent controlling the concavity of the market impact function.
Fields
bgt: Budget target or range.w: Portfolio weights vectorassets × 1.vp: Cost coefficients for positive weight changes. Non-negative.vn: Cost coefficients for negative weight changes. Non-negative.up: Upper limit on positive weight changes. Non-negative.un: Upper limit on negative weight changes. Non-negative.beta: Market impact exponent in(0, 1].
Constructors
BudgetMarketImpact(;
bgt::Num_BgtRg = 1.0,
w::VecNum,
vp::Num_VecNum = 1.0,
vn::Num_VecNum = 1.0,
up::Num_VecNum = 1.0,
un::Num_VecNum = 1.0,
beta::Number = 2/3
) -> BudgetMarketImpactKeywords correspond to the struct's fields.
Validation
!isempty(w).If
vpis a vector:!isempty(vp)and all elements>= 0. If scalar:>= 0.If
vnis a vector:!isempty(vn)and all elements>= 0. If scalar:>= 0.If
upis a vector:!isempty(up)and all elements>= 0. If scalar:>= 0.If
unis a vector:!isempty(un)and all elements>= 0. If scalar:>= 0.0 <= beta <= 1.
View parameters
When port_opt_view is called on this type, the following @vprop-tagged fields are automatically subset to the selected indices:
w: Sliced to the selected indices viaport_opt_view.vp: Sliced to the selected indices viaport_opt_view.vn: Sliced to the selected indices viaport_opt_view.up: Sliced to the selected indices viaport_opt_view.un: Sliced to the selected indices viaport_opt_view.
Related
sourcePortfolioOptimisers.set_budget_constraints! Function
set_budget_constraints!(args...)
set_budget_constraints!(model::JuMP.Model, val::Number, w::VecNum)
set_budget_constraints!(model::JuMP.Model, bgt::BudgetRange, w::VecNum)
set_budget_constraints!(model::JuMP.Model, bgt::BudgetCosts, w::VecNum)
set_budget_constraints!(model::JuMP.Model, bgt::BudgetMarketImpact, w::VecNum)Add budget constraints to the JuMP optimisation model.
The fall-through method does nothing. The concrete methods add the appropriate portfolio budget constraint based on the type of budget specification provided.
Mathematical definition
Fixed / range:
Where:
: Portfolio weights vector . : Budget scaling / homogenisation variable. , : Lower and upper budget bounds.
Linear cost budget (BudgetCosts):
Where:
: Portfolio weights vector . : Budget scaling / homogenisation variable. , : Positive and negative weight increments. , : Cost coefficient vectors for positive and negative changes. , : Lower and upper budget bounds.
Power-law market-impact budget (BudgetMarketImpact):
Where:
: Portfolio weights vector . : Budget scaling / homogenisation variable. , : Positive and negative weight increments. , : Market-impact cost coefficient vectors. : Market-impact power exponent. , : Lower and upper budget bounds.
Arguments
model::JuMP.Model: The JuMP optimisation model.val::Number: Fixed budget scalar.bgt: Budget constraint specification (BudgetRange,BudgetCosts, orBudgetMarketImpact).w: Portfolio weight vector.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_long_short_budget_constraints! Function
set_long_short_budget_constraints!(args...)Set budget constraints for long and short portfolio positions in the JuMP model.
Various overloads handle different budget types (fixed, range), dispatching on the presence or absence of long/short budget configurations.
Arguments
args...: JuMP model and budget parameters.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_cost_budget_constraints! Function
set_cost_budget_constraints!(model, vp, vn, val_or_bgt, w)Set cost-budget constraints in the JuMP model.
Various overloads handle different cost types (fixed value or BudgetRange).
Arguments
model: JuMP optimisation model.vp: Positive cost vector or scalar.vn: Negative cost vector or scalar.val_or_bgt: Fixed budget value orBudgetRange.w: Portfolio weight vector.
Returns
nothing.
Related
source