← ClaudeAtlas

algo-forecast-arimalisted

"Build ARIMA models for time series forecasting with trend and seasonality decomposition. Use this skill when the user needs to forecast future values from historical sequential data, test for stationarity, or select ARIMA parameters — even if they say 'time series forecast', 'predict next month sales', or 'ARIMA model'.".
charlieviettq/awesome-agent-skill · ★ 25 · AI & Automation · score 80
Install: claude install-skill charlieviettq/awesome-agent-skill
# ARIMA Time Series Model ## Overview ARIMA(p,d,q) combines autoregression (AR), differencing (I), and moving average (MA) for time series forecasting. Seasonal variant: SARIMA(p,d,q)(P,D,Q,s). Requires stationary data (achieved through differencing). Best for univariate series with clear trend/seasonality patterns. ## When to Use **Trigger conditions:** - Forecasting univariate time series (sales, demand, traffic) - Data has clear trend and/or seasonal patterns - Need interpretable model with statistical properties **When NOT to use:** - For multivariate forecasting with many external features (use ML models) - For very long-range forecasts (ARIMA confidence intervals widen rapidly) - For irregular/event-driven data (use causal models) ## Algorithm ``` IRON LAW: ARIMA Requires STATIONARY Data Non-stationary data (trend, changing variance) violates ARIMA assumptions. Test stationarity with ADF test (p < 0.05 = stationary). If non-stationary: difference the series (d=1 usually suffices). If still non-stationary after d=2, ARIMA may not be appropriate. ``` ### Phase 1: Input Validation Check: regular time intervals, no missing values (impute if needed), minimum 50 observations (ideally 2+ full seasonal cycles). Test stationarity with ADF test. **Gate:** Data is regular, sufficient length, stationarity assessed. ### Phase 2: Core Algorithm 1. **Stationarity**: ADF test. If p > 0.05, difference (d=1). Retest. 2. **Parameter selection**: Examine ACF/PACF plots. Or use aut