Displaying 1 result from an estimated 1 matches for "maximumdrawdown".
2006 May 17
5
Convention difference in tseries.maxdrawdown (PR#8872)
...nstra
Version: 2.2.1
OS: WinXP, OSX
Submission from: (NULL) (63.172.178.137)
The maxdrawdown function in tseries defines the maximum drawdown in terms of
absolute dollars (or whatever units the input is in). Industry convention is to
do this in percentage terms. I have written the code below as
maximumdrawdown(), which retains backward compatibility with the current
version. It has the flaw that it does not check for zero or negative values.
maximumdrawdown <- function (x)
{
if (NCOL(x) > 1)
stop("x is not a vector or univariate time series")
if (any(is.na(x)))...