liveBook · Manning

Stochastic trend

As explained in Statistics Every Programmer Needs

A stochastic trend is a non-deterministic time-dependent component that causes a series' statistical properties to change over time.

A stochastic trend is a non-deterministic time-dependent component that changes a series’ statistical properties, indicating nonstationarity. The Augmented Dickey–Fuller (ADF) test detects evidence of this trend. section 7.3.7

Interpret the ADF test as follows:

  • Treat nonstationarity as the null hypothesis. section 7.3.7
  • Reject the null when the p-value is below 0.05, concluding that the series is stationary. section 7.3.7
  • Interpret a nonsignificant gamma parameter and p-value above 0.05 as evidence of a stochastic trend. section 7.3.7
  • Account for autocorrelation with lagged differences, while recognizing sensitivity to lag length and reduced power for short or noisy series. section 7.3.7

Apple closing prices

Applying statsmodels’ adfuller function to the training series returns p = 0.5761, supporting nonstationarity. First-order differencing produces a series with p = 1.25 × 10⁻¹⁶, supporting stationarity; ACF and PACF plots compare the correlation structure before and after differencing. section 7.3.7

How Statistics Every Programmer Needs covers it

How deep it goes
Explains ADF hypotheses, regression terms, lag handling, limitations, and first-order differencing, but does not derive the test mathematically.
Examples
Demonstrates diagnosis on Apple daily closing prices using ADF, ACF, PACF, and first-order differencing.
What you can do after
Diagnose nonstationarity with statsmodels’ ADF test and evaluate first-order differencing with p-values and correlation plots.
How it connects
Links stochastic trends to nonstationarity, stationarity, autocorrelation, ACF, PACF, the ADF test, and differencing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.