Abstract Models StdLib¶
Constructors¶
-
SimpleMVO
(assets::AssetsCollection{Real, AbstractString}, target_return::Real, constraints::Dict{Symbol, Expr}; short_sale::Bool=false)¶ When setting the Simple MVO, there are 4 fields to consider.
- Assets
The
asset
field indicates the matrix of asset returns and covariances to be inputted into the model.- Target Return
The
target return
specifies the minimum expected return of the optimal portfolio.- Constraints
The constraints define the set of constraints, outside of implied simple MVO constraints, to be applied during model optimization. If not defined, it is implied to have no constraints but the default of SimpleMVO.
- Short Sale flag
This is a boolean indicating whether or not short sale is allowed for the model. It simples defines whether or not weights for assets can drop below zero. If not defined, it is implied to be false.
-
RobustMVO
(assets::AssetsCollection{Real, AbstractString}, target_return::Real, constraints::Dict{Symbol, Expr}, uncertaintySet, uncertaintySetSize, short_sale::Bool=false)¶ When setting the Robust MVO, there are 6 fields to consider.
- Assets
The
asset
field indicates the matrix of asset returns and covariances to be inputted into the model.- Target Return
The
target return
specifies the minimum expected return of the optimal portfolio.- Constraints
The constraints define the set of constraints, outside of implied simple MVO constraints, to be applied during model optimization.
- The Uncertainty Set
The
uncertaintySet
- The Uncertainty Set Size
The
uncertaintySetSize
- Short Sale flag
This is a boolean indicating whether or not short sale is allowed for the model. It simples defines whether or not weights for assets can drop below zero.
Optimize Function¶
-
optimize
(M, parameters::Dict{Symbol, Any}, solver=Default)¶ Optimizes the model
M
using the values in the dictionary ofparameters
using asolver
, and returns a tuple of the objective value and an array of the weights. Thesolver
is an optionalSolver Object
that can be passed in to define which solver to use while optimizing. The default is to let JuMP decide which solver to use.
Getters and Setters¶
-
getDefaultConstraints
(M)¶ Return the default constraints of model
M
as a ConstraintsContainer type.
-
getConstraints
(M)¶ Return an array of constraints as expressions for model
M
.
-
getObjective
(M)¶ Return the objective function of model
M
as an Expr type.
-
getSense
(M)¶ Return the Sense of the model
M
, Min or Max.
-
getVariables
(M)¶ Return the list of variables in the model
M
.