Time Series Forecasting - Production Patterns
Scope note: This skill covers forecasting system construction and evaluation. It is not part of the LLM-build or LLM-training stack — route LLM lifecycle, prompting, or provider questions to ai-llm.
July 2026 posture: define a cutoff timestamp before modelling, start with strong baselines, prefer horizon-aware validation over IID thinking, treat known-future covariates explicitly, and verify fast-moving tooling against current official docs before recommending it.
This skill is the implementation guide for forecasting systems:
- timestamp integrity, frequency checks, and point-in-time feature design
- local, global/panel, and hierarchical forecasting workflows
- leakage-safe backtesting, horizon-wise evaluation, and business-loss alignment
- probabilistic forecasting, calibration, and interval quality
- time-series foundation models (TSFMs) and zero-shot benchmark patterns
- forecasting-specific handoff, fallback, and lineage requirements
Use this skill for forecasting depth. Use sibling skills for general data science, generic LLM strategy, or full production operations.
When To Use This Skill
Activate this skill when the user asks for:
- building or reviewing a forecast model
- choosing between local, global/panel, hierarchical, or foundation-model approaches
- creating lag, rolling, calendar, or known-future covariate features
- designing a rolling-origin backtest or fixing temporal leakage
- selecting forecasting metrics by horizon, segment, or business cost
- adding prediction intervals, quantiles, or conformal calibration
- comparing Chronos-2, Chronos-Bolt, Toto, TimesFM, AutoGluon TimeSeries, MLForecast, skforecast, or classical baselines
- defining forecast-specific fallback, lineage, and handoff requirements
Scope Boundaries
- General EDA, tabular modelling, experiment design, or reusable DS workflow -> ai-ml-data-science
- Deployment architecture, monitoring stack, release gates, incident playbooks -> ai-mlops
- Generic LLM lifecycle, prompting, or provider selection -> ai-llm
- RAG and search systems -> ai-rag
Keep this skill focused on forecast creation, validation, and forecasting-specific operational patterns.
ASCII Flow
forecast need
|
v
forecast contract
target + horizon + cutoff + granularity + business loss + update cadence
|
v
time-series validation
timestamp integrity + leakage checks + rolling-origin backtest
|
v
model pattern
naive baseline -> local/classical -> feature ML -> global/panel -> TS foundation
|
v
forecast handoff
point/interval forecasts + lineage + fallback + monitoring trigger
Quick Reference
| Task |
Default Tooling / Pattern |
When To Use |
| Timestamp integrity |
pandas, Polars, statsmodels |
Frequency checks, missing timestamps, DST/timezone cleanup |
| Feature-based forecasting |
LightGBM/XGBoost + MLForecast or skforecast |
Covariate-rich, interpretable, scalable forecasts |
| Classical local baseline |
naive, seasonal naive, ETS/SARIMAX |
Small data, interpretable baseline, low-covariate settings |
| Global/panel forecasting |
MLForecast, AutoGluon TimeSeries, NeuralForecast |
Many related series, shared signal, unified training |
| Hierarchical coherence |
HierarchicalForecast |
Need forecasts that add up across levels |
| Probabilistic forecasts |
quantile regression, conformal, distributional models |
Risk-sensitive decisions, service-level planning |
| TS foundation models |
Chronos-2 / Chronos-Bolt (Amazon), Toto (Datadog), TimesFM, AutoGluon TSFM support |
Zero-shot baselines, long horizons, sparse feature engineering; verify current releases |
| Backtesting |
rolling-origin / expanding windows |
Forecast validation without leakage |
| Forecast handoff |
cutoff timestamp + lineage + fallback |
Production-ready forecast packages |
Workflow
- Define the forecast target, horizon, cutoff timestamp, granularity, and business-loss shape first.
- Route generic DS workflow or full production-ops work to the adjacent skill when forecasting depth is not the main need.
- Choose the baseline, feature pattern, and model family from the decision tree.
- Run leakage-safe backtests, compare horizon-aware metrics, and add interval or calibration checks when decisions need uncertainty.
- Verify fast-moving tooling and TSFM claims with the navigation and fact-checking sources before final recommendations.
Current-Facts Protocol For Current-Best-Tooling Recommendations
Use this protocol whenever the user asks for the best, latest, current, or still relevant forecasting tooling — TSFM releases, benchmark leaderboards, and package APIs move on a roughly quarterly cadence, so treat any specific version number or benchmark figure below as provisional pending a live check:
- Start from data/sources.json.
- Verify fast-moving facts with official docs or official repositories.
- Separate stable guidance from volatile facts such as current model capabilities, package APIs, or hosted deployment options.
- Recommend a default plus 1-2 alternatives, with tradeoffs by horizon, covariates, scale, and operational cost.
Use this protocol for questions such as:
- "Should I use MLForecast, skforecast, or AutoGluon TimeSeries?"
- "Should I use Chronos-2, Chronos-Bolt, or Toto as my zero-shot baseline?"
- "What is the current MAPIE API for time-series conformal intervals?"
- "Should I still be using Prophet or TBATS here?"
Decision Tree: Choose The Forecasting Pattern
Need to build or review a forecast:
├─ One series or a small local portfolio?
│ ├─ Few covariates, interpretability first -> naive/seasonal naive + ETS/SARIMAX baseline
│ └─ Nonlinear effects or richer covariates -> feature-based boosting
│
├─ Many related series?
│ ├─ Need one shared model with covariates -> global/panel forecasting
│ └─ Need rollups to add up across levels -> hierarchical forecasting + reconciliation
│
├─ Intermittent or zero-heavy demand?
│ ├─ Very sparse and operationally simple -> Croston/SBA/ADIDA baseline
│ └─ Need richer covariates or scale -> global boosting with zero-aware features
│
├─ Need uncertainty, service levels, or inventory decisions?
│ └─ Add quantiles, conformal intervals, or distributional forecasts
│
├─ Long horizon or low-feature setup?
│ ├─ Need strong zero-shot baseline -> TS foundation models
│ └─ Need supervised optimization on many series -> global/deep forecasting
│
└─ Need production handoff?
└─ Record cutoff timestamp, feature contract, fallback, lineage, and retraining trigger
Core Principles
1. Cutoff Timestamp Before Features
- Define the exact prediction timestamp before building labels or features.
- Every lag, rolling aggregate, calendar flag, and external signal must be justified relative to what is known at that cutoff.
- Known-future covariates and future-unknown covariates must be treated differently.
2. Baselines First
- Always compare against naive and seasonal-naive baselines.
- Add ETS/SARIMAX or other local classical baselines when interpretability matters.
- Candidate models do not earn deployment if they barely beat a simple baseline.
3. Horizon And Slice Evaluation
- Report accuracy by horizon, not only a single global score.
- Slice by segment, geography, SKU family, volume band, or any business-relevant cohort.
- Prefer MASE/WAPE/MAE over MAPE when zeros or near-zeros exist.
4. Global/Panel Before Per-Series Complexity
- When many related series exist, default to a shared global/panel approach before building separate bespoke models.
- Use hierarchical reconciliation when forecasts must remain coherent across levels.
- Promote complexity only when it earns accuracy, calibration, or operational simplicity.
5. Probabilistic When The Decision Is Risk-Sensitive
- Use quantiles, conformal intervals, or full predictive distributions when downstream actions depend on uncertainty.
- Evaluate both coverage and sharpness; wide intervals with nominal coverage are not automatically useful.
- Reassess calibration after every retrain or major model change.
6. Forecasting-Specific Handoff
- A forecast package is incomplete without cutoff timestamps, horizon definition, feature contract, metric definitions, fallback rules, and lineage metadata.
- Keep forecasting-specific handoff guidance here; route full deployment architecture to ai-mlops.
Known Traps
- Mixing future-known covariates and future-unknown covariates in the same feature path without documenting which values are actually available at forecast time.
- Using one global backtest score to justify deployment when horizon-specific error behavior differs materially.
- Using MAPE on zero-heavy, intermittent, or near-zero series and then comparing models on unstable percentages.
- Building bespoke per-series models before testing a strong global or panel baseline on related series.
- Ignoring hierarchy and coherence when downstream consumers expect rollups to add up.
Common Anti-Patterns
- Reusing IID validation habits from generic tabular ML instead of rolling-origin or expanding-window evaluation.
- Treating decomposition visuals as evidence of production signal without backtesting the actual decision horizon.
- Using feature-rich models whose future covariates are unavailable or operationally too expensive to maintain.
- Comparing TS foundation models to weak baselines and calling the result strategic proof.
Navigation: Core References
Data Integrity And Features
- TS EDA Best Practices - Timestamp integrity, missingness, decomposition, and stability checks
- Lag & Rolling Patterns - Leakage-safe lags, rolling windows, and calendar patterns
- Global & Panel Forecasting Patterns - Shared models, panel schemas, known-future covariates, grouped evaluation
Model And Strategy Selection
- Model Selection Guide - May 2026 model-family decision matrix
- LightGBM TS Patterns - Feature-based/global boosting patterns, MLForecast/skforecast workflows
- Multi-Step Forecasting Patterns - Direct, recursive, and seq2seq tradeoffs
- Intermittent Demand Patterns - Sparse-demand baselines and zero-aware modelling
Validation, Uncertainty, And Advanced Forecasting
- Backtesting Patterns - Rolling-origin evaluation, panel-aware backtests, and metric design
- Probabilistic Forecasting - Quantiles, conformal methods, calibration, and scoring rules
- Hierarchical Forecasting - Coherent forecasts and reconciliation methods
- Time-Series Foundation Model Patterns - Chronos, TimesFM, zero-shot baselines, and TSFM usage
- Anomaly Detection Patterns - Residual and interval-based anomaly workflows
Handoff And Forecast Operations
- Forecast Governance Patterns - Cutoff timestamps, lineage, fallback rules, and forecast contracts
- Production Deployment Patterns - Broader production controls; use when forecasting-specific guidance must connect to deployment
Templates
Data Preparation
- TS EDA Template - Reproducible structure for timestamp and seasonality review
- Resample & Fill Template - Resampling, gap rules, and fill policies
Feature And Model Design
- Lag & Rolling Features - Leakage-safe feature specification
- Calendar Features - Known-future business calendar and event feature spec
- Forecast Model Template - Forecast package contract for local, global, or hierarchical models
- Multi-Step Strategy - Direct, recursive, and seq2seq strategy contract
Evaluation And Uncertainty
- Backtest Template - Rolling-origin or expanding-window evaluation spec
- TS Metrics Template - Horizon, slice, business-loss, and probabilistic metric contract
Foundation Models
- TS Foundation Model Template - Zero-shot TSFM benchmark and evaluation scaffold
Scripts
| Script |
Purpose |
| scripts/ts_evaluator.py |
Stdlib-only CLI: horizon-wise backtest metrics, probabilistic calibration check, and full Markdown evaluation report |
# Horizon-wise accuracy: MAE, RMSE, MAPE, skill score vs naive baseline
python scripts/ts_evaluator.py backtest --input data/sample-forecast-results.json
# Probabilistic calibration check for 50%, 80%, 90% prediction intervals
python scripts/ts_evaluator.py calibration --input data/sample-forecast-results.json
# Full Markdown evaluation report written to file
python scripts/ts_evaluator.py report --input data/sample-forecast-results.json --output /tmp/ts-eval-report.md
Data Files
| File |
Description |
| data/sources.json |
Curated primary sources for classical forecasting, MLForecast, skforecast, AutoGluon, Chronos-2/Chronos-Bolt, TimesFM, Toto, fev-bench, and MAPIE |
| data/sample-forecast-results.json |
Realistic rolling-origin backtest results for a daily revenue forecast model across horizons 1, 7, 14, 30 days (48 rows, 12 backtest origins) |
External Sources
See data/sources.json for current primary sources across:
- classical forecasting references
- official docs for MLForecast, HierarchicalForecast, skforecast, AutoGluon TimeSeries, LightGBM, and MAPIE
- official Chronos-2/Chronos-Bolt, TimesFM, and Toto repositories
- fev-bench benchmark and governance references used for high-impact deployments
Related Skills
- ai-ml-data-science - General DS workflows, experiment design, and broader modelling patterns
- ai-mlops - Deployment architecture, monitoring, and release operations
- ai-llm - Provider/model lifecycle questions outside time-series forecasting
- data-sql-optimization - Storage and query design for time-series marts
Fact-Checking
- Known bugs, regressions, framework/compiler/runtime footguns, and version-specific crash or workaround guidance must be verified against current primary web sources before being treated as current fact.
- Verify volatile external facts, package APIs, hosted options, and model capabilities before final answers.
- Prefer official docs, official repositories, standards, or release notes.
- If web access is unavailable, state that clearly and mark time-sensitive guidance as unverified.
Learnings Loop
Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
1---
2name: ai-ml-timeseries
3description: "Time-series forecasting with temporal validation, panel models, probabilistic forecasts, and TS foundation models. Use when modeling ordered observations."
4compatibility: Portable core. Works on Claude Code and Codex.
5version: "1.1"
6last_validated: 2026-07-11
7---
8
9# Time Series Forecasting - Production Patterns
10
11**Scope note:** This skill covers forecasting system construction and evaluation. It is not part of the LLM-build or LLM-training stack — route LLM lifecycle, prompting, or provider questions to [ai-llm](../ai-llm/SKILL.md).
12
13**July 2026 posture:** define a cutoff timestamp before modelling, start with strong baselines, prefer horizon-aware validation over IID thinking, treat known-future covariates explicitly, and verify fast-moving tooling against current official docs before recommending it.
14
15This skill is the implementation guide for **forecasting systems**:
16
17- timestamp integrity, frequency checks, and point-in-time feature design
18- local, global/panel, and hierarchical forecasting workflows
19- leakage-safe backtesting, horizon-wise evaluation, and business-loss alignment
20- probabilistic forecasting, calibration, and interval quality
21- time-series foundation models (TSFMs) and zero-shot benchmark patterns
22- forecasting-specific handoff, fallback, and lineage requirements
23
24Use this skill for **forecasting depth**. Use sibling skills for general data science, generic LLM strategy, or full production operations.
25
26## When To Use This Skill
27
28Activate this skill when the user asks for:
29
30- building or reviewing a forecast model
31- choosing between local, global/panel, hierarchical, or foundation-model approaches
32- creating lag, rolling, calendar, or known-future covariate features
33- designing a rolling-origin backtest or fixing temporal leakage
34- selecting forecasting metrics by horizon, segment, or business cost
35- adding prediction intervals, quantiles, or conformal calibration
36- comparing Chronos-2, Chronos-Bolt, Toto, TimesFM, AutoGluon TimeSeries, MLForecast, skforecast, or classical baselines
37- defining forecast-specific fallback, lineage, and handoff requirements
38
39## Scope Boundaries
40
41- **General EDA, tabular modelling, experiment design, or reusable DS workflow** -> [ai-ml-data-science](../ai-ml-data-science/SKILL.md)
42- **Deployment architecture, monitoring stack, release gates, incident playbooks** -> [ai-mlops](../ai-mlops/SKILL.md)
43- **Generic LLM lifecycle, prompting, or provider selection** -> [ai-llm](../ai-llm/SKILL.md)
44- **RAG and search systems** -> [ai-rag](../ai-rag/SKILL.md)
45
46Keep this skill focused on **forecast creation, validation, and forecasting-specific operational patterns**.
47
48## ASCII Flow
49
50```text
51forecast need
52 |
53 v
54forecast contract
55 target + horizon + cutoff + granularity + business loss + update cadence
56 |
57 v
58time-series validation
59 timestamp integrity + leakage checks + rolling-origin backtest
60 |
61 v
62model pattern
63 naive baseline -> local/classical -> feature ML -> global/panel -> TS foundation
64 |
65 v
66forecast handoff
67 point/interval forecasts + lineage + fallback + monitoring trigger
68```
69
70## Quick Reference
71
72| Task | Default Tooling / Pattern | When To Use |
73|------|---------------------------|-------------|
74| Timestamp integrity | pandas, Polars, statsmodels | Frequency checks, missing timestamps, DST/timezone cleanup |
75| Feature-based forecasting | LightGBM/XGBoost + MLForecast or skforecast | Covariate-rich, interpretable, scalable forecasts |
76| Classical local baseline | naive, seasonal naive, ETS/SARIMAX | Small data, interpretable baseline, low-covariate settings |
77| Global/panel forecasting | MLForecast, AutoGluon TimeSeries, NeuralForecast | Many related series, shared signal, unified training |
78| Hierarchical coherence | HierarchicalForecast | Need forecasts that add up across levels |
79| Probabilistic forecasts | quantile regression, conformal, distributional models | Risk-sensitive decisions, service-level planning |
80| TS foundation models | Chronos-2 / Chronos-Bolt (Amazon), Toto (Datadog), TimesFM, AutoGluon TSFM support | Zero-shot baselines, long horizons, sparse feature engineering; verify current releases |
81| Backtesting | rolling-origin / expanding windows | Forecast validation without leakage |
82| Forecast handoff | cutoff timestamp + lineage + fallback | Production-ready forecast packages |
83
84## Workflow
85
861. Define the forecast target, horizon, cutoff timestamp, granularity, and business-loss shape first.
872. Route generic DS workflow or full production-ops work to the adjacent skill when forecasting depth is not the main need.
883. Choose the baseline, feature pattern, and model family from the decision tree.
894. Run leakage-safe backtests, compare horizon-aware metrics, and add interval or calibration checks when decisions need uncertainty.
905. Verify fast-moving tooling and TSFM claims with the navigation and fact-checking sources before final recommendations.
91
92## Current-Facts Protocol For Current-Best-Tooling Recommendations
93
94Use this protocol whenever the user asks for the **best**, **latest**, **current**, or **still relevant** forecasting tooling — TSFM releases, benchmark leaderboards, and package APIs move on a roughly quarterly cadence, so treat any specific version number or benchmark figure below as provisional pending a live check:
95
961. Start from [data/sources.json](data/sources.json).
972. Verify fast-moving facts with official docs or official repositories.
983. Separate **stable guidance** from **volatile facts** such as current model capabilities, package APIs, or hosted deployment options.
994. Recommend a default plus 1-2 alternatives, with tradeoffs by horizon, covariates, scale, and operational cost.
100
101Use this protocol for questions such as:
102
103- "Should I use MLForecast, skforecast, or AutoGluon TimeSeries?"
104- "Should I use Chronos-2, Chronos-Bolt, or Toto as my zero-shot baseline?"
105- "What is the current MAPIE API for time-series conformal intervals?"
106- "Should I still be using Prophet or TBATS here?"
107
108## Decision Tree: Choose The Forecasting Pattern
109
110```text
111Need to build or review a forecast:
112 ├─ One series or a small local portfolio?
113 │ ├─ Few covariates, interpretability first -> naive/seasonal naive + ETS/SARIMAX baseline
114 │ └─ Nonlinear effects or richer covariates -> feature-based boosting
115 │
116 ├─ Many related series?
117 │ ├─ Need one shared model with covariates -> global/panel forecasting
118 │ └─ Need rollups to add up across levels -> hierarchical forecasting + reconciliation
119 │
120 ├─ Intermittent or zero-heavy demand?
121 │ ├─ Very sparse and operationally simple -> Croston/SBA/ADIDA baseline
122 │ └─ Need richer covariates or scale -> global boosting with zero-aware features
123 │
124 ├─ Need uncertainty, service levels, or inventory decisions?
125 │ └─ Add quantiles, conformal intervals, or distributional forecasts
126 │
127 ├─ Long horizon or low-feature setup?
128 │ ├─ Need strong zero-shot baseline -> TS foundation models
129 │ └─ Need supervised optimization on many series -> global/deep forecasting
130 │
131 └─ Need production handoff?
132 └─ Record cutoff timestamp, feature contract, fallback, lineage, and retraining trigger
133```
134
135## Core Principles
136
137### 1. Cutoff Timestamp Before Features
138
139- Define the exact prediction timestamp before building labels or features.
140- Every lag, rolling aggregate, calendar flag, and external signal must be justified relative to what is known at that cutoff.
141- Known-future covariates and future-unknown covariates must be treated differently.
142
143### 2. Baselines First
144
145- Always compare against naive and seasonal-naive baselines.
146- Add ETS/SARIMAX or other local classical baselines when interpretability matters.
147- Candidate models do not earn deployment if they barely beat a simple baseline.
148
149### 3. Horizon And Slice Evaluation
150
151- Report accuracy by horizon, not only a single global score.
152- Slice by segment, geography, SKU family, volume band, or any business-relevant cohort.
153- Prefer MASE/WAPE/MAE over MAPE when zeros or near-zeros exist.
154
155### 4. Global/Panel Before Per-Series Complexity
156
157- When many related series exist, default to a shared global/panel approach before building separate bespoke models.
158- Use hierarchical reconciliation when forecasts must remain coherent across levels.
159- Promote complexity only when it earns accuracy, calibration, or operational simplicity.
160
161### 5. Probabilistic When The Decision Is Risk-Sensitive
162
163- Use quantiles, conformal intervals, or full predictive distributions when downstream actions depend on uncertainty.
164- Evaluate both coverage and sharpness; wide intervals with nominal coverage are not automatically useful.
165- Reassess calibration after every retrain or major model change.
166
167### 6. Forecasting-Specific Handoff
168
169- A forecast package is incomplete without cutoff timestamps, horizon definition, feature contract, metric definitions, fallback rules, and lineage metadata.
170- Keep forecasting-specific handoff guidance here; route full deployment architecture to [ai-mlops](../ai-mlops/SKILL.md).
171
172## Known Traps
173
174- Mixing future-known covariates and future-unknown covariates in the same feature path without documenting which values are actually available at forecast time.
175- Using one global backtest score to justify deployment when horizon-specific error behavior differs materially.
176- Using MAPE on zero-heavy, intermittent, or near-zero series and then comparing models on unstable percentages.
177- Building bespoke per-series models before testing a strong global or panel baseline on related series.
178- Ignoring hierarchy and coherence when downstream consumers expect rollups to add up.
179
180## Common Anti-Patterns
181
182- Reusing IID validation habits from generic tabular ML instead of rolling-origin or expanding-window evaluation.
183- Treating decomposition visuals as evidence of production signal without backtesting the actual decision horizon.
184- Using feature-rich models whose future covariates are unavailable or operationally too expensive to maintain.
185- Comparing TS foundation models to weak baselines and calling the result strategic proof.
186
187## Navigation: Core References
188
189### Data Integrity And Features
190
191- **[TS EDA Best Practices](references/ts-eda-best-practices.md)** - Timestamp integrity, missingness, decomposition, and stability checks
192- **[Lag & Rolling Patterns](references/lag-rolling-patterns.md)** - Leakage-safe lags, rolling windows, and calendar patterns
193- **[Global & Panel Forecasting Patterns](references/global-panel-forecasting-patterns.md)** - Shared models, panel schemas, known-future covariates, grouped evaluation
194
195### Model And Strategy Selection
196
197- **[Model Selection Guide](references/model-selection-guide.md)** - May 2026 model-family decision matrix
198- **[LightGBM TS Patterns](references/lightgbm-ts-patterns.md)** - Feature-based/global boosting patterns, MLForecast/skforecast workflows
199- **[Multi-Step Forecasting Patterns](references/multistep-forecasting-patterns.md)** - Direct, recursive, and seq2seq tradeoffs
200- **[Intermittent Demand Patterns](references/intermittent-demand-patterns.md)** - Sparse-demand baselines and zero-aware modelling
201
202### Validation, Uncertainty, And Advanced Forecasting
203
204- **[Backtesting Patterns](references/backtesting-patterns.md)** - Rolling-origin evaluation, panel-aware backtests, and metric design
205- **[Probabilistic Forecasting](references/probabilistic-forecasting.md)** - Quantiles, conformal methods, calibration, and scoring rules
206- **[Hierarchical Forecasting](references/hierarchical-forecasting.md)** - Coherent forecasts and reconciliation methods
207- **[Time-Series Foundation Model Patterns](references/ts-llm-patterns.md)** - Chronos, TimesFM, zero-shot baselines, and TSFM usage
208- **[Anomaly Detection Patterns](references/anomaly-detection-patterns.md)** - Residual and interval-based anomaly workflows
209
210### Handoff And Forecast Operations
211
212- **[Forecast Governance Patterns](references/forecast-governance-patterns.md)** - Cutoff timestamps, lineage, fallback rules, and forecast contracts
213- **[Production Deployment Patterns](references/production-deployment-patterns.md)** - Broader production controls; use when forecasting-specific guidance must connect to deployment
214
215## Templates
216
217### Data Preparation
218
219- **[TS EDA Template](assets/timeseries/template-ts-eda.md)** - Reproducible structure for timestamp and seasonality review
220- **[Resample & Fill Template](assets/timeseries/template-resample-fill.md)** - Resampling, gap rules, and fill policies
221
222### Feature And Model Design
223
224- **[Lag & Rolling Features](assets/timeseries/template-lag-rolling.md)** - Leakage-safe feature specification
225- **[Calendar Features](assets/timeseries/template-calendar-features.md)** - Known-future business calendar and event feature spec
226- **[Forecast Model Template](assets/timeseries/template-forecast-model.md)** - Forecast package contract for local, global, or hierarchical models
227- **[Multi-Step Strategy](assets/timeseries/template-multistep-strategy.md)** - Direct, recursive, and seq2seq strategy contract
228
229### Evaluation And Uncertainty
230
231- **[Backtest Template](assets/timeseries/template-backtest.md)** - Rolling-origin or expanding-window evaluation spec
232- **[TS Metrics Template](assets/timeseries/template-ts-metrics.md)** - Horizon, slice, business-loss, and probabilistic metric contract
233
234### Foundation Models
235
236- **[TS Foundation Model Template](assets/timeseries/template-ts-llm.md)** - Zero-shot TSFM benchmark and evaluation scaffold
237
238## Scripts
239
240| Script | Purpose |
241|--------|---------|
242| [scripts/ts_evaluator.py](scripts/ts_evaluator.py) | Stdlib-only CLI: horizon-wise backtest metrics, probabilistic calibration check, and full Markdown evaluation report |
243
244```bash
245# Horizon-wise accuracy: MAE, RMSE, MAPE, skill score vs naive baseline
246python scripts/ts_evaluator.py backtest --input data/sample-forecast-results.json
247
248# Probabilistic calibration check for 50%, 80%, 90% prediction intervals
249python scripts/ts_evaluator.py calibration --input data/sample-forecast-results.json
250
251# Full Markdown evaluation report written to file
252python scripts/ts_evaluator.py report --input data/sample-forecast-results.json --output /tmp/ts-eval-report.md
253```
254
255## Data Files
256
257| File | Description |
258|------|-------------|
259| [data/sources.json](data/sources.json) | Curated primary sources for classical forecasting, MLForecast, skforecast, AutoGluon, Chronos-2/Chronos-Bolt, TimesFM, Toto, fev-bench, and MAPIE |
260| [data/sample-forecast-results.json](data/sample-forecast-results.json) | Realistic rolling-origin backtest results for a daily revenue forecast model across horizons 1, 7, 14, 30 days (48 rows, 12 backtest origins) |
261
262## External Sources
263
264See **[data/sources.json](data/sources.json)** for current primary sources across:
265
266- classical forecasting references
267- official docs for MLForecast, HierarchicalForecast, skforecast, AutoGluon TimeSeries, LightGBM, and MAPIE
268- official Chronos-2/Chronos-Bolt, TimesFM, and Toto repositories
269- fev-bench benchmark and governance references used for high-impact deployments
270
271## Related Skills
272
273- **[ai-ml-data-science](../ai-ml-data-science/SKILL.md)** - General DS workflows, experiment design, and broader modelling patterns
274- **[ai-mlops](../ai-mlops/SKILL.md)** - Deployment architecture, monitoring, and release operations
275- **[ai-llm](../ai-llm/SKILL.md)** - Provider/model lifecycle questions outside time-series forecasting
276- **[data-sql-optimization](../data-sql-optimization/SKILL.md)** - Storage and query design for time-series marts
277
278## Fact-Checking
279
280- Known bugs, regressions, framework/compiler/runtime footguns, and version-specific crash or workaround guidance must be verified against current primary web sources before being treated as current fact.
281- Verify volatile external facts, package APIs, hosted options, and model capabilities before final answers.
282- Prefer official docs, official repositories, standards, or release notes.
283- If web access is unavailable, state that clearly and mark time-sensitive guidance as unverified.
284
285## Learnings Loop
286
287Before applying this skill on a non-trivial task, read `learnings.consolidated.md` in this directory (and `learnings.md` if present).
288
289After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to `learnings.md` via `agents-skills-feedback-loop/scripts/append_learning.py`. Do not modify `SKILL.md` itself.