apaPainRatio(Returns, RiskfreeReturns, PeriodsPerYear)
Excel
=apaPainRatio(Returns, RiskfreeReturns, PeriodsPerYear)Result
Returns the pain ratio, the mean excess return divided by the pain index.
Syntax
Returns: r x c matrix of returns. Each column represents a different time series.
RiskfreeReturns: optional; single value, r x 1 vector (shared by all columns) or r x c matrix of riskfree returns per period; default: 0
PeriodsPerYear: optional; number of return periods per year used to annualize the mean excess return, e.g. 12 for monthly data; default: 1 (per-period result)
Algorithm
Pain ratio = PeriodsPerYear · mean(r − rf) / pain index, see apaPainIndex.
Remarks
The result is a 1 x c row vector with one value per column of Returns.
#N/A is returned if the series has no drawdown.
