v0.0.17 — Built-in Rust Engine

Time Series Forecasting
Made Simple

One line of code. Automatic model selection. Zero configuration.
Built-in Rust engine — Python syntax, Rust speed.

0.848 M4 OWA
3 Dependencies
67x Rust Engine
603 Tests
forecast.py
from vectrix import forecast

result = forecast("sales.csv", steps=12)
result.plot() # auto model + intervals + plot
100K+ Time series benchmarked on M3 & M4 competitions
65+ Features extracted by Forecast DNA fingerprinting
0.696 M4 Hourly OWA — competition winner level accuracy
<5ms ETS model fit with built-in Rust engine
Features

Everything you need for forecasting

From one-line forecasts to advanced adaptive intelligence — Vectrix scales with your needs.

Zero Configuration

Pass your data, get forecasts. Auto model selection, hyperparameter tuning, and flat-line defense — all automatic.

Automatic Model Selection

Evaluates 30+ models (ETS, ARIMA, Theta, MSTL, DOT, CES, 4Theta, ESN, DTSF) and picks the best one for your data.

Flat Defense System

Unique 4-level system prevents constant predictions — the most common forecasting failure mode in production.

Forecast DNA

65+ feature fingerprinting. Know your data's difficulty, optimal model, seasonality, and similarity to other series.

Adaptive Intelligence

Regime detection (HMM), self-healing forecasts (CUSUM + EWMA), and 8 business constraint types.

Built-in Rust Engine

Pre-compiled Rust engine included in every wheel — like Polars. 29 accelerated hot loops, up to 67x faster.

Probabilistic Forecasting

Parametric distributions (Gaussian, Student-t, Log-Normal), quantile forecasts, conformal prediction intervals, CRPS.

R-Style Regression

Formula interface: regress(df, "sales ~ ads + price"). OLS, Ridge, Lasso, Huber, Quantile with full diagnostics.

Business Intelligence

Anomaly detection, what-if scenarios, backtesting framework, and production metrics (WAPE, MASE, bias).

How it works

Three lines. Full pipeline.

Forecasting, analysis, and regression — each designed to work with one function call.

Forecasting
from vectrix import forecast

result = forecast("sales.csv", steps=12)
result.plot()
result.to_csv("forecast.csv")
Analysis
from vectrix import analyze

report = analyze("data.csv")
print(report.dna.difficulty)
print(report.dna.recommended_model)
Regression
from vectrix import regress

r = regress(df, "sales ~ ads + price")
print(r.r_squared)
r.plot()
Model Catalog

30+ models, one unified API

Every model shares the same fit → predict interface. Vectrix picks the best one for your data automatically.

Exponential Smoothing

AutoETSHolt-WintersSESDESAutoCES4Theta

ARIMA Family

AutoARIMAARIMAXSARIMA

Decomposition

AutoMSTLAutoTBATSThetaDOT

Non-Parametric

DTSFESNFourier

Volatility & Special

GARCHAutoCrostonADIDAIMAPA

ML & Foundation

LightGBMXGBoostChronos-2TimesFM
Adaptive Intelligence

Forecasts that adapt to reality

Real-world data is messy. Regimes shift, anomalies appear, business rules matter. Vectrix handles it all.

Regime Detection

HMM-based automatic regime identification. Detect structural breaks and adapt model selection accordingly.

Self-Healing Forecasts

CUSUM + EWMA monitoring. When predictions drift, the system automatically corrects before errors accumulate.

8 Business Constraints

Non-negative, bounded range, monotonic, integer-only, seasonal floor/ceiling, growth rate limits, and more.

Forecast DNA Fingerprinting

65+ features: trend strength, seasonality type, noise ratio, Hurst exponent, demand density, and more.

adaptive.py
from vectrix import Vectrix

vx = Vectrix(data)

# regime detection
regimes = vx.detectRegimes()

# self-healing forecast
healed = vx.healForecast(
  steps=12,
  actual=newData
)

# business constraints
result = vx.forecast(
  steps=12,
  constraints=[
    NonNegative(),
    MaxGrowth(0.1)
  ]
)
Performance

Built-in Rust Engine

29 Rust-accelerated core loops compiled into every wheel. Like Polars — pip install and it's fast.

AutoETS 10.8x faster
Python: 348ms
Rust: 32ms
DOT 24x faster
Python: 68ms
Rust: 2.8ms
AutoCES 12x faster
Python: 118ms
Rust: 9.6ms
AutoARIMA 5.6x faster
Python: 285ms
Rust: 51ms
4Theta 11x faster
Python: 63ms
Rust: 5.6ms
Theta 8.1x faster
Python: 130ms
Rust: 16ms

pip install vectrix — Rust engine included in every wheel. No extras, no flags needed.

Benchmarks

M3 & M4 Competition Results

Tested against 100,000+ real-world time series. OWA < 1.0 means beating the Naive2 baseline. Lower is better.

CompetitionYearlyQuarterlyMonthlyWeeklyDailyHourly
M30.8480.8250.7580.819
M4 DOT-Hybrid0.7970.8940.8970.9590.8200.722
M4 VX-Ensemble0.8790.9070.9190.9540.8200.696

DOT-Hybrid: single model, AVG OWA 0.848. VX-Ensemble: DOT + AutoCES + 4Theta. Hourly 0.696 = competition winner level. Daily 0.820 = strong Naive2 outperformance.

View full benchmark results →
Comparison

How Vectrix compares

Purpose-built for production forecasting with features no other library offers.

CapabilityVectrixstatsforecastProphetDarts
Zero-config forecasting
Built-in Rust engine (5-67x)
30+ statistical models
Flat prediction defense
Forecast DNA fingerprinting
Business constraints (8 types)
R-style regression
Self-healing forecasts
Foundation model wrappers
Interactive visualization
Use Cases

Built for real-world applications

From demand planning to financial modeling — Vectrix adapts to your domain.

Retail & E-Commerce

Demand forecasting, inventory optimization, seasonal planning with intermittent demand support (Croston, ADIDA).

Finance & Trading

Volatility modeling (GARCH), regime detection for market states, probabilistic risk assessment with confidence intervals.

Energy & Utilities

Load forecasting with multi-seasonal patterns (hourly/daily/weekly). MSTL and TBATS handle complex seasonality.

Healthcare & IoT

Patient volume prediction, sensor data forecasting, anomaly detection with self-healing for drift correction.

HR & Workforce

Staffing demand prediction, attrition forecasting. Hierarchical reconciliation for department-level planning.

SaaS & Product

User growth modeling, revenue forecasting, churn prediction. Business constraints enforce realistic growth bounds.

Get Started

Install in seconds

Rust engine included in every wheel — no extras needed.

$ pip install vectrix
Default — 30+ models + Rust engine. All you need.
ML — LightGBM + XGBoost + scikit-learn.
Foundation — Chronos-2 + TimesFM zero-shot.
Everything — All optional extras combined.

Ready to forecast?

Get started with Vectrix in under a minute.