Calculate Engle’s Lagrange Multiplier (LM) test for ARCH effects.

The test regresses squared, mean-demeaned returns on lags of themselves and tests whether the resulting R-squared is significantly different from zero. A significant result (low p-value) indicates that the return series exhibits volatility clustering, and a GARCH-family model is an appropriate choice for it. A high p-value suggests fitting GARCH would not be meaningful, since there is no detectable time-varying volatility to model.

The formula is as follows:

\[\text{epsilonₜ} = \text{rₜ} - \operatorname{mean}(r),\;\; \text{the returns of period demeaned by their sample mean}\] \[\text{Auxiliary regression:}\;\; \text{epsilonₜ} ^{2} = \text{a₀} + \operatorname{Σ}(i = 1..q) \text{aᵢ} \cdot \text{epsilonₜ₋ᵢ} ^{2} + \text{uₜ},\;\; \text{with}\; q = \text{lags} (5 \;\text{by default})\] \[\text{ARCH-LM} = (T - q) \cdot R ^{2},\;\; \text{chi-squared with q degrees of freedom},\;\; \text{where T - q is the number of observations in the auxiliary regression}\]

For more information about the method, see the following paper:

  • Engle, R.F. (1982). “Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation.” Econometrica, 50(4), 987-1008.

Also known as: ARCH-LM test, Engle’s ARCH test.

ARCH-LM Test in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_arch_lm_test as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["BTCUSD", "^GSPC", "EURUSD"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.econometrics.get_arch_lm_test()

Or, after setting up the Finance Toolkit MCP, ask:

Did the daily returns of Bitcoin, the S&P 500 and the euro against the dollar show volatility clustering from 2021 to 2025, according to the ARCH-LM test?

Which returns:

  BTCUSD ^GSPC EURUSD
ARCH-LM Statistic 55.2071 165.389 67.7588
P-Value 0 0 0

Using Your Own Data

get_arch_lm_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_arch_lm_test()

Parameters

get_arch_lm_test accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe data frequency for returns (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”."weekly"
within_periodboolWhether to calculate the test within the specified period or for the entire period. Thus whether to look at the test within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to False. Note that this requires intraday data when period = ‘daily’, since a single day only nests observations when intraday data was fetched.True
lagsintThe number of lags to test for ARCH effects. Defaults to 5.10
include_benchmarkboolWhether to include “Benchmark” among the assets tested. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
Share