Exact maximum likelihood estimation of univariate time series (ARMAX with transfer functions)
Project description
fue — Exact Maximum Likelihood for Univariate Time Series
fue is a Python implementation of the FUE/FUF estimation engine originally written in C by Arthur B. Treadway and David E. Guerrero, based on the algorithms designed and coded by José Alberto Mauricio. It fits ARMAX models with linear transfer-function interventions by exact maximum likelihood using the Ansley (1979) innovations form and the Mauricio (1997, AS 311) / Mauricio (1995, JASA) algorithms.
Features
- Exact ML estimation of ARIMA/SARIMA/ARMAX models (Box–Jenkins family)
- Seasonal and non-seasonal AR/MA operators; regular and seasonal differencing
- Linear transfer function interventions: impulse, step, ramp, Fourier harmonics, alternator, and arbitrary user-defined regressors
- Fixed-frequency AR/MA factors (AR(2) with constrained spectral peak)
- Box–Cox transformation with automatic back-transformation of forecasts
- Multi-step forecasts with asymptotic prediction intervals
- ASCII
.outand.prereport output compatible with the C FUE binary - HTML forecast reports (requires
jinja2) - CLI tools
fueandfufmirroring the C binaries
Installation
pip install fue # pure Python (numpy + scipy + matplotlib)
pip install "fue[report]" # + HTML forecast reports (jinja2)
pip install "fue[pdf]" # + PDF export (weasyprint)
Python 3.10+ required.
Quick start
import numpy as np
import fue
# Build a time series
data = np.array([...]) # monthly observations
ts = fue.TimeSeries(data, freq=12, start=(2002, 1), name="CPI")
# Specify an ARIMA(1,1,0)(1,0,0)_12 model with a log transform
m = fue.Model(ts,
ar=[[0.3]], # AR(1), initial value 0.3
sar=[[0.2]], # seasonal AR(1) at lag 12
d=1, # one regular difference
boxlam=0.0, # log transform (Box–Cox λ=0)
refactor=100.0)
result = m.fit()
print(result.sigma2, result.aic)
m.plot_residuals()
Load from a .inp file (fue format)
ts, m = fue.load("model.inp")
result = m.fit()
m.write_out("model.out")
m.write_pre("model.pre")
Forecast from a pre-estimated .inp file (fuf format)
ts, m = fue.load_fuf("forecast_model.inp")
fr = m.forecast_fuf(horizon=24)
print(fr.level) # point forecasts in original units
print(fr.level_std) # forecast standard deviations
Command-line interface
# Estimate a model and write .out / .pre
fue model_name [eml|aml] [chk|nochk] [-f horizon]
# Generate forecasts from a pre-estimated .inp file
fuf forecast_model
Numerical methods
| Algorithm | Reference | Used for |
|---|---|---|
| Ansley (1979) innovations form | Mauricio (1997) AS 311 | Exact log-likelihood (elf_scalar) |
| Kalman filter (quick recursions) | Mélard (1984) AS 197 | Inner BFGS loop (flikam_scalar) |
| BFGS with Cholesky factor update | Dennis & Schnabel (1983) ch. 9 | Optimization (raxopt) |
| Scaled objective Π(x)/Π₀ | Mauricio (1995) JASA §3 | Numerical conditioning |
Authors and licence
fue is developed by Arthur B. Treadway and David E. Guerrero, based on the algorithms designed and coded by José Alberto Mauricio.
Released under the GNU General Public Licence v2.0 or later (GPL-2.0-or-later). See COPYING for the full licence text.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fue-0.1.0.tar.gz.
File metadata
- Download URL: fue-0.1.0.tar.gz
- Upload date:
- Size: 151.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afc6cf3a37cb181cb27cb4308b68555875dcc179e6fd5aee36a5aa3d1f7cb533
|
|
| MD5 |
cb474d4d9ef4b51cf49ffe06a0407542
|
|
| BLAKE2b-256 |
d9c8e8c2c29ab0291ecfa845fecd5d033ba954136e80ae06db26d85874f7f9de
|
File details
Details for the file fue-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fue-0.1.0-py3-none-any.whl
- Upload date:
- Size: 79.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
095815cc8641c084d11ec5f16788dafe4334abf090240cf2e7cd6bbca0af109b
|
|
| MD5 |
d0d0977b5f401cb2522e3b230ddaa96d
|
|
| BLAKE2b-256 |
6ac0706a9e54a5e01e720f6e6f0aa29ac362a35a6a1f61f83fce2f5742120684
|