setSolverMINLP
Choose mixed integer nonlinear programming (MINLP) solver for portfolio optimization
Since R2018b
Description
selects the mixed integer nonlinear programming (MINLP) solver and enables you to specify
associated solver options for portfolio optimization for a obj
= setSolverMINLP(obj
,solverTypeMINLP
)Portfolio
, PortfolioCVaR
, or PortfolioMAD
object.
When any one or any combination of 'Conditional'
BoundType
, MinNumAssets
, or
MaxNumAssets
constraints are active, the portfolio problem is formulated by
adding NumAssets
binary variables. The binary variable 0
indicates that an asset is not invested and the binary variable 1
indicates
that an asset is invested. For more information on using 'Conditional'
BoundType
, see setBounds
. For more information
on specifying MinNumAssets
and MaxNumAssets
, see
setMinMaxNumAssets
.
If you use the estimate
functions with a Portfolio
,
PortfolioCVaR
, or PortfolioMAD
object for which any of
the 'Conditional'
BoundType
, MinNumAssets
, or
MaxNumAssets
constraints are active, MINLP solver is automatically used.
For details on MINLP, see Algorithms.
specifies options using one or more name-value pair arguments in addition to the input
arguments in the previous syntax.obj
= setSolverMINLP(___,Name,Value
)
Examples
Input Arguments
Output Arguments
More About
Tips
You can also use dot notation to specify associated name-value pair options.
obj = obj.setSolverMINLP(Name,Value);
Note
The solverTypeMINLP
and solverOptionsMINLP
properties cannot be set using dot notation because they are hidden properties. To set the
solverTypeMINLP
and solverOptionsMINLP
properties,
use the setSolverMINLP
function directly.
Algorithms
When any one, or any combination of 'Conditional'
BoundType
, MinNumAssets
, or MaxNumAssets
constraints is active, the portfolio problem is formulated by adding NumAssets
binary variables. The binary variable 0
indicates that an asset is not
invested and the binary variable 1
indicates that an asset is invested.
The MinNumAssets
and MaxNumAssets
constraints narrow
down the number of active positions in a portfolio to the range of [minN,
maxN]. In addition, the 'Conditional'
BoundType
constraint is to set a lower and upper bound so that the position is
either 0
or lies in the range [minWgt,
maxWgt]. These two types of constraints are incorporated into the portfolio
optimization model by introducing n variables,
νi, which only take binary values
0
and 1
to indicate whether the corresponding asset is
invested (1
) or not invested (0
). Here n
is the total number of assets and the constraints can be formulated as the following linear
inequality constraints:
In this equation, minN and maxN are
representations for MinNumAsset
and MaxNumAsset
that are
set using setMinMaxNumAssets
. Also,
minWgt and maxWgt are representations for
LowerBound
and UpperBound
that are set using setBounds
.
The portfolio optimization problem to minimize the variance of the portfolio, subject to achieving a target expected return and some additional linear constraints on the portfolio weights, is formulated as
In this equation, H represents the covariance and m represents the asset returns.
The portfolio optimization problem to maximize the return, subject to an upper limit on the variance of the portfolio return and some additional linear constraints on the portfolio weights, is formulated as
When the 'Conditional'
BoundType
, MinNumAssets
, and
MaxNumAssets
constraints are added to the two optimization problems, the
problems become:
References
[1] Bonami, P., Kilinc, M., and J. Linderoth. "Algorithms and Software for Convex Mixed Integer Nonlinear Programs." Technical Report #1664. Computer Sciences Department, University of Wisconsin-Madison, 2009.
[2] Kelley, J. E. "The Cutting-Plane Method for Solving Convex Programs." Journal of the Society for Industrial and Applied Mathematics. Vol. 8, Number 4, 1960, pp. 703–712.
[3] Linderoth, J. and S. Wright. "Decomposition Algorithms for Stochastic Programming on a Computational Grid." Computational Optimization and Applications. Vol. 24, Issue 2–3, 2003, pp. 207–250.
[4] Nocedal, J., and S. Wright. Numerical Optimization. New York: Springer-Verlag, 1999.
Version History
Introduced in R2018bSee Also
setBounds
| setMinMaxNumAssets
| estimateFrontier
| estimateFrontierByReturn
| estimateFrontierByRisk
| estimateFrontierLimits
| estimateMaxSharpeRatio
| setSolver
Topics
- Portfolio Optimization with Semicontinuous and Cardinality Constraints
- Mixed-Integer Quadratic Programming Portfolio Optimization: Problem-Based
- Portfolio Set for Optimization Using Portfolio Objects
- Choosing and Controlling the Solver for Mean-Variance Portfolio Optimization
- Choosing and Controlling the Solver for PortfolioCVaR Optimizations
- Choosing and Controlling the Solver for PortfolioMAD Optimizations