setSolver
Choose main solver and specify associated solver options for portfolio optimization
Syntax
Description
selects the main solver and enables you to specify associated solver options for portfolio
optimization for obj
= setSolver(obj
,solverType
)Portfolio
, PortfolioCVaR
, or PortfolioMAD
objects. For details on the respective
workflows when using these different objects, see Portfolio Object Workflow, PortfolioCVaR Object Workflow, and PortfolioMAD Object Workflow.
selects the main solver and enables you to specify associated solver options for portfolio
optimization for portfolio objects with additional options specified by using one or more
obj
= setSolver(obj
,solverType
,Name,Value
)Name,Value
pair arguments.
selects the main solver and enables you to specify associated solver options for portfolio
optimization for portfolio objects with an obj
= setSolver(obj
,solverType
,optimoptions
)optimoptions
object.
Examples
Input Arguments
Output Arguments
Tips
You can also use dot notation to choose the solver and specify associated solver options.
obj = obj.setSolver(solverType,Name,Value);
Algorithms
To solve the efficient frontier of a portfolio, one version of the portfolio optimization
problem minimizes the portfolio risk Risk
(x), subject to a
target return, and other linear constraints specified for the Portfolio
, PortfolioCVaR
, or PortfolioMAD
object. For the definition of portfolio risk and return, see Risk Proxy and Return Proxy.
An alternative version of the portfolio optimization problem maximizes the expected return
of the portfolio, subject to a target risk and other linear constraints specified for the Portfolio
, PortfolioCVaR
, or PortfolioMAD
object.
The return proxy is always a linear function. Therefore, depending on the risk proxy and
whether it is used as the objective or constraints, the problem needs to be solved by different
solvers. For example, quadprog
is appropriate for problems with a quadratic
function as the objective and only linear constraints, and fmincon
is appropriate for problems with nonlinear objective or constraints. In
addition, there are solvers in Financial Toolbox™ suitable for certain special types of problems, such as the
solverType
lcprog
, 'TrustRegionCP'
, or
'ExtendedCP'
.
References
[1] Kelley, J. E. "The Cutting-Plane Method for Solving Convex Programs." Journal of the Society for Industrial and Applied Mathematics. Vol. 8, No. 4, December 1960, pp. 703–712.
[2] Rockafellar, R. T. and S. Uryasev "Optimization of Conditional Value-at-Risk." Journal of Risk. Vol. 2, No. 3, Spring 2000, pp. 21–41.
[3] Rockafellar, R. T. and S. Uryasev "Conditional Value-at-Risk for General Loss Distributions." Journal of Banking and Finance. Vol. 26, 2002, pp. 1443–1471.
Version History
Introduced in R2011aSee Also
getOneWayTurnover
| setTurnover
| setInitPort
| setCosts
| setSolverMINLP
Topics
- Working with One-Way Turnover Constraints Using Portfolio Object
- Working with One-Way Turnover Constraints Using PortfolioCVaR Object
- Working with One-Way Turnover Constraints Using PortfolioMAD Object
- Portfolio Optimization Examples Using Financial Toolbox™
- Portfolio Set for Optimization Using Portfolio Objects
- Portfolio Set for Optimization Using PortfolioCVaR Object
- Portfolio Set for Optimization Using PortfolioMAD Object
- 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