When to Use Portfolio Objects Over Optimization Toolbox
While you can use Optimization Toolbox™ to solve portfolio optimization problems, Financial Toolbox™ has the Portfolio
, PortfolioCVaR
, and PortfolioMAD
objects that you can use as well. Which tool you use depends
on the problem case:
Always use a
Portfolio
,PortfolioCVaR
, orPortfolioMAD
object when the problem can most easily be written and implemented using one of these objects. This case includes problems that can be solved only with the internal solvers of thePortfolio
,PortfolioCVaR
, orPortfolioMAD
object. The Optimization Toolbox solvers cannot directly handle these problems. For details, see Always Use Portfolio, PortfolioCVaR, or PortfolioMAD Object.Prefer to use a
Portfolio
,PortfolioCVaR
, orPortfolioMAD
object when the problem can be modeled and implemented using both thePortfolio
,PortfolioCVaR
, orPortfolioMAD
object and the Optimization Toolbox problem-based framework. The advantage of using aPortfolio
,PortfolioCVaR
, orPortfolioMAD
object instead of the Optimization Toolbox is that the internal tools of these objects simplify the analysis. For details, see Preferred Use of Portfolio, PortfolioCVaR, or PortfolioMAD Object.Opt to use Optimization Toolbox for problems that cannot be solved with the internal solvers of the
Portfolio
,PortfolioCVaR
, orPortfolioMAD
object. Some of the problems that thePortfolio
,PortfolioCVaR
, orPortfolioMAD
object cannot solve can be addressed using the Optimization Toolbox problem-based framework. Problems that cannot be directly solved with either framework require either some restructuring of the model or an implementation of a specialized solver. For details, see Use Optimization Toolbox.
The following table summarizes the objective functions, constraints, and variables that apply in each case for solving a portfolio problem.
Case for Solving Portfolio Problem | Objective Function | Constraints | Integer (Binary) Variables |
---|---|---|---|
"Always" case with Financial Toolbox |
|
| |
"Preferred" case with Financial Toolbox |
| None | |
Optimization Toolbox | Any other nonlinear function not mentioned in Always Use Portfolio, PortfolioCVaR, or PortfolioMAD Object and Preferred Use of Portfolio, PortfolioCVaR, or PortfolioMAD Object | Any other nonlinear function not mentioned in Always Use Portfolio, PortfolioCVaR, or PortfolioMAD Object and Preferred Use of Portfolio, PortfolioCVaR, or PortfolioMAD Object | None |
Always Use Portfolio
, PortfolioCVaR
, or PortfolioMAD
Object
The two general cases for always using the Portfolio
, PortfolioCVaR
, or PortfolioMAD
object are:
Problems with both supported nonlinear constraints and conditional bounds or bounds in the number of assets.
These problems include:
Minimum risk problems subject to constraints for return, linear equality, linear inequality, turnover, and tracking error where the supported risk measures are variance, conditional value-at-risk (CVaR), and mean-absolute-deviation (MAD)
Maximum return problems subject to constraints for linear equality, liner inequality, turnover, risk, and tracking error where the supported risk measures are variance, CVaR, and MAD
Tracking error is supported only for mean-variance problems using the
Portfolio
object. For more information on the supported constraints for aPortfolio
,PortfolioCVaR
, orPortfolioMAD
object, see Supported Constraints for Portfolio Optimization Using Portfolio Objects.Custom objective minimization or maximization. The custom objective function (using
estimateCustomObjectivePortfolio
) must be continuous and convex subject to constraints for return, risk, linear equality, linear inequality, tracking error, and turnover.
Tracking error is supported using the
Portfolio
object only when the objective is the return, variance or Sharpe ratio. Sharpe ratio is supported only using thePortfolio
object.For more information on the supported constraints and nonlinear risk functions for
Portfolio
,PortfolioCVaR
, andPortfolioMAD
objects, see Supported Constraints for Portfolio Optimization Using Portfolio Objects and Portfolio Optimization Theory. The integer (binary) variables can come from either of the following sources: bounds on the number of assets that can be selected in the portfolio, setting conditional (semicontinuous) bounds on the assets, or adding a conditional budget constraint. For example, if asset i is selected, then xi ≥lb
i, otherwise xi = 0. These problems cannot be solved using the Optimization Toolbox solvers. However, you can implement your own mixed-integer solver. For more information, see Mixed-Integer Quadratic Programming Portfolio Optimization: Problem-Based.Problems with turnover constraints and sell or buy costs
Although the continuous version of these problems can be solved by the Optimization Toolbox solvers, the variable space must be manipulated to rewrite the nonsmooth constraints into equivalent smooth constraints. Given that rewriting the problem requires optimization knowledge, it is recommended to use the
Portfolio
,PortfolioCVaR
, andPortfolioMAD
objects instead.
Preferred Use of Portfolio
, PortfolioCVaR
, or PortfolioMAD
Object
The general case for preferred use of the Portfolio
, PortfolioCVaR
, or PortfolioMAD
object is:
Continuous problems with minimum risk, maximum return, and maximum Sharpe ratio that are subject to linear equality, liner inequality, turnover, and tracking error constraints.
Sharpe ratio is supported only for mean-variance problems using the
Portfolio
object. For more information on the supported constraints for aPortfolio
,PortfolioCVaR
, orPortfolioMAD
object, see Supported Constraints for Portfolio Optimization Using Portfolio Objects.Custom objective minimization or maximization. The custom objective function (using
estimateCustomObjectivePortfolio
) must be continuous and convex subject to constraints for return, risk, linear equality, linear inequality, tracking error, and turnover.
Tracking error is supported using the Portfolio
object only when the
objective is the return, variance or Sharpe ratio. Sharpe ratio is supported only
using the Portfolio
object.
The supported risk measures are variance, CVaR, and MAD. For more information on the supported constraints for these risk measures, see Supported Constraints for Portfolio Optimization Using Portfolio Objects, Supported Constraints for Portfolio Optimization Using PortfolioCVaR Object, and Supported Constraints for Portfolio Optimization Using PortfolioMAD Object. For all other risk measures and constraints and if tracking error is in the objective, use the Optimization Toolbox.
The advantage of the Portfolio
,
PortfolioCVaR
, and PortfolioMAD
object
framework over the problem-based framework for the type of problems in the
"preferred" case is that common portfolio optimization workflows are leveraged. For
example, the Portfolio
, PortfolioCVaR
, and
PortfolioMAD
object framework supports the following
workflows:
Estimating and plotting the efficient frontier
Exchanging the return and risk proxies from the objective function to a constraint
Solving the maximum Sharpe ratio problem
Adding bounds on the number of assets selected
Adding semicontinuous bounds
Simplifying the use of turnover constraints and sell or buy costs
Use Optimization Toolbox
The two general cases to use Optimization Toolbox is:
Problems that have nonlinear constraints other than the constraints for risk or tracking error
See Also
Portfolio
| PortfolioCVaR
| PortfolioMAD
Related Examples
- Creating the Portfolio Object
- Working with Portfolio Constraints Using Defaults
- Estimate Efficient Portfolios for Entire Efficient Frontier for Portfolio Object
- Estimate Efficient Frontiers for Portfolio Object
- Asset Allocation Case Study
- Portfolio Optimization Examples Using Financial Toolbox
- Portfolio Optimization with Semicontinuous and Cardinality Constraints
- Black-Litterman Portfolio Optimization Using Financial Toolbox
- Portfolio Optimization Using Factor Models
- Portfolio Optimization Using Social Performance Measure
- Diversify Portfolios Using Custom Objective
More About
- Portfolio Object
- Portfolio Optimization Theory
- Choose MINLP Solvers for Portfolio Problems
- Portfolio Object Workflow
- Problem-Based Optimization Workflow