R/table.Drawdowns.R
table.Drawdowns.RdCreates table showing statistics for the worst drawdowns.
table.Drawdowns(R, top = 5, digits = 4, geometric = TRUE, ...)an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
the number of drawdowns to include
number of digits to round results to
utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default TRUE
any other passthru parameters
Returns an data frame with columns:
From starting period, high water mark
Trough period of low point
To ending period, when initial high water mark is recovered
Depth drawdown to trough (typically as percentage returns)
Length length in periods
toTrough number of periods to trough
Recovery number of periods to recover
Bacon, C. Practical Portfolio Performance Measurement and
Attribution. Wiley. 2004. p. 88
data(edhec)
table.Drawdowns(edhec[,1,drop=FALSE])
#> From Trough To Depth Length To Trough Recovery
#> 1 2007-11-30 2008-11-30 2009-09-30 -0.2927 23 13 10
#> 2 2004-05-31 2005-05-31 2006-02-28 -0.0822 22 13 9
#> 3 1998-08-31 1998-10-31 1999-03-31 -0.0712 8 3 5
#> 4 2020-03-31 2020-03-31 2020-07-31 -0.0700 5 1 4
#> 5 2015-06-30 2016-02-29 2016-07-31 -0.0527 14 9 5
table.Drawdowns(edhec[,12,drop=FALSE])
#> From Trough To Depth Length To Trough Recovery
#> 1 2009-03-31 2017-11-30 <NA> -0.7687 148 105 NA
#> 2 1998-09-30 2000-08-31 2002-09-30 -0.4956 49 24 25
#> 3 2002-10-31 2007-05-31 2009-02-28 -0.3630 77 56 21
#> 4 1997-04-30 1997-09-30 1998-03-31 -0.1502 12 6 6
#> 5 1997-01-31 1997-01-31 1997-02-28 -0.0166 2 1 1
data(managers)
table.Drawdowns(managers[,8,drop=FALSE])
#> From Trough To Depth Length To Trough Recovery
#> 1 2000-09-30 2002-09-30 2006-10-31 -0.4473 74 25 49
#> 2 1998-07-31 1998-08-31 1998-11-30 -0.1537 5 2 3
#> 3 2000-01-31 2000-02-29 2000-03-31 -0.0682 3 2 1
#> 4 1999-07-31 1999-09-30 1999-11-30 -0.0624 5 3 2
#> 5 1997-08-31 1997-08-31 1997-11-30 -0.0560 4 1 3
result=table.Drawdowns(managers[,1,drop=FALSE])
# This was really nice before Hmisc messed up 'format' from R-base
#require("Hmisc")
#textplot(Hmisc::format.df(result, na.blank=TRUE, numeric.dollar=FALSE,
# cdec=c(rep(3,4), rep(0,3))), rmar = 0.8, cmar = 1.5,
# max.cex=.9, halign = "center", valign = "top", row.valign="center",
# wrap.rownames=5, wrap.colnames=10, mar = c(0,0,3,0)+0.1)
# title(main="Largest Drawdowns for HAM1")