Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

estimateMaxSharpeRatio

Estimate efficient portfolio to maximize Sharpe ratio for Portfolio object

Use the estimateMaxSharpeRatio function with a Portfolio object to estimate moments of portfolio returns.

For details on the workflow, see Portfolio Object Workflow.

Syntax

[pwgt,pbuy,psell] = estimateMaxSharpeRatio(obj)

Description

example

[pwgt,pbuy,psell] = estimateMaxSharpeRatio(obj) estimates efficient portfolio to maximize Sharpe ratio for Portfolio object.

Examples

collapse all

Estimate the efficient portfolio that maximizes the Sharpe ratio.

p = Portfolio('AssetMean',[0.3, 0.1, 0.5], 'AssetCovar',...
[0.01, -0.010,  0.004; -0.010,  0.040, -0.002;  0.004, -0.002,  0.023]);
p = setDefaultConstraints(p);
plotFrontier(p, 20);
weights = estimateMaxSharpeRatio(p);
[risk, ret] = estimatePortMoments(p, weights);
hold on
plot(risk,ret,'*r');

Input Arguments

collapse all

Object for portfolio, specified using a Portfolio object.

Note

The risk-free rate is obtained from the property RiskFreeRate in the Portfolio object. If you leave the RiskFreeRate unset, it is assumed to be 0.

For more information on creating a portfolio object, see

Output Arguments

collapse all

Portfolio on the efficient frontier with a maximum Sharpe ratio, returned as a NumAssets vector.

Purchases relative to an initial portfolio for a portfolio on the efficient frontier with a maximum Sharpe ratio, returned as a NumAssets vector.

pbuy is returned for a Portfolio input object (obj).

Sales relative to an initial portfolio for a portfolio on the efficient frontier with maximum Sharpe ratio, returned as a NumAssets vector.

psell is returned for a Portfolio input object (obj).

More About

collapse all

Sharpe Ratio

The Sharpe ratio is the ratio of the difference between the mean of portfolio returns and the risk-free rate divided by the standard deviation of portfolio returns.

The estimateMaxSharpeRation function maximizes the Sharpe ratio among portfolios on the efficient frontier.

Tips

You can also use dot notation to estimate an efficient portfolio that maximizes the Sharpe ratio.

[pwgt,pbuy,psell] = obj.estimateMaxSharpeRatio;

Algorithms

The maximization of the Sharpe ratio is accomplished by a one-dimensional optimization using fminbnd to find the portfolio that minimizes the negative of the Sharpe ratio. The estimateMaxSharpeRation function takes only a fully qualified Portfolio object as its input and uses all information in the object to solve the problem.

Introduced in R2011a

Was this topic helpful?