[R-SIG-Finance] findDrawdowns/maxDrawdown clarification, please?

Jorge Nieves jorge.nieves at moorecap.com
Wed Jan 14 17:46:43 CET 2009


I have a hypothetical  time series for some cumulative PNL.  I am trying
to use the findDrawdowns function from the PerformanceAnalytics package.
When I pass the series to the function, I get an error message which
meaning I do not understand. Can some one shed some light about what I
am doing wrong?  
The function seems to work when using returns instead of dollar amounts
(which is my case). I am also using the maxDrawdown <maxDrawdown.html>
function, and this last one appears to work well with either returns or
dollar amounts. I am just wondering if this is driving my error message.

On the other had, the example used in the help(findDrawdowns) is based
on returns of the edhec[,"Funds.of.Funds"] . These returns appear to be
monthly returns. I would like to understand if the idea behind the
findDrawdowns should be applied to a cumulative returns/pnl instead just
monthly (or other frequency) returns/pnl? I believe that drawdown is
defined as the difference between today's cumulative pnl and the "high
water mark" highest point cumulative pnl, but my interpretation could be
completely wrong. Can some one explain?



> ser <- results[samper,"cumpnl",drop=FALSE]
> # write.csv(ser,"test.csv")
> plot(ser,type = "l",col= "red")
> toto = findDrawdowns(ser)
Error in if (thisSign == priorSign) { : 
  missing value where TRUE/FALSE needed


Jorge Nieves
Phone 212.782.7083
Fax 212.642.7644

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20090114/5e1fb15d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.csv
Type: application/octet-stream
Size: 25630 bytes
Desc: test.csv
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20090114/5e1fb15d/attachment.obj>

More information about the R-SIG-Finance mailing list