PainIndex | R Documentation |
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.
PainIndex(R, ...)
R |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
... |
any other passthru parameters |
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
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Carl Bacon, Practical portfolio performance measurement
and attribution, second edition 2008 p.89, Becker, Thomas (2006) Zephyr Associates
See also package PerformanceAnalytics
.
data(assetReturns) R=assetReturns[, -29] # Not run # PainIndex(R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.