Compute Sharpe ratio for one or more assets
sharpe(Asset) sharpe(Asset,Cash) Ratio = sharpe(Asset,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
NUMSERIES assets with
for each asset in a
given either a scalar
Cash asset return or a vector
Cash asset returns, the Sharpe ratio is computed
for each asset.
The output is
vector of Sharpe ratios for each series in
Any series in
Asset with standard deviation of
returns equal to 0 has a
NaN value for its Sharpe
Cash is a vector,
not have the same number of returns but must have the same periodicity
of returns. The classic Sharpe ratio assumes that
riskless. In reality, a short-term cash rate is not necessarily riskless.
NaN values in the data are ignored.
See Sharpe Ratio.
William F. Sharpe. "Mutual Fund Performance." Journal of Business. Vol. 39, No. 1, Part 2, January 1966, pp. 119–138.