Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 8 — Stationarity

In the previous chapter, we introduced stochastic processes, white noise, persistence, and random walks.

We now turn to one of the most important concepts in time series analysis:

This idea is captured by the concept of stationarity.

Stationarity plays a central role in:


Learning Objectives

By the end of this chapter, you should be able to:


8.1 Why Does Stationarity Matter?

Suppose we use historical data to forecast the future.

This only makes sense if the underlying probabilistic structure remains reasonably stable over time.

Examples

A stationary series might exhibit:

A nonstationary series might exhibit:


8.2 Strict Stationarity

We begin with the most general definition.

More formally:

Ft1+h,,tn+h(x1,,xn)=Ft1,,tn(x1,,xn)F_{t_1+h,\dots,t_n+h}(x_1,\dots,x_n) = F_{t_1,\dots,t_n}(x_1,\dots,x_n)

for all:

Example

If we look at:

their joint distributions should be identical under strict stationarity.


8.3 Weak Stationarity

In practice, strict stationarity is often stronger than necessary.

Most time series methods instead rely on weak stationarity.


8.4 Mean and Variance Stability

A stationary process has stable first and second moments.

Constant Mean

E[Xt]=μE[X_t] = \mu

does not depend on time.

Constant Variance

Var(Xt)=σ2Var(X_t) = \sigma^2

does not change over time.

Stable Covariance Structure

The covariance:

Cov(Xt,Xth)Cov(X_t, X_{t-h})

depends only on lag hh.


8.5 White Noise Revisited

Recall white noise from Chapter 7.

White noise satisfies:

Thus white noise is stationary.

Simulating White Noise

Source
import numpy as np
import matplotlib.pyplot as plt

np.random.seed(10101)

wn = np.random.normal(0, 2, 500)

plt.figure(figsize=(10,4))
plt.plot(wn, lw=1)
plt.title("Simulated White Noise")
plt.xlabel("Time")
plt.ylabel("$w_t$")

# plt.savefig("figs/ch8/wn.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
White Noise

8.7 Random Walks Revisited

Now consider the random walk:

xt=xt1+wtx_t = x_{t-1} + w_t

where wtw_t is white noise.

Simulating a Random Walk

Source
np.random.seed(123)

w = np.random.normal(0, 1, 500)
x = np.cumsum(w)

plt.figure(figsize=(10,4))
plt.plot(x, lw=1)
plt.title("Simulated Random Walk")
plt.xlabel("Time")
plt.ylabel("$x_t$")

# plt.savefig("figs/ch7/rw.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
Random Walk

8.9 Why Random Walks Are Nonstationary

A random walk violates stationarity because:

Variance of a Random Walk

Recall:

xt=s=1twsx_t = \sum_{s=1}^t w_s

Therefore:

Var(xt)=tσw2Var(x_t) = t \sigma_w^2

This violates weak stationarity.


8.10 Stationary vs Nonstationary Series

FeatureStationaryNonstationary
Mean stableYesNot necessarily
Variance stableYesOften no
Dependence stableYesOften no
Shocks temporaryUsuallyOften persistent

8.11 Trend Stationary vs Difference Stationary

Not all nonstationary series behave in the same way.

Trend-Stationary Processes

Some series fluctuate around a deterministic trend:

xt=α+βt+utx_t = \alpha + \beta t + u_t

where utu_t is stationary.

Removing the trend leaves a stationary process.

Difference-Stationary Processes

Other series become stationary only after differencing.

Random walks are the classic example.


8.12 Why Stationarity Matters for Forecasting

Forecasting relies heavily on stable patterns.

For stationary processes:

For nonstationary processes:


8.13 Why Stationarity Matters for Regression

Nonstationary variables can create misleading statistical relationships.

Two unrelated trending variables may appear strongly related.

This problem is called:

We study this in detail later in latter chapters.


8.14 Looking Ahead

In this chapter, we introduced the idea of stationarity and saw how random walks violate it.

In the next chapter, we study:

which help us understand dependence structures in stationary time series.

Key Takeaways

Concept Check

Basic

  1. What is stationarity?

  2. What does it mean for the mean of a series to be constant?

  3. What does it mean for the variance to be constant?


Intuition

  1. Why is stationarity important in time series analysis?

  2. What happens if a series is not stationary?

  3. Why are many financial price series not stationary?


Intermediate

  1. What is the difference between:

    • a stationary series

    • a nonstationary series

  2. What is mean reversion?

  3. Why does a random walk violate stationarity?


Finance Insight

  1. Why are returns often more stationary than prices?

  2. Why is stationarity important for forecasting models?


Challenge

  1. Suppose a series shows an upward trend but stable fluctuations around that trend.


Interpretation & Practice

  1. A time series fluctuates around a constant level with no visible trend.

    • Is this likely stationary?

    • Why?


  1. A time series shows a steady upward trend.

    • What does this suggest about stationarity?

    • Why might this cause problems for modeling?


  1. A series has increasing variability over time.

    • What assumption of stationarity is violated?

    • Why does this matter?


  1. A random walk is plotted.

    • Why does it appear to “wander” without returning to a fixed level?

    • What does this imply about persistence?


  1. A differenced series appears to fluctuate around zero.

    • What does this suggest about stationarity?

    • Why is differencing useful?


Finance Interpretation

  1. A stock price series shows a strong upward trend.

    • Why is this likely nonstationary?

    • Why are returns preferred for modeling?


  1. A return series appears stable over time.

    • What does this suggest about stationarity?

    • Why is this useful in practice?


Challenge

  1. A model is estimated using nonstationary data.

    • What kind of misleading results might occur?

    • Why is this dangerous?


Numerical Practice

Identifying Stationarity

  1. Consider the following series:

    Series A:
    2, −1, 1, −2, 0, 1, −1

    Series B:
    10, 12, 15, 18, 22, 27, 33



Mean and Variance

  1. Suppose a series behaves as follows:



  1. Suppose a series shows:



Differencing

  1. Consider the series:

    100, 102, 105, 109, 114



  1. Suppose a random walk is defined as:

xt=xt1+wtx_t = x_{t-1} + w_t


Challenge

  1. Suppose a series has:



  1. Suppose you incorrectly treat a nonstationary series as stationary.