algo-forecast-exponential
Skill238 starsChanged 6 months agoMITView on GitHub
Apply exponential smoothing methods for time series forecasting with weighted moving averages. Use this skill when the user needs simple, robust forecasts, implement Holt-Winters for seasonal data, or build lightweight forecasting without complex models — even if they say 'simple forecast', 'moving average prediction', or 'smoothing method'.
In this repository315 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algo-ad-biddingSkill
- algo-ad-budgetSkill
- algo-ad-ctrSkill
- algo-ad-gspSkill
- algo-ad-vcgSkill
- algo-blockchain-basicsSkill
- algo-blockchain-smart-contractSkill
- algo-ecom-bm25Skill
- algo-ecom-rankingSkill
- algo-ecom-searchSkill
- algo-forecast-arimaSkill
- algo-forecast-ensembleSkill
- algo-forecast-prophetSkill
- algo-hr-compensationSkill
- algo-hr-matchingSkill
- algo-hr-turnoverSkill
- algo-mfg-cpkSkill
- algo-mfg-doeSkill
- algo-mfg-fmeaSkill
- algo-mfg-spcSkill
- algo-net-centralitySkill
- algo-net-communitySkill
- algo-net-influenceSkill
- algo-nlp-ldaSkill
- algo-nlp-nerSkill
- algo-nlp-similaritySkill
- algo-nlp-summarizationSkill
- algo-price-bundleSkill
- algo-price-conjointSkill
- algo-price-dynamicSkill
- algo-price-elasticitySkill
- algo-price-van-westendorpSkill
- algo-rank-bayesianSkill
- algo-rank-eloSkill
- algo-rank-trueskillSkill
- algo-rank-wilsonSkill
- algo-rec-cfSkill
- algo-rec-contentSkill
- algo-rec-hybridSkill
- algo-rec-mfSkill
- algo-rec-sessionSkill
- algo-risk-altman-zSkill
- algo-risk-benfordSkill
- algo-risk-creditSkill
- algo-risk-varSkill
- algo-sc-bullwhipSkill
- algo-sc-eoqSkill
- algo-sc-newsvendorSkill
- algo-sc-routingSkill
- algo-sc-safety-stockSkill
- algo-seo-backlinkSkill
- algo-seo-contentSkill
- algo-seo-crawlSkill
- algo-seo-pagerankSkill
- algo-seo-schemaSkill
- algo-seo-technicalSkill
- algo-seo-tfidfSkill
- algo-social-engagementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
When external regressors are important (use regression or ML models)
- Distinctive: line 44
Update equations at each t:
- Distinctive: line 51
Check: in-sample RMSE, residual patterns.
- Distinctive: line 82
Additive vs multiplicative: If seasonal swings grow proportionally with level, use multiplicative.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Exponential Smoothing
Overview
Exponential smoothing assigns exponentially decreasing weights to past observations. Three variants: Simple (SES, level only), Holt (level + trend), Holt-Winters (level + trend + seasonality). ETS framework (Error-Trend-Seasonality) provides a unified statistical model. Fast, interpretable, and competitive with complex models for short horizons.
When to Use
Trigger conditions:
- Quick forecasting with minimal configuration
- Short-horizon forecasts (1-2 seasonal cycles ahead)
- Data with clear level, trend, and/or seasonal components
When NOT to use:
- For long-range forecasts (uncertainty accumulates too fast)
- When external regressors are important (use regression or ML models)
Algorithm
IRON LAW: Smoothing Parameters Control the Bias-Variance Trade-Off
α (level), β (trend), γ (seasonality) range [0,1].
- α near 1: react quickly to changes, noisy forecasts (high variance)
- α near 0: smooth forecasts, slow to adapt (high bias)
Optimize via minimizing MSE on training data (or use information criteria).
Never hand-pick smoothing parameters without validation.Phase 1: Input Validation
Identify components: level only (SES), level+trend (Holt), level+trend+seasonality (Holt-Winters). Determine: additive vs multiplicative trend/seasonality. Gate: Component structure identified, seasonal period known.
Phase 2: Core Algorithm
Holt-Winters (additive):
- Initialize: level₀ = mean(first season), trend₀ = (mean(season 2) - mean(season 1))/s, seasonal₀ from first season deviations
- Update equations at each t:
- Level: ℓₜ = α(yₜ - sₜ₋ₛ) + (1-α)(ℓₜ₋₁ + bₜ₋₁)
- Trend: bₜ = β(ℓₜ - ℓₜ₋₁) + (1-β)bₜ₋₁
- Seasonal: sₜ = γ(yₜ - ℓₜ) + (1-γ)sₜ₋ₛ
- Forecast: ŷₜ₊ₕ = ℓₜ + h×bₜ + sₜ₊ₕ₋ₛ
Phase 3: Verification
Check: in-sample RMSE, residual patterns. Compare against naive baselines (last value, seasonal naive). Gate: Beats naive baseline, residuals show no systematic pattern.
Phase 4: Output
Return forecasts with smoothed components.
Output Format
{
"forecasts": [{"period": "2025-04", "forecast": 1150, "level": 1100, "trend": 20, "seasonal": 30}],
"parameters": {"alpha": 0.3, "beta": 0.1, "gamma": 0.15},
"metadata": {"method": "holt_winters_additive", "seasonal_period": 12, "rmse": 45}
}Examples
Sample I/O
Input: 36 months of monthly sales, clear upward trend, December spike Expected: Holt-Winters additive. Forecast continues trend with repeated December seasonality.
Edge Cases
| Input | Expected | Why |
| No trend, no seasonality | SES (α only) | Simplest variant suffices |
| Seasonal amplitude grows | Use multiplicative | Additive would underestimate peaks |
| Very short series (<2 seasons) | SES or Holt only | Can't estimate seasonality |
Gotchas
- Additive vs multiplicative: If seasonal swings grow proportionally with level, use multiplicative. Wrong choice produces poor forecasts, especially at extremes.
- Initialization sensitivity: The first season's values set the baseline. Poor initialization from noisy early data propagates through the entire forecast.
- Damped trend: For long horizons, linear trend extrapolation is unrealistic. Use damped trend (φ parameter) to flatten the trend over time.
- Multiple seasonalities: Standard Holt-Winters handles one seasonal period. For daily data with weekly AND yearly patterns, use TBATS or STL+ETS.
- Outlier sensitivity: A single outlier can shift the level estimate significantly (especially with high α). Pre-detect and handle outliers.
References
- For ETS framework and model selection, see
references/ets-framework.md - For damped trend variants, see
references/damped-trend.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

