Estimate efficient portfolio to maximize Sharpe ratio for Portfolio object
You can also use dot notation to estimate an efficient portfolio that maximizes the Sharpe ratio.
[pwgt,pbuy,psell] = obj.estimateMaxSharpeRatio;
The maximization of the Sharpe ratio is accomplished by either using the
'direct'
or 'iterative'
method. For the 'direct'
method, consider the following
scenario. To maximize the Sharpe ratio is to:
where μ and C are the mean and covariance matrix, and rf is the risk-free rate.
If μT x - rf ≤ 0 for all x the portfolio that maximizes the Sharpe ratio is the one with maximum return.
If μT x - rf > 0, let
and y = tx (Cornuejols [1] section 8.2). Then after some substitutions, we can transform the original problem into the following form,
Only one optimization needs to be solved, hence the name “direct”. The portfolio weights can be recovered by x* = y* / t*.
For the 'iterative'
method, the idea is to iteratively
explore the portfolios at different return levels on the efficient frontier
and locate the one with maximum Sharpe ratio. Therefore, multiple
optimization problems are solved during the process, instead of only one in
the 'direct'
method. Consequently, the
'iterative'
method is slow compared to
'direct'
method.
[1] Cornuejols, G. and Reha Tütüncü. Optimization Methods in Finance. Cambridge University Press, 2007.
estimateFrontier
| estimateFrontierByReturn
| estimateFrontierByRisk
| estimatePortSharpeRatio
| setBounds
| setMinMaxNumAssets