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?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
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
Pulse/level shift/seasonal pulse/local time trend starts
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.
A change in the variance of the errors has been detected
A change in the way a predictor series (x) impacts the series of interest (y)
Some things to toy with:
Note that these methods can only detect changes/jumps and have no ability to predict a jump.
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.