-
Notifications
You must be signed in to change notification settings - Fork 22
CES
CES (Complex Exponential Smoothing) is an alternative to ETS that uses complex-valued smoothing parameters. It captures both the level and "potential" of the time series, making it particularly useful for series with complex seasonal patterns.
Note: CES is currently available only in R. Python implementation is planned.
Unlike traditional ETS models that require explicit trend specification, CES uses complex numbers to automatically capture both stationary and non-stationary behavior. The model estimates complex smoothing parameters a and b that determine the dynamics.
| Type | Code | Description |
|---|---|---|
| None | "none" |
No seasonality, simple CES |
| Simple | "simple" |
Lagged CES (uses t-m observation) |
| Partial | "partial" |
Real seasonal component (additive-like) |
| Full | "full" |
Complex seasonal component (adaptive) |
library(smooth)
# Simple CES (no seasonality)
ces(BJsales, h=8, holdout=TRUE)
# CES with simple seasonality
ces(AirPassengers, h=18, holdout=TRUE, seasonality="simple")
# CES with partial seasonality (additive-like)
ces(AirPassengers, h=18, holdout=TRUE, seasonality="partial")
# CES with full seasonality (most flexible)
ces(AirPassengers, h=18, holdout=TRUE, seasonality="full")
# Automatic seasonality selection
auto.ces(AirPassengers, h=18, holdout=TRUE)# CES with explanatory variables
ces(y, h=12, xreg=X, regressors="use")
# Automatic regressor selection
ces(y, h=12, xreg=X, regressors="select")| Parameter | Type (R) | Default | Description |
|---|---|---|---|
y |
vector/ts | - | Time series data |
seasonality |
character | "none" | Seasonality type |
lags |
numeric vector | frequency(y) | Seasonal lag(s) |
a |
complex | NULL | First smoothing parameter (estimated if NULL) |
b |
complex | NULL | Second smoothing parameter (estimated if NULL) |
initial |
character | "backcasting" | Initialization method |
loss |
character | "likelihood" | Loss function |
h |
integer | 0 | Forecast horizon |
holdout |
logical | FALSE | Use holdout validation |
bounds |
character | "admissible" | Parameter bounds |
xreg |
matrix | NULL | External regressors |
regressors |
character | "use" | How to handle regressors |
# Automatic selection between seasonality types
auto.ces(y, h=12, holdout=TRUE)
# Specify which seasonality types to try
auto.ces(y, h=12, seasonality=c("none", "simple", "partial", "full"))The complex smoothing parameters a = a_r + i·a_i have the following interpretation:
- Real part (a_r): Controls the speed of adaptation to level changes
- Imaginary part (a_i): Controls the "momentum" or potential energy in the system
The interplay between real and imaginary parts allows CES to capture both trending and oscillating behaviors without explicit trend specification.
- No explicit trend selection: CES automatically adapts to trends
- Fewer model variants: Only 4 seasonality types vs 30 ETS models
- Long memory processes: Performs well on time series without abrupt changes, has the long memory property.
The function returns an object of class "adam" containing:
| Element | Type (R) | Description |
|---|---|---|
model |
character | Model name (e.g., "CES(n)", "CES(s)", "CES(p)", "CES(f)") |
states |
matrix | State matrix |
persistence |
complex vector | Complex persistence vector |
parameters |
list | List with a and b values |
fitted |
vector | Fitted values |
forecast |
vector | Point forecasts |
residuals |
vector | Model residuals |
logLik |
numeric | Log-likelihood value |
ICs |
numeric vector | Information criteria (AIC, AICc, BIC, BICc) |
- Svetunkov, I., Kourentzes, N., & Ord, J.K. (2022). Complex exponential smoothing. Naval Research Logistics, 69(5), 697-717. DOI: 10.1002/nav.22074
- ADAM - Main unified framework
- ES - Traditional Exponential Smoothing
- GUM - Generalised Univariate Model
- Loss-Functions - Loss function options
- Explanatory-Variables - Using external regressors
- Initialisation - State initialization methods
- Bounds - Parameter restrictions