No history yet

Stationary Time Series

The Problem with Memory

Most standard statistical tools rely on a key assumption: the data points are independent of each other. If you flip a coin ten times, the outcome of the fifth flip has no bearing on the sixth. Financial markets don't work that way. The price of a stock today is directly related to its price yesterday. This "memory" is a problem.

Applying statistical models that assume independence to time-dependent data can lead to spurious correlations. You might find a seemingly strong relationship between two assets that is entirely coincidental, a phantom pattern created by underlying trends. To build reliable trading models, we first need to address this issue of time dependence. The solution lies in a concept called stationarity.

A time series is stationary if its core statistical properties—like its mean and variance—do not change over time.

Imagine a river. A non-stationary river might be a mountain stream that starts as a trickle, widens as it flows downhill, and floods in the spring. Its average depth and the turbulence of its current are constantly changing. A stationary river is more like a long, slow canal. Its average depth remains constant, and the volatility of its flow is consistent from one mile to the next.

In statistics, we distinguish between two types. Strong stationarity requires the entire probability distribution of the data to be constant over time, a condition almost never met in real-world finance. Instead, we focus on , which is more practical and has three main requirements:

  1. The mean of the series is constant.
  2. The variance of the series is constant.
  3. The covariance between two data points depends only on the lag between them, not their position in time.

Identifying Non-Stationarity

Most asset price series are non-stationary. They exhibit trends driven by economic growth, inflation, and market sentiment. Their volatility also changes, with periods of calm followed by periods of turbulence. The statistical signature of this behavior is often called a unit root. A process with a unit root is often described as a "random walk," where each step is unpredictable and the series can wander arbitrarily far from its starting point.

To detect a unit root, we use statistical tests. The two most common are the Augmented Dickey-Fuller (ADF) test and the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test. They work as a complementary pair, testing opposite hypotheses.

TestNull Hypothesis (H₀)Interpretation of Low p-value (< 0.05)
ADFThe series has a unit root (is non-stationary).Reject H₀. The series is likely stationary.
KPSSThe series is stationary around a trend.Reject H₀. The series is likely non-stationary.

A common practice is to run both tests. If the ADF test rejects its null (suggesting stationarity) and the KPSS test fails to reject its null (also suggesting stationarity), we can be much more confident in our conclusion.

From Price to Returns

Since raw price data is almost always non-stationary, we need a way to transform it. The most common method is to convert prices into returns. This simple transformation often removes the trend, stabilizing the mean of the series.

One way to do this is through differencing, where we subtract the previous period's price from the current price. This gives us the simple return.

Rt=PtPt1R_t = P_t - P_{t-1}

However, a more robust and widely used method in quantitative finance is to calculate log returns. Log returns have several desirable statistical properties, including being time-additive, which simplifies multi-period calculations.

rt=ln(Pt)ln(Pt1)=ln(PtPt1)r_t = \ln(P_t) - \ln(P_{t-1}) = \ln\left(\frac{P_t}{P_{t-1}}\right)

By converting a non-stationary price series into a stationary returns series, we create a foundation upon which we can build predictive models. The returns series now resembles a process—a series of random, uncorrelated values with a constant mean (usually around zero) and constant variance. While financial returns are not perfect white noise, they are often close enough to be modeled effectively.

Quiz Questions 1/6

Why is the assumption of data point independence, common in standard statistical tools, often a problem when analyzing financial markets?

Quiz Questions 2/6

Which of the following is NOT a requirement for a time series to be considered weakly stationary?