Abstract Models API¶
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
assetfield indicates the matrix of asset returns and covariances to be inputted into the model.- Target Return
The
target returnspecifies 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
assetfield indicates the matrix of asset returns and covariances to be inputted into the model.- Target Return
The
target returnspecifies 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.
-
CVaRO(assets::AssetsCollection{Real, AbstractString}, losses::Matrix{Real}, constraints::Dict{Symbol, Expr}; alpha=.95::R, short_sale=false::Bool)¶
-
MinVarO(assets::AssetsCollection{Real, AbstractString}, constraints::Dict{Symbol, Expr}; short_sale=false::Bool))¶
Optimize Function¶
-
optimize(M, parameters::Dict{Symbol, Any}, solver=Default)¶ Optimizes the model
Musing the values in the dictionary ofparametersusing asolver, and returns a tuple of the objective value and an array of the weights. Thesolveris an optionalSolver Objectthat 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.
-
getConstraints(M)¶ Return an array of constraints as expressions for model
M.
-
getObjective(M)¶ Return the objective function of model
Mas 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.