Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Time Series Forecasting

ASecurity

Forecasting time-ordered data — ARIMA/state-space models, stationarity handling, backtesting, and honest prediction intervals.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentspythongotestingperformance

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill time-series-forecasting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Time Series Forecasting?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Time Series Forecasting
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-time-series-forecasting/badge)](https://www.skillsdirectory.com/skills/aicodedecode-time-series-forecasting)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: time-series-forecasting
description: Forecasting time-ordered data — ARIMA/state-space models, stationarity handling, backtesting, and honest prediction intervals.
category: scientific
---

## Overview

Forecasting turns time-ordered observations into decisions about the
future. This skill covers the classical forecasting toolkit
(decomposition, ARIMA/SARIMA, exponential smoothing, state-space
models), making series stationary, spectral analysis, and the
validation discipline — rolling-origin backtesting without leakage —
that separates real forecast skill from in-sample illusions.

## When to use

- Forecasting: demand, concentrations, prices, sensor readings, disease incidence
- Decomposing trend/seasonality/residuals for reporting or preprocessing
- Testing for unit roots, changepoints, or structural breaks
- Choosing between ARIMA, ETS, and ML approaches for a forecasting task
- Evaluating forecasts honestly: backtesting without lookahead leakage

## Core concepts

- **Stationarity:** constant mean/variance/autocovariance over time — most classical methods assume it; test (ADF, KPSS — use both, they have opposite nulls) and induce it by differencing or detrending.
- **ACF/PACF:** autocorrelation and partial autocorrelation patterns identify AR vs MA signatures — the Box–Jenkins identification step; slow ACF decay = non-stationarity.
- **ARIMA(p,d,q):** autoregressive + integrated (differencing) + moving-average; seasonal SARIMA adds seasonal terms. Parsimony wins: information-criterion selection beats hand-tuning.
- **State-space / ETS:** unobserved components (level, trend, seasonality) evolving stochastically — the Kalman filter gives optimal updates; handles missing data naturally.
- **Decomposition:** classical/STL split into trend + seasonal + remainder — STL (LOESS-based) is robust and the default exploratory choice.
- **Forecast intervals widen:** uncertainty grows with horizon (√h for random walks, faster with parameter uncertainty) — point forecasts without intervals are half an answer.

- **Intermittent demand:** series with many zeros (spare parts, slow movers) break ARIMA — Croston's method and its variants (SBA, TSB) model demand size and interval separately.
- **Hierarchical forecasting:** forecasts at multiple aggregation levels (SKU → category → total) must cohere — reconciliation (bottom-up, top-down, MinT) enforces adding-up with better accuracy than independent forecasts.
- **Probabilistic forecasting:** full predictive distributions (quantiles, ensembles) instead of point forecasts — proper scoring rules (CRPS, log score) evaluate them; decisions under uncertainty need distributions, not points.

## Practical workflow

### 1. Explore and decompose

```python
from statsmodels.tsa.seasonal import STL
res = STL(series, period=12, robust=True).fit()
res.plot()  # trend, seasonal, resid — inspect each before modeling
```

1. Plot the raw series; look for trend, seasonality, outliers, changepoints, and variance changes (log-transform if variance scales with level).
2. STL decomposition with robust=True; examine the remainder for leftover structure (autocorrelation = unmodeled signal).
3. Test stationarity (ADF + KPSS); difference until stationary, but don't over-difference (it injects MA unit roots).

### 2. Identify and fit

1. Use ACF/PACF plus information criteria (AICc) for order selection — or auto_arima; keep models small.
2. Fit and run diagnostics: Ljung–Box on residuals (should be white noise), residual ACF plots, and stability of parameters across subsamples.
3. For multiple seasonalities or regressors (holidays, temperature): dynamic regression or state-space models with exogenous variables.

### 3. Forecast with discipline

1. **Backtest:** rolling-origin evaluation — fit on history, forecast h steps, roll forward; never evaluate on data used for fitting or tuning.
2. Report accuracy at each horizon (MAE/RMSE and scaled errors like MASE for comparability); always beat naive baselines (naive, seasonal naive) before claiming value.
3. Produce prediction intervals (analytical or bootstrap/simulation) — and check their empirical coverage on the backtest.

### 4. Handle the real world

1. **Changepoints:** test for structural breaks; a model fit across a regime change forecasts neither regime well.
2. **Missing data:** state-space/Kalman handles gaps natively; interpolation before ARIMA biases autocorrelation — avoid it.
3. **Exogenous shocks:** known interventions (policy changes, outages) need intervention variables or regime models, not hoping the AR terms absorb them.

### 5. Set up a forecast-monitoring system

1. Track forecast vs actuals continuously with a dashboard: bias (mean error), accuracy (MAE/MAPE), and interval coverage — degradation is gradual and invisible without monitoring.
2. Define retraining triggers: performance thresholds, data-drift detection, or calendar schedules — whichever comes first.
3. Keep a champion–challenger setup: the production model vs a candidate — promote only on backtested, out-of-sample superiority, not on in-sample fit.

### 6. Quick-reference checklist

- [ ] Series plotted and STL-decomposed before modeling
- [ ] Stationarity tested (ADF + KPSS); differencing justified
- [ ] Model orders selected by information criteria, kept parsimonious
- [ ] Residuals checked (white noise, no leftover structure)
- [ ] Backtested with rolling origin; no lookahead leakage
- [ ] Naive baselines beaten before claiming value
- [ ] Prediction intervals produced and coverage checked
- [ ] Evaluation horizon matched to the decision lead time

## Common pitfalls

- **Forecasting non-stationary series raw:** trends extrapolated forever — difference or model the trend explicitly.
- **In-sample fit as forecast skill:** fit quality on training data says nothing about forecasting — backtest out-of-sample.
- **Lookahead leakage:** using full-sample decomposition/deseasonalization before splitting — the future leaks into the "past" features.
- **Ignoring prediction intervals:** point forecasts without uncertainty are unusable for decisions — and usually wrong.
- **Overfitting with ML:** deep models on short series memorize noise — classical methods win on small data; ML needs scale and careful validation.
- **Seasonal naive unbeaten:** if a sophisticated model can't beat last-year-this-week, simplify — complexity must earn its keep.
- **Forecasting with a broken horizon:** evaluating 1-step-ahead accuracy when decisions need 12-step-ahead — match the evaluation horizon to the decision lead time.
- **Ignoring forecast value-added analysis:** complex models that barely beat naive baselines add maintenance cost without benefit — quantify the improvement or simplify.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →