Skip to main content

Omnicast

Automatic statistical forecasting for Python with one consistent, interval-aware API -- fit, backtest, and plot every model the same way.

Status: v0.1 alpha (renamed from auto-time-series). The API is usable, but model coverage and R parity fixtures are still growing.

Install

pip install omnicast

For local development:

uv sync --extra dev

Full docs with a worked example for every model, a real-data walkthrough, and the complete API reference are hosted at afraz496.github.io/omnicast (source under docs/). Build them locally with:

uv sync --extra docs
uv run sphinx-build -b html docs docs/_build/html

LSTMForecaster requires PyTorch, kept out of the base install:

pip install omnicast[torch]
# or, for development:
uv sync --extra dev --extra torch

Quick start

import pandas as pd
from omnicast import AutoForecaster

y = pd.Series(
    [112, 118, 121, 130, 128, 137, 143, 149, 154, 162, 169, 175],
    index=pd.period_range("2025-01", periods=12, freq="M"),
)

model = AutoForecaster(
    seasonal_period=None,
    metric="rmse",
    validation_horizon=1,
).fit(y)

forecast = model.predict(horizon=6, level=[80, 95])
print(model.leaderboard_)
print(forecast.to_frame())

Every fitted estimator exposes fitted_values_, residuals_, sigma2_, and prediction_intervals_. Statistical estimators also expose params_, parameter_confidence_intervals_ (95%), aic_, and bic_. Prediction intervals are returned on each prediction because they depend on horizon and requested coverage.

Models

Estimator Purpose Intervals
NaiveForecaster Random walk Horizon-scaled Gaussian innovation
SeasonalNaiveForecaster Seasonal random walk Cycle-scaled Gaussian innovation
MeanForecaster Historical mean Mean forecast uncertainty
DriftForecaster Random walk with drift Drift forecast uncertainty
ThetaForecaster Theta method (port of R forecast::thetaf) Random-walk innovation scaling
ETSForecaster Error/trend/seasonal state space State-space forecast uncertainty
ARIMAForecaster ARIMA/SARIMA, optional regressors State-space forecast uncertainty
AutoARIMAForecaster AICc grid-selected ARIMA State-space forecast uncertainty
LSTMForecaster Autoregressive LSTM (torch, optional) Random-walk innovation scaling
AutoForecaster Rolling-origin model selection Selected model's intervals

Evaluation

from omnicast import NaiveForecaster, backtest

folds = backtest(NaiveForecaster(), y, horizon=3, initial=6, metric="rmse")
print(folds)

Available metrics are MAE, RMSE, MAPE, and sMAPE. Backtesting uses expanding windows and never trains on future observations.

Design and scope

The package follows pandas index semantics and the familiar fit/predict estimator pattern. Learned state uses trailing underscores. Models validate input rather than silently imputing data or guessing an irregular date frequency.

This codebase is a Python implementation foundation, not a blanket claim of parity with R forecasting packages. Each future port must record its algorithm source, licensing, deviations, and numerical parity tests. See CONTRIBUTING.md.

ThetaForecaster is the first R port: a compatible pure-Python reimplementation of forecast::thetaf's classical Theta method, described in its own docstring along with the exact deviations from R's output (approximate intervals, no numerical parity fixtures yet).

LSTMForecaster is the first wrapper around a Python deep-learning module (torch, optional dependency), following the same BaseForecaster interface as the statsmodels-backed models. It is not part of AutoForecaster's default candidate list -- pass it explicitly via AutoForecaster(models=[...]) -- since it is optional-dependency and materially slower to backtest.

Licensed under Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnicast-0.1.2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnicast-0.1.2-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file omnicast-0.1.2.tar.gz.

File metadata

  • Download URL: omnicast-0.1.2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for omnicast-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ca9141fc0699f0c90c8fdab01947facfabb4221fe87bfc72288914f5155d138b
MD5 ea2c9bb73c345b1f8d7fbd9175178352
BLAKE2b-256 2395fd94b84d48eb6a9403d567706d783076f4cc4d16fea8ef5045cca42d4ccb

See more details on using hashes here.

File details

Details for the file omnicast-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: omnicast-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for omnicast-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 60e05f2cc40ae5d057160aaf144c3e9414cf406c669a1121d883dd246ed67a32
MD5 f565f9e88a4cd69c076d5adde3e81120
BLAKE2b-256 0907ab47b15986b2132a0bfb87c515ca93bf3d2de6b1ca22e604dbb4755a73fd

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page