Skip to content

corrections vs drawdowns

6 messages · Brian G. Peterson, Alec Schmidt, Enrico Schumann

#
I tried to use the function findDrawdowns() to compile NASDAQ (^IXIC) corrections. For the sample starting on

2007-01-01, I get the following start -to-trough periods with drawdowns higher than 10%

08/30/2018 - 12/24/2018 (-23.64%) [80 Days]
07/21/2015 - 02/11/2016 (-18.24%) [143 Days]
09/17/2012 - 11/15/2012 (-10.90%) [42 Days]
03/27/2012 - 06/01/2012 (-12.01%) [47 Days]
05/02/2011 - 10/03/2011 (-18.71%) [108 Days]
11/01/2007 - 03/09/2009 (-55.63%) [339 Days]


However, if the sample starts on 2000-06-01, I get
08/30/2018 - 12/24/2018 (-23.64%) [80 Days]
07/21/2015 - 02/11/2016 (-18.24%) [143 Days]
07/18/2000 - 10/09/2002 (-73.94%) [559 Days]

i.e. no bear market of 2008...

This is because ^IXIC didn't recover in 2007 from its fall from top in 2000. This implies that various reports on market corrections do not use the max drawdown. Is there consensus (and possibly R scripts) that address this problem?

Thanks! Alec
#
Alec,

I suspect that you may wish to start with setting geometric=FALSE in
your call to findDrawdowns.

Corrections are usually defined as a peak to trough difference in
*price*, as a percentage of the peak price.

So I think you do not want to compound the *returns* in calculating
your drawdowns.

Regards,

Brian
#
Thank you Brian,

geometric=FALSE gave me additional corrections in 2011 and 2012 but still no bear market of 2008:



08/30/2018 - 12/24/2018 (-11.04%) [80 Days]
07/21/2015 - 02/11/2016 (-10.05%) [143 Days]
09/17/2012 - 11/15/2012 (-8.42%) [42 Days]
03/27/2012 - 06/01/2012 (-9.44%) [47 Days]
07/08/2011 - 08/19/2011 (-15.96%) [31 Days]
05/02/2011 - 06/17/2011 (-7.59%) [34 Days]
02/22/2011 - 03/16/2011 (-6.54%) [17 Days]
07/18/2000 - 10/09/2002 (-97.34%) [559 Days]


Alec
#
I think that this is correct.  NASDAQ was still in a drawdown.  NASDAQ
didn't make new all-time highs until 2014.

Some people define 'corrections' as drawdown from most recent peak. 
Charles Schwab's definition is in-line with generally accepted usage:

https://www.schwab.com/resource-center/insights/content/market-correcti
on-what-does-it-mean

The Motley Fool uses a similar but not identical definition:

https://www.schwab.com/resource-center/insights/content/market-correcti
on-what-does-it-mean

quantmod has a 'findPeaks' function, but this is dependent on you
setting a threshold for what defines a peak.

A related Stack Overflow question may provide something in the
direction of what you're looking for to look at drawdown from a recent
peak.

https://stackoverflow.com/questions/14737899/calculate-cumulatve-growth
-drawdown-from-local-min-max

I would certainly be happy to include a 'findCorrections' function in a
later version of PerformanceAnalytics if we could parameterize what
constitutes a 'recent high' for that purpose.

Regards,

Brian
On Tue, 2019-01-08 at 16:36 +0000, Alec Schmidt wrote:
#
On Tue, 08 Jan 2019, Alec Schmidt writes:
Perhaps the function 'streaks' in package
'PMwR' does what you want.

  library("tseries")
  library("PMwR")
  z <- get.hist.quote("^IXIC", quote = "Close", retclass = "zoo",
                      start = as.Date("2007-1-1"))
  streaks(z)
  ##        start        end state      return
  ## 1 2007-01-03 2007-03-05  <NA> -0.03403819
  ## 2 2007-03-05 2007-10-31    up  0.22149128
  ## 3 2007-10-31 2008-11-20  down -0.53967656
  ## 4 2008-11-20 2009-01-06    up  0.25549343
  ## 5 2009-01-06 2009-03-09  down -0.23223471
  ## 6 2009-03-09 2018-08-29    up  5.39242799
  ## 7 2018-08-29 2019-01-04  down -0.16903607



See also 

https://stats.stackexchange.com/questions/354157/determining-up-down-market-trends-in-timeseries-data/373622#373622

https://cran.r-project.org/web/packages/PMwR/vignettes/Drawdowns_streaks.pdf
#
Brian,

Thanks again. It would be great if you implement findCorrections(). I think it becomes a popular topic... ?

On top of my head, the default version needs just one parameter, ie. if we're looking for corrections of 10%, let's check them after every peak of 10%+ since the last correction's trough. But of course there may be a more generic setup.

Alec