Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PainIndex

Pain index of the return distribution


Description

The pain index is the mean value of the drawdowns over the entire analysis period. The measure is similar to the Ulcer index except that the drawdowns are not squared. Also, it's different than the average drawdown, in that the numerator is the total number of observations rather than the number of drawdowns.

Usage

PainIndex(R, ...)

Arguments

R

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

...

any other passthru parameters

Details

Visually, the pain index is the area of the region that is enclosed by the horizontal line at zero percent and the drawdown line in the Drawdown chart.

Pain index = sum(|D'i|/n)

where n is the number of observations of the entire series, D'_i is the drawdown since previous peak in period i

Author(s)

Matthieu Lestel

References

Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.89, Becker, Thomas (2006) Zephyr Associates

Examples

data(portfolio_bacon)
print(PainIndex(portfolio_bacon[,1])) #expected 0.04

data(managers)
print(PainIndex(100*managers['1996']))
print(PainIndex(100*managers['1996',1]))

PerformanceAnalytics

Econometric Tools for Performance and Risk Analysis

v2.0.4
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb], Joshua Ulrich [ctb], Eric Zivot [ctb], Dries Cornilly [ctb], Eric Hung [ctb], Matthieu Lestel [ctb], Kyle Balkissoon [ctb], Diethelm Wuertz [ctb], Anthony Alexander Christidis [ctb], R. Douglas Martin [ctb], Zeheng 'Zenith' Zhou [ctb], Justin M. Shea [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.