[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EW6TJ4D5PV6G79RNQ1DA7G":3,"skill-same:01M7EW6TJ4D5PV6G79RNQ1DA7G":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EW6TJ4D5PV6G79RNQ1DA7G","time-series-forecasting",null,"Forecasting time-ordered data — ARIMA\u002Fstate-space models, stationarity handling, backtesting, and honest prediction intervals.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-time-series-forecasting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: time-series-forecasting\ndescription: Forecasting time-ordered data — ARIMA\u002Fstate-space models, stationarity handling, backtesting, and honest prediction intervals.\ncategory: scientific\n---\n\n## Overview\n\nForecasting turns time-ordered observations into decisions about the\nfuture. This skill covers the classical forecasting toolkit\n(decomposition, ARIMA\u002FSARIMA, exponential smoothing, state-space\nmodels), making series stationary, spectral analysis, and the\nvalidation discipline — rolling-origin backtesting without leakage —\nthat separates real forecast skill from in-sample illusions.\n\n## When to use\n\n- Forecasting: demand, concentrations, prices, sensor readings, disease incidence\n- Decomposing trend\u002Fseasonality\u002Fresiduals for reporting or preprocessing\n- Testing for unit roots, changepoints, or structural breaks\n- Choosing between ARIMA, ETS, and ML approaches for a forecasting task\n- Evaluating forecasts honestly: backtesting without lookahead leakage\n\n## Core concepts\n\n- **Stationarity:** constant mean\u002Fvariance\u002Fautocovariance over time — most classical methods assume it; test (ADF, KPSS — use both, they have opposite nulls) and induce it by differencing or detrending.\n- **ACF\u002FPACF:** autocorrelation and partial autocorrelation patterns identify AR vs MA signatures — the Box–Jenkins identification step; slow ACF decay = non-stationarity.\n- **ARIMA(p,d,q):** autoregressive + integrated (differencing) + moving-average; seasonal SARIMA adds seasonal terms. Parsimony wins: information-criterion selection beats hand-tuning.\n- **State-space \u002F ETS:** unobserved components (level, trend, seasonality) evolving stochastically — the Kalman filter gives optimal updates; handles missing data naturally.\n- **Decomposition:** classical\u002FSTL split into trend + seasonal + remainder — STL (LOESS-based) is robust and the default exploratory choice.\n- **Forecast intervals widen:** uncertainty grows with horizon (√h for random walks, faster with parameter uncertainty) — point forecasts without intervals are half an answer.\n\n- **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.\n- **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.\n- **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.\n\n## Practical workflow\n\n### 1. Explore and decompose\n\n```python\nfrom statsmodels.tsa.seasonal import STL\nres = STL(series, period=12, robust=True).fit()\nres.plot()  # trend, seasonal, resid — inspect each before modeling\n```\n\n1. Plot the raw series; look for trend, seasonality, outliers, changepoints, and variance changes (log-transform if variance scales with level).\n2. STL decomposition with robust=True; examine the remainder for leftover structure (autocorrelation = unmodeled signal).\n3. Test stationarity (ADF + KPSS); difference until stationary, but don't over-difference (it injects MA unit roots).\n\n### 2. Identify and fit\n\n1. Use ACF\u002FPACF plus information criteria (AICc) for order selection — or auto_arima; keep models small.\n2. Fit and run diagnostics: Ljung–Box on residuals (should be white noise), residual ACF plots, and stability of parameters across subsamples.\n3. For multiple seasonalities or regressors (holidays, temperature): dynamic regression or state-space models with exogenous variables.\n\n### 3. Forecast with discipline\n\n1. **Backtest:** rolling-origin evaluation — fit on history, forecast h steps, roll forward; never evaluate on data used for fitting or tuning.\n2. Report accuracy at each horizon (MAE\u002FRMSE and scaled errors like MASE for comparability); always beat naive baselines (naive, seasonal naive) before claiming value.\n3. Produce prediction intervals (analytical or bootstrap\u002Fsimulation) — and check their empirical coverage on the backtest.\n\n### 4. Handle the real world\n\n1. **Changepoints:** test for structural breaks; a model fit across a regime change forecasts neither regime well.\n2. **Missing data:** state-space\u002FKalman handles gaps natively; interpolation before ARIMA biases autocorrelation — avoid it.\n3. **Exogenous shocks:** known interventions (policy changes, outages) need intervention variables or regime models, not hoping the AR terms absorb them.\n\n### 5. Set up a forecast-monitoring system\n\n1. Track forecast vs actuals continuously with a dashboard: bias (mean error), accuracy (MAE\u002FMAPE), and interval coverage — degradation is gradual and invisible without monitoring.\n2. Define retraining triggers: performance thresholds, data-drift detection, or calendar schedules — whichever comes first.\n3. Keep a champion–challenger setup: the production model vs a candidate — promote only on backtested, out-of-sample superiority, not on in-sample fit.\n\n### 6. Quick-reference checklist\n\n- [ ] Series plotted and STL-decomposed before modeling\n- [ ] Stationarity tested (ADF + KPSS); differencing justified\n- [ ] Model orders selected by information criteria, kept parsimonious\n- [ ] Residuals checked (white noise, no leftover structure)\n- [ ] Backtested with rolling origin; no lookahead leakage\n- [ ] Naive baselines beaten before claiming value\n- [ ] Prediction intervals produced and coverage checked\n- [ ] Evaluation horizon matched to the decision lead time\n\n## Common pitfalls\n\n- **Forecasting non-stationary series raw:** trends extrapolated forever — difference or model the trend explicitly.\n- **In-sample fit as forecast skill:** fit quality on training data says nothing about forecasting — backtest out-of-sample.\n- **Lookahead leakage:** using full-sample decomposition\u002Fdeseasonalization before splitting — the future leaks into the \"past\" features.\n- **Ignoring prediction intervals:** point forecasts without uncertainty are unusable for decisions — and usually wrong.\n- **Overfitting with ML:** deep models on short series memorize noise — classical methods win on small data; ML needs scale and careful validation.\n- **Seasonal naive unbeaten:** if a sophisticated model can't beat last-year-this-week, simplify — complexity must earn its keep.\n- **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.\n- **Ignoring forecast value-added analysis:** complex models that barely beat naive baselines add maintenance cost without benefit — quantify the improvement or simplify.\n","## Overview\n\nForecasting turns time-ordered observations into decisions about the\nfuture. This skill covers the classical forecasting toolkit\n(decomposition, ARIMA\u002FSARIMA, exponential smoothing, state-space\nmodels), making series stationary, spectral analysis, and the\nvalidation discipline — rolling-origin backtesting without leakage —\nthat separates real forecast skill from in-sample illusions.\n\n## When to use\n\n- Forecasting: demand, concentrations, prices, sensor readings, disease incidence\n- Decomposing trend\u002Fseasonality\u002Fresiduals for reporting or preprocessing\n- Testing for unit roots, changepoints, or structural breaks\n- Choosing between ARIMA, ETS, and ML approaches for a forecasting task\n- Evaluating forecasts honestly: backtesting without lookahead leakage\n\n## Core concepts\n\n- **Stationarity:** constant mean\u002Fvariance\u002Fautocovariance over time — most classical methods assume it; test (ADF, KPSS — use both, they have opposite nulls) and induce it by differencing or detrending.\n- **ACF\u002FPACF:** autocorrelation and partial autocorrelation patterns identify AR vs MA signatures — the Box–Jenkins identification step; slow ACF decay = non-stationarity.\n- **ARIMA(p,d,q):** autoregressive + integrated (differencing) + moving-average; seasonal SARIMA adds seasonal terms. Parsimony wins: information-criterion selection beats hand-tuning.\n- **State-space \u002F ETS:** unobserved components (level, trend, seasonality) evolving stochastically — the Kalman filter gives optimal updates; handles missing data naturally.\n- **Decomposition:** classical\u002FSTL split into trend + seasonal + remainder — STL (LOESS-based) is robust and the default exploratory choice.\n- **Forecast intervals widen:** uncertainty grows with horizon (√h for random walks, faster with parameter uncertainty) — point forecasts without intervals are half an answer.\n\n- **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.\n- **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.\n- **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.\n\n## Practical workflow\n\n### 1. Explore and decompose\n\n```python\nfrom statsmodels.tsa.seasonal import STL\nres = STL(series, period=12, robust=True).fit()\nres.plot()  # trend, seasonal, resid — inspect each before modeling\n```\n\n1. Plot the raw series; look for trend, seasonality, outliers, changepoints, and variance changes (log-transform if variance scales with level).\n2. STL decomposition with robust=True; examine the remainder for leftover structure (autocorrelation = unmodeled signal).\n3. Test stationarity (ADF + KPSS); difference until stationary, but don't over-difference (it injects MA unit roots).\n\n### 2. Identify and fit\n\n1. Use ACF\u002FPACF plus information criteria (AICc) for order selection — or auto_arima; keep models small.\n2. Fit and run diagnostics: Ljung–Box on residuals (should be white noise), residual ACF plots, and stability of parameters across subsamples.\n3. For multiple seasonalities or regressors (holidays, temperature): dynamic regression or state-space models with exogenous variables.\n\n### 3. Forecast with discipline\n\n1. **Backtest:** rolling-origin evaluation — fit on history, forecast h steps, roll forward; never evaluate on data used for fitting or tuning.\n2. Report accuracy at each horizon (MAE\u002FRMSE and scaled errors like MASE for comparability); always beat naive baselines (naive, seasonal naive) before claiming value.\n3. Produce prediction intervals (analytical or bootstrap\u002Fsimulation) — and check their empirical coverage on the backtest.\n\n### 4. Handle the real world\n\n1. **Changepoints:** test for structural breaks; a model fit across a regime change forecasts neither regime well.\n2. **Missing data:** state-space\u002FKalman handles gaps natively; interpolation before ARIMA biases autocorrelation — avoid it.\n3. **Exogenous shocks:** known interventions (policy changes, outages) need intervention variables or regime models, not hoping the AR terms absorb them.\n\n### 5. Set up a forecast-monitoring system\n\n1. Track forecast vs actuals continuously with a dashboard: bias (mean error), accuracy (MAE\u002FMAPE), and interval coverage — degradation is gradual and invisible without monitoring.\n2. Define retraining triggers: performance thresholds, data-drift detection, or calendar schedules — whichever comes first.\n3. Keep a champion–challenger setup: the production model vs a candidate — promote only on backtested, out-of-sample superiority, not on in-sample fit.\n\n### 6. Quick-reference checklist\n\n- [ ] Series plotted and STL-decomposed before modeling\n- [ ] Stationarity tested (ADF + KPSS); differencing justified\n- [ ] Model orders selected by information criteria, kept parsimonious\n- [ ] Residuals checked (white noise, no leftover structure)\n- [ ] Backtested with rolling origin; no lookahead leakage\n- [ ] Naive baselines beaten before claiming value\n- [ ] Prediction intervals produced and coverage checked\n- [ ] Evaluation horizon matched to the decision lead time\n\n## Common pitfalls\n\n- **Forecasting non-stationary series raw:** trends extrapolated forever — difference or model the trend explicitly.\n- **In-sample fit as forecast skill:** fit quality on training data says nothing about forecasting — backtest out-of-sample.\n- **Lookahead leakage:** using full-sample decomposition\u002Fdeseasonalization before splitting — the future leaks into the \"past\" features.\n- **Ignoring prediction intervals:** point forecasts without uncertainty are unusable for decisions — and usually wrong.\n- **Overfitting with ML:** deep models on short series memorize noise — classical methods win on small data; ML needs scale and careful validation.\n- **Seasonal naive unbeaten:** if a sophisticated model can't beat last-year-this-week, simplify — complexity must earn its keep.\n- **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.\n- **Ignoring forecast value-added analysis:** complex models that barely beat naive baselines add maintenance cost without benefit — quantify the improvement or simplify.\n",{"name":5,"category":24,"description":7},"scientific","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-time-series-forecasting",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill time-series-forecasting",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill time-series-forecasting",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill time-series-forecasting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-time-series-forecasting\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]