Chow-Dickey-Fuller Test
Calculate the Chow-type Dickey-Fuller test for a switch from a random walk to explosive behaviour at an unknown date, per asset (López de Prado, 2018, section 17.3.3; Homm and Breitung, 2012).
The regression lets the log prices follow a random walk up to a break date and an explosive process after it, and the statistic is the t-statistic of the explosive coefficient. Every date in the middle of the sample is tried as the break; the largest statistic (SDFC) is compared with critical values simulated under a random walk, and its date is the most likely start of the explosive regime. Unlike the Chow test of get_chow_test, which tests a known break in the coefficients of a regression, the break date is unknown and the alternative is a bubble.
The formula is as follows, with \(y_{t}\) the log of the column (Adj Close by default) minus its first value, so the test does not depend on the level of the prices:
- Critical values and the p-value from
simulationsGaussian random walks of the same length started at zero
The book writes the regression on the log prices as they are; here their first value is subtracted, so the statistic does not change with the price level.
Also known as: DFC, SDFC, Chow-type Dickey-Fuller, sup DFC, Homm-Breitung test, explosive break test.
Example · NVDA, KO · 2016 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_chow_dickey_fuller_test:
from financetoolkit import Toolkit
toolkit = Toolkit(
["NVDA", "KO"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2016-01-01",
end_date="2025-12-31",
)
toolkit.econometrics.get_chow_dickey_fuller_test()
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
Did the share prices of Nvidia and Coca-Cola switch from a random walk to explosive growth at some date from 2016 to 2025, according to the Chow-type Dickey-Fuller test?
Which returns:
| Item | NVDA | KO |
|---|---|---|
| SDFC Statistic | 2.7139 | 1.0339 |
| Break Date | 2019-06-03 | 2023-10-05 |
| P-Value | 0.0040 | 0.2100 |
| Critical Value 10% | 1.4845 | 1.4845 |
| Critical Value 5% | 1.8067 | 1.8067 |
| Critical Value 1% | 2.4087 | 2.4087 |
| Observations | 2,514.0000 | 2,514.0000 |
| Replications | 1,000.0000 | 1,000.0000 |
| Explosive (5%) | 1.0000 | 0.0000 |
9 rows
Using Your Own Data
get_chow_dickey_fuller_test runs on any data, not only prices: ratios, economic indicators, yield curves or your own dataset. Pass a DataFrame, a Series or a dictionary of them to Econometrics as data, with the dates in the rows or the columns, and set changes to how its changes are calculated: "percentage", "log", "difference" for rates and ratios, or None when the data are changes already. For example, for the monthly unemployment rates of the United States and Germany:
from financetoolkit import Economics, Econometrics
economics = Economics(start_date="2000-01-01")
unemployment = economics.get_unemployment_rate(
countries=["United States", "Germany"], period="monthly"
)
econometrics = Econometrics(data=unemployment, changes="difference")
econometrics.get_chow_dickey_fuller_test()
Parameters
get_chow_dickey_fuller_test accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The data frequency (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”. | "weekly" |
column | str | The historical data column to test. Defaults to “Adj Close”. | "Return" |
trim | float | The share of observations at either end that is not tried as the break date. Defaults to 0.15. | 0.1 |
simulations | int | The number of simulated random walks for the critical values. Defaults to 1000. | 1000 |
seed | int | The seed of the simulation. Defaults to 0. | 42 |
log_prices | bool | Whether to take the natural logarithm of the series first. Pass False for a series that can be zero or negative, such as a rate. Defaults to True. | True |
time_series | bool | Whether to return \(\text{DFC} (\tau)\) per break date instead of the test. Defaults to False. | False |
include_benchmark | bool | Whether to include “Benchmark” among the assets. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
References
- Paper Homm, U. and Breitung, J. (2012). “Testing for Speculative Bubbles in Stock Markets: A Comparison of Alternative Methods.” Journal of Financial Econometrics, 10(1), 198-231.
- Paper Andrews, D.W.K. (1993). “Tests for Parameter Instability and Structural Change With Unknown Change Point.” Econometrica, 61(4), 821-856.
- Paper López de Prado, M. (2018). “Advances in Financial Machine Learning.” Wiley, section 17.4.1.