I'm a bit frustrated since the time series I am trying to analyse right now has definitely non-stationary curve but it's last values differ greatly from the mean making the time series stationary. enter image description here According to Dickey-Fuller tests, if I exclude the last 5% of the dataset, the time series is non stationary but with the whole dataset included it's totally stationary according to the test's results.

The orange box in the right part of the plot is the part of the dataset i'm excluding/including.

Should I work with 95% of the dataset?

How should one deals with such kind of problems?

I've attached an image of the time series plot and the results of the Dickey-Fuller tests.

Dickey-Fuller with the whole dataset

  • Test Statistic -4.113412
  • p-value 0.000920
  • no_of_Lags Used 9.000000
  • Number of Observations Used 112.000000
  • Critical Value (5%) -2.887712
  • Critical Value (1%) -3.490131
  • Critical Value (10%) -2.580730

Dickey-Fuller with the first 95% of the dataset

  • Test Statistic 3.435185
  • p-value 1.000000
  • no_of_Lags Used 7.000000
  • Number of Observations Used 108.000000
  • Critical Value (5%) -2.888697
  • Critical Value (1%) -3.492401
  • Critical Value (10%) -2.581255

Thanks in advance!

  • $\begingroup$ It seems that the structural break is messing with my time series $\endgroup$ Nov 13, 2018 at 8:47

1 Answer 1


You need to specify what you mean by 'analyze'.

You seem to be dealing with a structural break in your time series. If your objective is to detect anomalies or to prove that a structural break occurred, there are tools for doing that.

If your objective is forecasting, then the structural break has made your time series very difficult to forecast and your going to need a lot more data about the periods after the break to be able to generate any reliable forecasts.

You will also want to look into some causal analysis of why the break happened.


Your Answer

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

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