Review time series before forecasting
Run xpd time-series <paths> to inspect time series cadence, intermittency, seasonal drivers, regime breaks, and group coherence before fitting a forecasting model. Add --adapter to measure each series and compare candidate pooling or hierarchy groups.
What xpd time-series checks
Section titled “What xpd time-series checks”| Group | Example finding kinds |
|---|---|
| Evaluation | random-time-split, mape-on-intermittent, mase-without-train-df, intervals-without-calibration, unscaled-returns |
| Lags and exogenous features | ungrouped-lag, missing-future-exog, mintrace-without-insample, fitted-values-without-fitted, indptr-missing-zero |
| Grouping and identity | not-a-time-series, incoherent-group, time-before-entity-index, panel-ols-without-effects, clustered-without-clusters |
Static check on a sample script
Section titled “Static check on a sample script”Running xpd time-series without an adapter flags static forecasting mistakes directly from source.
$ xpd time-series samples/time-series/faults.py --format json | jq -c '[.findings[].kind]'["random-time-split","mape-on-intermittent","ungrouped-lag","missing-future-exog"]Write a series adapter and run the review
Section titled “Write a series adapter and run the review”Define series() in a Python adapter file returning a pandas or Polars DataFrame (or file path) with unique_id, ds, y, and candidate metadata columns.
from pathlib import Path
def series(): return Path(__file__).with_name("demand.parquet")- Start the run from a clean commit with
xpd time-series start forecast.py --check "python -m py_compile forecast.py" --adapter series.py. - Inspect findings and per-series measurements with
xpd time-series forecast.py --adapter series.py --format json. - Check cadence, missing or duplicate timestamps, ADI and CV squared intermittency, seasonal periods, phase alignment, and structural breaks before picking a model family.
- Compare metadata eta squared, silhouette scores, and cluster assignments to decide whether each series belongs in an independent model, a pooled global model, or a reconciled hierarchy.
- Record fixes, accepted findings, and checklist verdicts (
pass,na, oraccepted) withxpd time-series plan plan.json. Drop any seasonal period with fewer than two observed cycles and recordnawith that reason. - Approve interface changes with
xpd time-series approve <fix-id>, commit one fix, and runxpd time-series gate <fix-id>. Restore an abandoned edit beforexpd time-series drop <fix-id> --reason "<why>", resume withxpd time-series status, and close withxpd time-series finish.
See the command reference for adapter options, hierarchy declarations, and all stage commands.