Registry / data / arch
library8.0.0pypypi✓ verified 22d ago

ARCH is a Python library providing tools for financial econometrics, focusing on Autoregressive Conditional Heteroskedasticity (ARCH) models, unit root tests, cointegration analysis, and bootstrapping. It is actively developed with regular releases, with the current version being 8.0.0, requiring Python 3.10 or newer for optimal compatibility and performance.

pip install arch
INSTALL
IMPORT
SIG · ARCH
A
arch
datapythonv8.0.0
Install
15.1s avg
Import
3807ms
Disk
380MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v8.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 14.85s
py 3.11
✓ —
✓ 14.25s
py 3.12
✓ —
✓ 15.25s
py 3.13
✓ —
✓ 15.25s
py 3.9
✕ build_error
✓ 15.65s
380MB installed
● package 380MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

arch_model
from arch import arch_model
univariate
from arch import univariate
unitroot
from arch import unitroot

This example demonstrates how to fetch historical financial data, calculate returns, and then use `arch_model` to specify and fit a GARCH(1,1,1) model with a Student's T distribution. It prints a summary of the fitted model. Note that `pandas_datareader` is used for data fetching and needs to be installed separately.

import datetime as dt import pandas_datareader.data as web from arch import arch_model # Fetch financial data (example: FTSE 100 index) # Requires 'pandas_datareader' to be installed (pip install pandas_datareader) st = dt.datetime(1990,1,1) en = dt.datetime(2014,1,1) data = web.DataReader('^FTSE', 'yahoo', start=st, end=en) returns = 100 * data['Adj Close'].pct_change().dropna() # Initialize and fit an ARCH model am = arch_model(returns, vol='Garch', p=1, o=1, q=1, dist='StudentsT') res = am.fit(update_freq=5) print(res.summary())
arch --version
Debug
Known issues
breakingVersion 8.0.0 and later require Python 3.10+. Older Python versions are no longer supported. The build system has also moved from setuptools to Meson.
fix
Upgrade your Python environment to 3.10 or newer. If you encounter build issues, ensure your environment is compatible with Meson or consider `--no-binary` installation if performance is not critical and a compiler is unavailable.
affects: 8.0.0+
gotchaWhen using `arch` for financial econometrics, proper handling and preparation of time-series data (e.g., ensuring correct datetime indices, handling missing values, and calculating returns appropriately) is crucial for valid model results. External libraries like `pandas_datareader` (used in quickstart) are not core dependencies and must be installed separately.
fix
Always preprocess your time-series data carefully using libraries like Pandas. Validate data types and structures before feeding them into `arch` models. Install any external data acquisition libraries required for your specific workflow separately.
affects: All
gotchaMixing `pip` installations with system-managed Python packages (e.g., via `pacman` on Arch Linux) can lead to conflicts, especially during Python version updates. This can break virtual environments and lead to 'module not found' errors.
fix
Always use virtual environments (e.g., `venv`, `conda`, `pyenv`) for your Python projects to isolate dependencies. Install all project-specific packages within the activated virtual environment using `pip`.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'arch'
The 'arch' library is not installed in the Python environment.
fix
Install the 'arch' library using pip: 'pip install arch'.
ImportError: cannot import name 'ConstantMean' from 'arch'
Attempting to import 'ConstantMean' directly from 'arch' instead of its submodule.
fix
Import 'ConstantMean' from the correct submodule: 'from arch.univariate import ConstantMean'.
ModuleNotFoundError: No module named 'arch' despite it showing in pip list
The 'arch' library is installed in a different Python environment than the one currently in use.
fix
Ensure that the Python interpreter being used matches the environment where 'arch' is installed, or reinstall 'arch' in the correct environment.
ImportError: No module named 'arch'
The 'arch' package is not installed in the active Python environment, or the environment is not correctly configured or activated.
fix
Ensure 'arch' is installed using `pip install arch`. If using virtual environments, make sure the correct environment is activated before running your script.
AttributeError: type object 'arch.univariate.recursions.array' has no attribute '__reduce_cython__'
This error typically indicates a compatibility issue or conflict between different versions of Cython used to compile 'arch' or its dependencies, or a mismatch with the installed Python version.
fix
Try reinstalling 'arch' in a clean virtual environment (`pip install arch`). If the issue persists, consider trying a specific older version of 'arch' that is known to be compatible with your Python/Cython setup (e.g., `pip install arch==4.6.0`).
Upgrade
Version history
8.0.0latest on PyPI · released Oct 21, 2025
Audit
Dependencies
numpyrequiredFundamental package for numerical computing in Python, essential for array operations and mathematical functions underlying econometric models.
scipyrequiredProvides scientific computing tools, including advanced mathematical algorithms and statistical functions used in ARCH models.
pandasrequiredOffers high-performance, easy-to-use data structures and data analysis tools, crucial for handling time-series financial data.
statsmodelsrequiredIntegrates closely for a wide range of statistical models and tests beyond what `arch` directly implements.
matplotliboptionalUsed for plotting and visualizing results from econometric models.
cythonoptionalOptional dependency to improve performance through C extensions.
numbarequiredOptional dependency for just-in-time compilation to further enhance performance, especially if Cython is not used or a compiler is unavailable.
Agent activity
53 hits · last 30 days
node
48
OpenAI (training)
1
Resources
arch — pip install arch · libregistry