apaSharpeRatio(PortfolioReturns, RiskfreeReturns, IsSampleOtherwisePopulation)
=apaSharpeRatio(PortfolioReturns, RiskfreeReturns, IsSampleOtherwisePopulation)Result
Returns the Sharpe ratio of a portfolio, a risk-adjusted performance measure.
Syntax
PortfolioReturns: r x 1 vector of portfolio returns
RiskfreeReturns: r x 1 vector of riskfree returns
IsSampleOtherwisePopulation: optional; TRUE for sample volatility (division by n-1), FALSE for population volatility (division by n); default: TRUE
Algorithm
Remarks
The input time series are assumed to be continuous returns. If you are processing discrete returns, first transform them with apaReturns.DiscreteToContinuous.
The volatility is the sample (denominator n − 1) or population (denominator n) standard deviation, set by IsSampleOtherwisePopulation; default: sample.
Both portfolio returns and riskfree returns must have the same frequency (e.g. daily, monthly, annually). The result will have the same frequency as the input data (i.e. daily Sharpe ratios from daily data, monthly Sharpe ratios from monthly data).
