Beginner question

Hi guys!

Probably a silly question but according to this backtest...
Beginning of 2007 SPY is at 72.01%,
Beginning of 2008 SPY is at 78.66%
Beginning of 2009 SPY is at 13.95%

But the draw down SPY between 2008-2009 was less than 2009s beginning % subtracted from 2008s beginning %. Why is that?

6 responses

Maybe of help here in looking into it, but be sure to check this code carefully. Before a run, click in margin on line numbers, to set breakpoints.
Now, one thing I noticed, the Risk Metrics tab here says -.01. The backtest -.84, while the custom chart would be -.24 unless I'm mistaken.
Founder on drawdown: https://www.quantopian.com/posts/calculation-of-cumulative-max-drawdown

Very interesting, thank you.

@Blue Seahawk I'm not sure I phrased my question correctly, how can the total return of SPY that peaks at 92% fall to -11% when the market fell about 1/2 of that?

Joshua,

Maximum Drawdown(MDD) is expressed in percentage terms and computed as:

MDD = (Trough Value – Peak Value) / Peak Value

What you see on the graph(1/1/2008 79.23%) is cumulative return.

To get value or equity you need to add initial investment (100%)

1/1/2008 Value = 79.23% + 100% = 179.23%

1/1/2009 Value = 13.95% + 100% = 113.95%

For the period from 1/1/2008 to 1/1/2009

MDD = ( 113.95% - 179.23%)/179.23% = -36.42% not (13.95% - 79.23% = -65.28%).

this was exactly what I needed. thank you so much

As runnable code for a drawdown value one can use for making decisions could be useful to some.