Skip to content

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.

Forecasting codeCheck splits, lags,exogenous alignment, andmetricsseries() --adapterMeasure cadence, ADI,FFT, breaks, and groupcoherenceFinding ledger and series orgroup checkliststart -> plan -> gate ->finish
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

Running xpd time-series without an adapter flags static forecasting mistakes directly from source.

Terminal window
$ 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"]

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.

series.py
from pathlib import Path
def series():
return Path(__file__).with_name("demand.parquet")
  1. Start the run from a clean commit with xpd time-series start forecast.py --check "python -m py_compile forecast.py" --adapter series.py.
  2. Inspect findings and per-series measurements with xpd time-series forecast.py --adapter series.py --format json.
  3. Check cadence, missing or duplicate timestamps, ADI and CV squared intermittency, seasonal periods, phase alignment, and structural breaks before picking a model family.
  4. 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.
  5. Record fixes, accepted findings, and checklist verdicts (pass, na, or accepted) with xpd time-series plan plan.json. Drop any seasonal period with fewer than two observed cycles and record na with that reason.
  6. Approve interface changes with xpd time-series approve <fix-id>, commit one fix, and run xpd time-series gate <fix-id>. Restore an abandoned edit before xpd time-series drop <fix-id> --reason "<why>", resume with xpd time-series status, and close with xpd time-series finish.

See the command reference for adapter options, hierarchy declarations, and all stage commands.