Skip to Main Content Skip to Search
Product Documentation

sharpe - Compute Sharpe ratio for one or more assets

Syntax

sharpe(Asset)
 	sharpe(Asset, Cash)
 	Ratio = sharpe(Asset, Cash)

Arguments

Asset

NUMSAMPLES-by-NUMSERIES matrix with NUMSAMPLES observations of asset returns for NUMSERIES asset return series.

Cash

(Optional) Either a scalar return for a riskless asset or a vector of asset returns to be a proxy for a riskless asset. In either case, the return periodicity must be the same as the periodicity of Asset. For example, if Asset is monthly data, then Cash must be monthly returns. If no value is supplied, the default value for Cash returns is 0.

Description

Given NUMSERIES assets with NUMSAMPLES returns for each asset in a NUMSAMPLES-by-NUMSERIES matrix Asset and given either a scalar Cash asset return or a vector of Cash asset returns, the Sharpe ratio is computed for each asset.

The output is Ratio, a 1-by-NUMSERIES row vector of Sharpe ratios for each series in Asset. Any series in Asset with standard deviation of returns equal to 0 will have a NaN value for its Sharpe ratio.

Examples

See Sharpe Ratio Example.

References

William F. Sharpe, "Mutual Fund Performance," Journal of Business, Vol. 39, No. 1, Part 2, January 1966, pp. 119-138.

See Also

inforatio | portalpha

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS