[R-SIG-Finance] findDrawdowns/maxDrawdown clarification, please?
Brian G. Peterson
brian at braverock.com
Wed Jan 14 18:34:16 CET 2009
The drawdown calculations should work with simple return series. The
functions internally calculate the cumulative wealth index and use that to
calculate the drawdown. If you have a price series, you should first
convert to a simple return series.
Drawdowns, by definition, are based on returns.
Regards,
- Brian
On Wed, January 14, 2009 10:46 am, Jorge Nieves wrote:
> Hi,
>
> 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?
>
>
> Thanks,
>
> Jorge
>
> CODE
>> 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
>
> <<test.csv>>
>
> Jorge Nieves
> Phone 212.782.7083
> Fax 212.642.7644
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the R-SIG-Finance
mailing list