7
$\begingroup$

I have a financial time series that has a linear down trend, but sometimes a jump happens (see image below).

What statistical methods can I use to detect these jumps as early as possible?

linear trend with jumps

$\endgroup$
2
  • 5
    $\begingroup$ If you could anticipate the jumps in VXX you'd be the richest man on the planet. $\endgroup$
    – bill_080
    Jan 20, 2013 at 0:59
  • $\begingroup$ Have you searched our site? Please take a look at all the questions tagged change-point. You might be especially interested in one also tagged online at stats.stackexchange.com/questions/43254/… (even though, unfortunately, it is still unanswered). $\endgroup$
    – whuber
    Jan 20, 2013 at 10:52

3 Answers 3

6
$\begingroup$

A "Jump" in a time series is a permanent change in the equation's implied intercept. Consider a series 1,1,1,1,4,4,4,4,4 where the basic model is y(t)=1 + 3*x(t) and x is the level shift/step shift series 0,0,0,0,1,1,1,1,1 . Thus suggests an intercept change at period 5 from a "1" to a "4" . If a second series is 1,2,3,4,8,9,10,11,12 then the model is [1-B]y(t)=1 + 3*[1-B]x(t) where x is the series 0,0,0,0,1,1,1,1,1 suggesting an intercept change at period 5 from a "1" to a '4". Detecting a jump in a time series is called Intervention Detection. A pulse intervention is a one period change in the equation's implied intercept. The series 1,1,1,1,4,1,1,1,1 is y(t)=1+3*z(t) where z(t) =0,0,0,0,1,0,0,0,0 and if z=x[1-B] we have y(t)=1+3*[1-B]x ; x being 0,0,0,0,1,1,1,1,1. A Seasonal Pulse is pulse that appears at fixed seasonal points in time e.g. a June effect.

Pursuing the identification of the level shift and it's duration ,one might review Tsay's paper "Outliers, level shifts, and variance changes in time series" and then pursue some of my previous posts on this subject along with what other responders have said.

Identifciation of the "jump points" should not be done without taking into account necessary ARIMA structure or the effect of needed causal variables. Furthermore since both ARIMA parameters and the error variance may change over time consideration needs to be taken in these regards.

Commercial software is available to perform this ientification. SAS , SPSS and AUTOBOX ( which I am involved with ) come to mind as places for you to investigate. I would start by simulating some time series and then testing out various "automated" solutions by actually using their free downloadable software.

Hope this helps.

P.S. The term "CHANGE POINT" is purposely vague. A change point may have a number of causes

  1. Pulse/level shift/seasonal pulse/local time trend starts

  2. A change in parameters has been detected ( possibly via the Chow Test http://en.wikipedia.org/wiki/Chow_test as IMA pointed out below ). Note that some software actually searches for the breakpoint as compared to the user having to suggest it.

  3. A change in the variance of the errors has been detected

  4. A change in the way a predictor series (x) impacts the series of interest (y)

$\endgroup$
2
  • $\begingroup$ Thank you! This gives me a good starting point to learn about this. $\endgroup$
    – Victor
    Jan 21, 2013 at 1:11
  • 1
    $\begingroup$ If you have otherwise identified a model as IrishStat posted, then the corresponding test would be a "Chow test" if you know possible break points and a "Quandt Likelikehood Ratio Test (QLR)" if you do not know the break point. Since this is a financial timeline and most likely discrete, I would recommend checking out econometrics books. Basic would be the Stock&Watson, more advanced Hayashi or Greene, advanced insights using the Hamilton. This should explain what you need to know. Sadly there is little online about the QLR. $\endgroup$
    – IMA
    Jan 21, 2013 at 12:29
1
$\begingroup$

Some things to toy with:

Note that these methods can only detect changes/jumps and have no ability to predict a jump.

$\endgroup$
1
$\begingroup$

You can use mcp for this kind of models. Time series often exhibit autocorrelation, so let's just to an AR(1) model with three linear segments. First, let's specify the model:

model = list(
  y ~ 1 + x + ar(1),  # Linear segment. Initiate AR(1)
  ~ 1 + x,  # linear
  ~ 1 + x
)

Now fit it:

library(mcp)
fit = mcp(model, df)

As an extra trick, if the slope is identical between segments, you can set this identity using a prior. This fits one slope parameter instead of three:

prior = list(x_2 = "x_1", x_3 = "x_1")
fit = mcp(model, data = df, prior = prior)

Read more on the mcp website. Disclaimer: I am the developer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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