To calculate Pain ratio we divide the difference of the portfolio return and the risk free rate by the Pain index

PainRatio(R, Rf = 0, ...)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

Rf

risk free rate, in same period as your returns

any other passthru parameters

Details

$$Pain ratio = \frac{r_P - r_F}{\sum^{n}_{i=1} \frac{\mid D'_i \mid}{n}}$$

where \(r_P\) is the annualized portfolio return, \(r_F\) is the risk free rate, \(n\) is the number of observations of the entire series, \(D'_i\) is the drawdown since previous peak in period i

References

Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.91

Examples

data(portfolio_bacon) print(PainRatio(portfolio_bacon[,1])) #expected 2.66
#> portfolio.monthly.return.... #> Pain Index 2.657647
data(managers) print(PainRatio(managers['1996']))
#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 EDHEC LS EQ #> Pain Ratio (Rf = 0) 36.7226 36650.56 43.38967 28.17458 NA NA NA #> SP500 TR US 10Y TR US 3m TR #> Pain Ratio (Rf = 0) 31.62377 0.01188003 Inf
print(PainRatio(managers['1996',1]))
#> HAM1 #> Pain Index 36.7226