2
$\begingroup$

enter image description here

I want to divide the time series data into two subsets (upside and downside markets) using some statistical methods.

From the graph, it looks like

early 2004 to mid 2008 : upside

mid 2008 to early 2009 : downside

early 2009 to early 2011: upside

early 2011 to early 2012: downside

early 2012 to mid 2015: upside

mid 2015 to mid 2016: downside

mid 2016 to late 2017 : upside.

Is there any method to divide the dataset into two (upside and downside) in a logistic and systematic manner?

Thank you.

$\endgroup$
2
$\begingroup$

For any time-series of with a finite number of observations, there is an infinity of algorithms/models that could provide a split in up/down movements. In fact, for any chosen split there is an infinity of models that would give the very same split.

Anyway, if the algorithm may see the whole series, then a simple rule is the one used by equity people to define bull and bear markets: any period without a drawdown of more than, say, 20% is an up move; and vice versa for down moves.

Such a computation is implemented in the function streaks in the R package PMwR (which I maintain). An example, taken from the package docs: the upper graphic shows an equity index (the DAX) for the years 2014 and 2015; the vertical lines show the period of maximum drawdown. The second graphic shows the split into up and down moves, for a threshold value of 10%. The vertical scale is a log scale, i.e. a drop of 50% takes the same vertical distance as a rise of 100%.

DAX 2014-15 DAX split up and down

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.