Time Series Parameter Tuning: ARIMA Orders, Prophet Config, and LSTM Architecture
A practical guide to tuning time series models — ARIMA (p,d,q), Prophet settings, Exponential Smoothing parameters, and LSTM architecture choices for better forecasts.
Time Series Parameter Tuning: ARIMA Orders, Prophet Config, and LSTM Architecture
Getting time series forecasts right often comes down to parameter tuning. The same algorithm can perform poorly or well depending on the choices you make. This guide covers how to tune ARIMA, Prophet, Exponential Smoothing, and LSTM models.
---
Why Time Series Parameters Matter
| Poor Parameters | Good Parameters |
|---|---|
| Underfitting: misses trends/seasonality | Captures key patterns without overfitting |
| Overfitting: fits noise, poor out-of-sample | Generalizes to future periods |
| Slow training or unstable forecasts | Efficient and stable |
| Misleading confidence intervals | Realistic uncertainty estimates |
ARIMA Parameters
ARIMA has three main orders: p, d, and q, plus seasonal terms for SARIMA.
p, d, q Explained
| Parameter | Name | Meaning | How to Choose |
|---|---|---|---|
| p | Autoregressive order | How many past values to use | PACF: lag where it cuts off |
| d | Differencing order | How many times to difference for stationarity | Number of differences until ACF decays |
| q | Moving average order | How many past errors to use | ACF: lag where it cuts off |
How ACF/PACF Determine p and q
| Plot | Interpretation |
|---|---|
| ACF tails off slowly | Non-stationary; try differencing |
| ACF cuts off after lag q | MA(q) component; set q = lag of cutoff |
| PACF cuts off after lag p | AR(p) component; set p = lag of cutoff |
| ACF and PACF both tail off | Mixed AR+MA; try small p and q (e.g., 1,1) |
d from Differencing
- d = 0: Series is already stationary (no trend)
- d = 1: First difference removes linear trend
- d = 2: Second difference removes quadratic trend (rare)
SARIMA Seasonal P, D, Q, m
| Parameter | Meaning | Typical Choice |
|---|---|---|
| P | Seasonal AR order | 0, 1, or 2 |
| D | Seasonal differencing | 0 or 1 |
| Q | Seasonal MA order | 0, 1, or 2 |
| m | Season length | 12 (monthly), 4 (quarterly), 7 (weekly) |
Auto-ARIMA
Use auto-ARIMA (e.g., from pmdarima) to search over (p,d,q)(P,D,Q)m automatically. It minimizes AIC or BIC. Good starting point; then refine manually if needed.
---
Prophet Parameters
Prophet fits: trend + seasonality + holidays. Key knobs:
changepointpriorscale
| Value | Effect |
|---|---|
| Low (0.001–0.01) | Smoother trend; fewer changepoints |
| High (0.1–0.5) | More flexible trend; more changepoints |
seasonalitypriorscale
| Value | Effect |
|---|---|
| Low | Weaker seasonality; more regularization |
| High | Stronger seasonality; fits seasonal swings more |
Yearly, Weekly, Daily Seasonality
| Component | When to Use | Default |
|---|---|---|
| yearly | Annual cycles (e.g., retail) | On |
| weekly | Day-of-week patterns | On |
| daily | Intraday (hourly data) | Off for daily data |
yearlyseasonality=False if you have < 2 years of data. Use addseasonality() for custom periods (e.g., monthly).
Holidays
Pass a DataFrame of date and holiday to capture known events (Black Friday, Christmas, etc.). Use holidayspriorscale to control strength (default 10).
Growth Mode
- linear: Default; linear trend
- logistic: Saturation; requires
capandfloorin the dataframe
---
Exponential Smoothing Parameters
Alpha, Beta, Gamma
| Parameter | Controls | Typical Range |
|---|---|---|
| alpha (α) | Level smoothing | 0.01–0.5 |
| beta (β) | Trend smoothing | 0.01–0.3 |
| gamma (γ) | Seasonal smoothing | 0.01–0.3 |
- Alpha low: more weight on history; smooth but slow to react.
- Alpha high: more weight on recent data; reactive but noisy.
- Beta and gamma similar: lower = smoother trend/season; higher = more responsive.
Trend Type
| Type | Use Case |
|---|---|
| None | No trend (SES) |
| Additive | Constant trend (linear) |
| Multiplicative | Trend scales with level (percentage growth) |
Seasonal Type
| Type | Use Case |
|---|---|
| Additive | Seasonal amplitude constant over time |
| Multiplicative | Seasonal amplitude proportional to level |
---
LSTM Parameters
Lookback Window
| Choice | Effect |
|---|---|
| Short (e.g., 7–14) | Captures recent patterns; less context |
| Long (e.g., 60–90) | More context; more parameters; risk of overfitting |
| Seasonal (e.g., 12, 24) | Trading daily/monthly; match period length |
Number of Layers
| Layers | Use Case |
|---|---|
| 1 | Simple patterns; less data |
| 2–3 | Complex patterns; more data |
| 4+ | Usually overkill; needs lots of data |
Hidden Units
| Units | Effect |
|---|---|
| 32–64 | Lightweight; good for small datasets |
| 128–256 | Standard for medium datasets |
| 512+ | Only if you have 10k+ points and complex structure |
Dropout
- 0.1–0.3: Common range
- Prevents overfitting; increase if training loss << validation loss
Learning Rate
- 0.001 (Adam default) is a good start
- Use learning rate scheduler or reduce if loss plateaus
Batch Size
- 32–64: Common for TS
- Smaller = noisier gradients, sometimes better generalization; larger = faster but less frequent updates
Grid Search for Time Series
- Define ranges for each parameter (see tables below).
- Split data with walk-forward or expanding-window validation.
- For each combination, train and compute validation metric (e.g., MAE, RMSE).
- Select the combination with best validation performance.
- Retrain on full data with chosen parameters for final model.
---
Common Parameter Ranges
| Model | Parameter | Suggested Range |
|---|---|---|
| ARIMA | p | 0–3 |
| ARIMA | d | 0–2 |
| ARIMA | q | 0–3 |
| Prophet | changepointpriorscale | 0.01, 0.05, 0.1, 0.5 |
| Prophet | seasonalitypriorscale | 1, 10, 100 |
| Holt-Winters | alpha | 0.1, 0.2, 0.3 |
| Holt-Winters | beta | 0.05, 0.1, 0.2 |
| Holt-Winters | gamma | 0.05, 0.1, 0.2 |
| LSTM | lookback | 7, 14, 28, 56 |
| LSTM | units | 32, 64, 128 |
| LSTM | dropout | 0.1, 0.2, 0.3 |
Practical Workflow
- Plot and decompose the series to see trend, seasonality, and scale.
- Check stationarity (ADF test); difference if needed.
- Inspect ACF/PACF (for ARIMA) or use auto-ARIMA.
- Start with defaults for Prophet or HW; tune if residuals look bad.
- Grid search over a small set of plausible values.
- Validate with walk-forward or expanding-window; report test-set metrics.
Common Pitfalls
| Pitfall | Fix |
|---|---|
| Overfitting | Fewer parameters; more regularization; simpler model |
| Underfitting | Add seasonal terms; increase flexibility; check d |
| Ignoring seasonality | Use SARIMA, Prophet, or Holt-Winters with seasonality |
| Wrong m | Match m to your data (e.g., m=12 for monthly) |
| Tuning on test | Use validation set; hold test for final evaluation only |
| LSTM with little data | Use simpler models (ARIMA, Prophet) until you have 1000+ points |
Quick Reference
| Model | Key Parameters |
|---|---|
| ARIMA | p, d, q from ACF/PACF and stationarity |
| SARIMA | + P, D, Q, m for seasonality |
| Prophet | changepointpriorscale, seasonalitypriorscale, holidays |
| Holt-Winters | alpha, beta, gamma; additive vs multiplicative |
| LSTM | lookback, layers, units, dropout, learning rate |
What's Next?
- [Time Series Algorithms and Forecasting](ts-algorithms-forecast) — Overview of all TS algorithms
- [Time Series Analysis Tools](ts-analysis-tools) — Decomposition, ACF, stationarity
- [Time Series Overview](ts-overview) — Platform workflow
- [Hyperparameter Tuning](hyperparameter-tuning) — General ML tuning strategies
Related Articles
Time Series Algorithms and Forecasting
A complete guide to all 7+ time series algorithms: SES, Holt, Holt-Winters, ARIMA, Prophet, LSTM, VAR — when to use each, pros and cons, and how to generate forecasts.
Time Series Analysis Tools
Understand decomposition, stationarity tests, ACF/PACF analysis, and resampling for time series data.
Time Series Overview: What It Is and How to Use It
A beginner-friendly guide to time series data: what it is, key concepts like trend and seasonality, the full workflow, choosing algorithms, and real-world examples.
Hyperparameter Tuning: Grid Search, Random Search, and Bayesian Optimization
Learn how to find the best settings for your ML models using grid search, random search, and Bayesian optimization, with practical guidance on what to tune for each algorithm.
Was this helpful?