Metadata-Version: 2.4
Name: arfima
Version: 1.0.4
Summary: A custom AutoRegressive Fractionally Integrated Moving Average (ARFIMA) time series library.
Author-email: Shaad Hafeez <shaadhafeezofficial@gmail.com>
Project-URL: Homepage, https://github.com/github-shaad/arfima-python
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Dynamic: license-file

# ARFIMA Python

A lightweight, fast Python library for modeling long-memory time series using AutoRegressive Fractionally Integrated Moving Average (ARFIMA) models.

## The Math

Traditional ARIMA models require integer differencing, which can erase long-term trends. ARFIMA allows for fractional differencing to capture "long-memory" processes. The model solves the general equation:

$$\phi(L)(1-L)^d y_t = \theta(L)w_t$$

Where:
* $L$ is the lag operator.
* $d$ is the fractional integration parameter ($$-0.5 < d < 0.5$$).
* $\phi$ and $\theta$ are the Autoregressive (AR) and Moving Average (MA) polynomials.
* $w_t$ represents the white noise.

## Key Features

* **Fast Fractional Differencing:** Uses Fast Fourier Transform (FFT) for fractional integration and differencing.
* **Automatic Grid Search:** Automatically finds the optimal lag structure using information criteria (AIC, BIC, HQIC, or AICc).
* **Statistical Inference:** Calculates the inverse Hessian matrix to provide standard errors, t-statistics, and exact p-values.
* **Forecasting:** Built-in methods for both in-sample historical reconstruction and out-of-sample predictions.

## Installation

```bash
pip install arfima
```
## Changelog
* **v1.0.3**: Fix import
* **v1.0.2**: Minor bug fixes and docstring improvements.
* **v1.0.1**: Fixed inverted AR/MA polynomials in forecast generation.
* **v1.0.0**: Initial release.
