arch
Financial econometrics in Python: ARCH/GARCH volatility models, unit root tests, and bootstrapping.
Repository Health
Technical Analysis
arch is a comprehensive Python library for financial econometrics and time-series analysis of volatility. It provides a rich family of univariate ARCH and GARCH models for estimating and forecasting conditional variance, the backbone of modern risk and volatility modeling in finance.
Beyond volatility models, arch bundles unit root tests, cointegration testing, long-run covariance estimation, and a flexible bootstrapping framework with multiple-comparison procedures such as the Reality Check, SPA, StepM, and the Model Confidence Set. Performance-critical routines are accelerated with Cython and Numba.
What You Get
- Univariate ARCH/GARCH volatility models with flexible mean and error specifications
- Volatility forecasting with analytic and simulation-based methods
- Unit root tests (ADF, DF-GLS, Phillips-Perron) and cointegration analysis
- A bootstrapping framework for time series and IID data
- Multiple-comparison procedures: Reality Check, SPA, StepM, and Model Confidence Set
Common Use Cases
- Estimating and forecasting asset-return volatility with GARCH models
- Testing time series for unit roots and cointegration
- Computing bootstrap confidence intervals for financial statistics
- Comparing forecasting or trading models with multiple-comparison tests
Under The Hood
Architecture - The library is organized into focused subpackages: univariate builds volatility models from interchangeable mean, volatility-process, and distribution components; unitroot implements the stationarity and cointegration tests; bootstrap provides IID and time-series resampling with the multiple-comparison procedures; and covariance handles long-run covariance estimation. Models return rich result objects with parameter estimates, standard errors, and forecasting methods.
Tech Stack - Python 3 built on the scientific stack: NumPy, pandas, SciPy, and statsmodels, with Cython and/or Numba compiling hot loops for speed. It is packaged with Meson and ships a py.typed marker for full type-hint support.
Code Quality - The project is mature and rigorously engineered, with codecov-tracked coverage, an extensive tests/ suite per subpackage, static typing, and CI across platforms. Its strong maintenance and community health scores reflect active, disciplined development by Kevin Sheppard.
API Design - The API follows statsmodels conventions familiar to Python econometricians: construct a model (e.g. arch_model), call fit(), and inspect a results object or call forecast(). Combining mean/volatility/distribution components is powerful yet readable, and the extensive documentation with worked notebooks smooths the moderate learning curve inherent to the domain.