Base JuMP Optimisation
PortfolioOptimisers.BaseJuMPOptimisationEstimator Type
abstract type BaseJuMPOptimisationEstimator <: BaseOptimisationEstimatorAbstract supertype for base JuMP-based portfolio optimisation estimators.
These are configuration-level types (e.g., JuMPOptimiser) that define the optimisation problem setup for JuMP-based optimisers.
Related Types
sourcePortfolioOptimisers.JuMPOptimisationEstimator Type
abstract type JuMPOptimisationEstimator <: NonFiniteAllocationOptimisationEstimatorAbstract supertype for JuMP-based portfolio optimisation estimators.
JuMP optimisers formulate and solve portfolio optimisation problems using mathematical programming via the JuMP.jl framework.
Related Types
sourcePortfolioOptimisers.RiskJuMPOptimisationEstimator Type
abstract type RiskJuMPOptimisationEstimator <: JuMPOptimisationEstimatorAbstract supertype for risk-based JuMP portfolio optimisation estimators.
Subtype RiskJuMPOptimisationEstimator to implement optimisers that minimise or constrain risk measures as the primary objective.
Related Types
sourcePortfolioOptimisers.ObjectiveFunction Type
abstract type ObjectiveFunction <: AbstractEstimatorAbstract supertype for portfolio objective functions.
Subtype ObjectiveFunction to implement portfolio optimisation objectives such as minimum risk, maximum return, or maximum Sharpe ratio.
Related Types
sourcePortfolioOptimisers.JuMPReturnsEstimator Type
abstract type JuMPReturnsEstimator <: AbstractEstimatorAbstract supertype for JuMP-based returns estimators used in optimisation models.
JuMPReturnsEstimator types define how expected returns are incorporated into JuMP models.
Related Types
sourcePortfolioOptimisers.JuMPConstraintEstimator Type
abstract type JuMPConstraintEstimator <: AbstractConstraintEstimatorAbstract supertype for JuMP constraint estimators.
Subtype JuMPConstraintEstimator to implement custom constraints or objectives for JuMP-based portfolio optimisers.
Related Types
sourcePortfolioOptimisers.CustomJuMPConstraint Type
abstract type CustomJuMPConstraint <: JuMPConstraintEstimatorAbstract supertype for custom JuMP constraint implementations.
Implement add_custom_constraint! to define custom JuMP model constraints.
Related Types
sourcePortfolioOptimisers.CustomJuMPObjective Type
abstract type CustomJuMPObjective <: JuMPConstraintEstimatorAbstract supertype for custom JuMP objective implementations.
Implement add_custom_objective_term! to add custom terms to the JuMP model objective.
Related Types
sourcePortfolioOptimisers.JuMPOptimisationSolution Type
struct JuMPOptimisationSolution{__T_w} <: OptimisationModelResultStores the solution (portfolio weights) from a JuMP optimisation model.
Fields
w: Optimal portfolio weights (non-empty array of numbers).
Related
sourcePortfolioOptimisers.add_custom_objective_term! Function
add_custom_objective_term!(args...; kwargs...)Add a custom objective term to the JuMP model.
No-op fallback. Override this method for subtypes of CustomJuMPObjective to add custom penalty or reward terms to the JuMP model objective.
Arguments
args...: JuMP model and custom objective type (ignored in fallback).kwargs...: Additional keyword arguments.
Returns
nothing.
Related
sourcePortfolioOptimisers.add_custom_constraint! Function
add_custom_constraint!(args...; kwargs...)Add a custom constraint to the JuMP model.
No-op fallback. Override this method for subtypes of CustomJuMPConstraint to add custom constraints to the JuMP model.
Arguments
args...: JuMP model and custom constraint type (ignored in fallback).kwargs...: Additional keyword arguments.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_model_scales! Function
set_model_scales!(model::JuMP.Model, so::Number, sc::Number)Register objective scale so and constraint scale sc as named expressions in the JuMP model.
Arguments
model::JuMP.Model: JuMP optimisation model.so::Number: Objective scale factor.sc::Number: Constraint scale factor.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_initial_w! Function
set_initial_w!(args...)
set_initial_w!(w::VecNum, wi::VecNum)Set initial (warm-start) values for portfolio weight variables in the JuMP model.
The no-op fallback does nothing when wi is not provided. The two-argument method sets JuMP start values for each weight variable.
Arguments
w::VecNum: Vector of JuMP weight variables.wi::VecNum: Vector of initial weight values.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_w! Function
set_w!(model::JuMP.Model, X::MatNum, wi::Option{<:VecNum_VecVecNum})Create portfolio weight variables in the JuMP model and optionally set initial values.
Registers a vector of weight variables w of length size(X, 2) in the model. If wi is provided, sets the initial values via set_initial_w!.
Arguments
model::JuMP.Model: JuMP optimisation model.X::MatNum: Asset returns matrix (shape: observations × assets).wi: Optional initial weight values.
Returns
nothing.
Related
sourcePortfolioOptimisers.set_portfolio_returns! Function
set_portfolio_returns!(model::JuMP.Model, X::MatNum)Compute and register portfolio returns expression X * w in the JuMP model.
If the expression already exists in the model, returns it directly (idempotent).
Arguments
model::JuMP.Model: JuMP optimisation model.X::MatNum: Asset returns matrix.
Returns
- The portfolio returns expression.
Related
sourcePortfolioOptimisers.set_net_portfolio_returns! Function
set_net_portfolio_returns!(model::JuMP.Model, X::MatNum)Compute and register net portfolio returns (after fees) in the JuMP model.
Calls set_portfolio_returns! and subtracts fees if present.
Arguments
model::JuMP.Model: JuMP optimisation model.X::MatNum: Asset returns matrix.
Returns
- The net portfolio returns expression.
Related
sourcePortfolioOptimisers.set_portfolio_returns_plus_one! Function
set_portfolio_returns_plus_one!(model::JuMP.Model, X::MatNum)Compute and register portfolio gross returns X .+ 1 in the JuMP model.
Used in drawdown and logarithmic return computations.
Arguments
model::JuMP.Model: JuMP optimisation model.X::MatNum: Portfolio returns expression.
Returns
- The gross returns expression
X .+ 1.
Related
sourcePortfolioOptimisers.set_portfolio_drawdowns_plus_one! Function
set_portfolio_drawdowns_plus_one!(model::JuMP.Model, X::MatNum)Compute and register absolute drawdowns plus one in the JuMP model.
Computes absolute_drawdown_arr(X) .+ 1 and registers it in the model.
Arguments
model::JuMP.Model: JuMP optimisation model.X::MatNum: Portfolio returns expression.
Returns
- The drawdowns-plus-one expression.
Related
source