# 时间序列分解

时间序列分解是一种统计方法，它将观测到的序列分离为若干成分，通常包括趋势、季节模式和一个剩余项，以便分别对每个成分进行分析、调整或预测。这些成分以加法形式 \( y_{t} = S_{t} + T_{t} + R_{t} \) 或乘法形式 \( y_{t} = S_{t} \times T_{t} \times R_{t} \) 组合，其中 \( T_{t} \) 是趋势，\( S_{t} \) 是季节成分，\( R_{t} \) 是剩余项。<sup>[1](https://otexts.com/fpp3/components.html)</sup> 分解是官方统计中季节调整、商业预测中去季节化，以及现代深度学习流程中趋势提取的基础。

| 关键事实 | 细节 |
|---|---|
| 成分模型 | 加法 \( y_{t} = S_{t} + T_{t} + R_{t} \)；乘法 \( y_{t} = S_{t} \times T_{t} \times R_{t} \)；对数变换可将乘法模型在对数尺度上转为加法模型<sup>[1](https://otexts.com/fpp3/components.html)</sup> |
| 季节调整后数据 | \( y_{t} - S_{t} \)（加法）或 \( y_{t}/S_{t} \)（乘法）；它们仍包含剩余项且不光滑，因此识别转折点时更宜使用趋势-循环成分<sup>[1](https://otexts.com/fpp3/components.html)</sup> |
| 经典分解 | 起源于20世纪20年代；趋势由 \( m \) 阶移动平均或 \( 2 \times m \) 阶移动平均得到，季节指数由去趋势值的平均得到；仍被广泛使用但不被推荐<sup>[2](https://otexts.com/fpp2/classical-decomposition.html)</sup> |
| STL | 对季节子序列和趋势进行迭代Loess平滑，外循环使用稳健性权重限制异常值的影响<sup>[3](https://wessa.net/download/stl.pdf)</sup> |
| 官方统计谱系 | 美国人口普查局（Census Bureau）方法I（1954）和方法II（1955）引出了X-3（1960）和X-11（1965），随后是X-11-ARIMA、X-12-ARIMA和X-13ARIMA-SEATS<sup>[4](https://www.nber.org/system/files/chapters/c4320/c4320.pdf)</sup><sup> • </sup><sup>[5](https://doi.org/10.1080/07350015.1998.10524743)</sup> |
| MSTL基准测试 | 在合成数据集和受扰动的真实世界时间序列数据集上的评估中，与包括TBATS和Prophet在内的其他分解基准相比，MSTL表现出有竞争力的结果和更低计算成本<sup>[6](https://doi.org/10.1504/ijor.2022.10048281)</sup> |
| 预测用途 | STLForecast用STL去季节化，对调整后序列拟合标准模型，并通过重复最后一个完整周期来预测季节成分<sup>[7](https://www.statsmodels.org/dev/examples/notebooks/generated/stl_decomposition.html)</sup> |

## 工作原理

分解假设观测序列是一个缓慢变化的趋势-循环成分、一个周期性季节成分和不规则噪声的组合。加法形式适用于季节波动不随水平变化的序列；乘法形式适用于季节变化与水平成比例的序列，这在经济数据中很常见。取对数可使二者等价，因为 \( y_{t} = S_{t} \times T_{t} \times R_{t} \) 意味着 \( \log y_{t} = \log S_{t} + \log T_{t} + \log R_{t} \)。<sup>[1](https://otexts.com/fpp3/components.html)</sup> 时间序列的基本成分被划分为季节波动、长期趋势、循环变动和不规则残差，这也是大多数方法仍采用的框架。<sup>[4](https://www.nber.org/system/files/chapters/c4320/c4320.pdf)</sup>

经典分解用 \( m \) 阶移动平均估计趋势：\( m \) 为奇数时用 \( m \) 阶移动平均，\( m \) 为偶数时用中心化 \( 2 \times m \) 阶移动平均。对于季度数据，\( 2 \times 4 \) 阶移动平均为 \( \hat{T}_{t} = \tfrac{1}{8} y_{t-2} + \tfrac{1}{4} y_{t-1} + \tfrac{1}{4} y_{t} + \tfrac{1}{4} y_{t+1} + \tfrac{1}{8} y_{t+2} \)，可将季节变动平均掉。<sup>[8](https://math.unm.edu/~lil/Stat581/6-decomposition.pdf)</sup> 季节指数来自对每个季节的去趋势值求平均，剩余项在加法模型下为 \( \hat{R}_{t} = y_{t} - \hat{T}_{t} - \hat{S}_{t} \)，在乘法模型下为 \( \hat{R}_{t} = y_{t} / (\hat{T}_{t} \hat{S}_{t}) \)；乘法季节估计被称为移动平均比率法。<sup>[2](https://otexts.com/fpp2/classical-decomposition.html)</sup>

## 实现方式

STL（使用Loess的季节-趋势分解）用Loess替代固定移动平均；Loess是使用三立方权重函数以及局部线性（1次）或二次（2次）拟合的局部加权回归。它按加法形式分解序列，\( Y_{v} = T_{v} + S_{v} + R_{v} \)，并运行嵌套在外循环中的内循环：每轮内循环更新季节成分和趋势成分一次，每轮外循环计算稳健性权重，供下一次内循环运行使用，以降低短暂异常行为的影响。<sup>[3](https://wessa.net/download/stl.pdf)</sup> 每轮内循环先对序列去趋势，用稳健性加权Loess平滑 \( m \) 条季节子序列，去除季节成分，应用三步低通滤波（两个长度为 \( m \) 的移动平均、一个长度为3的移动平均，然后Loess），将季节估计的低频部分与季节成分本身分离，最后对去季节化序列平滑以得到趋势。<sup>[9](https://charlescforgy.github.io/time-series-book/stl-decomposition/)</sup>

主要调参参数是季节窗口和趋势窗口：季节窗口控制季节模式可以多快变化，趋势窗口控制趋势的波动程度；较小取值允许更快速变化，周期性季节窗口强制各年季节模式相同。<sup>[10](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/stl.html)</sup><sup> • </sup><sup>[8](https://math.unm.edu/~lil/Stat581/6-decomposition.pdf)</sup>

## 起源

季节调整在20世纪20年代和30年代借助移动平均发展起来，其中许多受到珀森斯（Persons）1919年工作的启发，当时缺乏合适的统计模型。<sup>[11](https://www.census.gov/content/dam/Census/library/working-papers/1984/adrm/rr84-09.pdf)</sup> 美国人口普查局的方法I改进了弗雷德里克·R·麦考利（Frederick R. Macaulay）在美国国家经济研究局（NBER）开发的移动平均比率法；方法II于1955年随后出现，X-3于1960年公开发布，X-11于1965年推出。<sup>[4](https://www.nber.org/system/files/chapters/c4320/c4320.pdf)</sup> 基于模型的替代方法始于信号提取方法。<sup>[11](https://www.census.gov/content/dam/Census/library/working-papers/1984/adrm/rr84-09.pdf)</sup> 典范ARIMA模型分解将高斯ARIMA序列唯一地分解为相互独立的加法季节成分、趋势成分和不规则噪声成分，并将典范分解定义为使噪声新息方差最大的可接受分解。<sup>[12](https://www.istat.it/wp-content/uploads/2014/06/An-ARIMA-Model-Based-Approach-to-Seasonal-Adjustment.pdf)</sup><sup> • </sup><sup>[3](https://wessa.net/download/stl.pdf)</sup>

## 变体

**普查局谱系。** X-11-ARIMA保留X-11的全部能力，并在调整前用ARIMA预测和回溯预测延长序列，以减少修订。X-12-ARIMA由戴维·F·芬德利（David F. Findley）及其同事于1998年报告，增加了regARIMA建模，可处理交易日、异常值和水平位移效应，支持乘法、加法、对数加法和伪加法分解，支持用户指定季节滤波器（包括可选的3×15移动平均），并提供间接调整与直接调整的诊断。<sup>[5](https://doi.org/10.1080/07350015.1998.10524743)</sup> SEATS是TRAMO-SEATS的一部分，应用希尔默（Hillmer）、刁（Tiao）和伯曼（Burman）的典范ARIMA模型方法，为每个成分赋予自己的ARIMA模型；X-13ARIMA-SEATS将普查局滤波器与SEATS结合，并提供基于模型的固定季节性F检验、QS诊断和谱图等诊断。<sup>[13](https://www.bls.gov/osmr/research-papers/2022/pdf/st220010.pdf)</sup>

**基于Loess的扩展。** MSTL由卡松·班达拉（Kasun Bandara）、罗布·海因德曼（Rob Hyndman）和克里斯托夫·贝格迈尔（Christoph Bergmeir）于2022年报告，按升序对每个季节频率迭代应用STL以限制混淆，并从最后一次迭代取趋势；它排除大于或等于序列长度一半的季节周期，插补缺失值，并可选择应用Box-Cox变换。<sup>[6](https://doi.org/10.1504/ijor.2022.10048281)</sup><sup> • </sup><sup>[20](https://www.statsmodels.org/dev/_modules/statsmodels/tsa/stl/mstl.html)</sup> STR由亚历山大·多库门托夫（Alexander Dokumentov）和罗布·J·海因德曼（Rob J. Hyndman）报告，是一种基于回归的过程，允许多个季节成分和循环成分，其稳健版本假设双指数（L1）误差。<sup>[14](https://robjhyndman.com/papers/wp13-15.pdf)</sup> OnlineSTL由阿比纳夫·米什拉（Abhinav Mishra）、拉姆·斯里哈沙（Ram Sriharsha）和钟思辰（Sichen Zhong）于2022年报告，将分解扩展到流式场景和长季节长度；后来的在线变体如OneShotSTL和BacktrackSTL以常数时间更新和对漂移的稳健性为目标；RobustSTL系列用ℓ1趋势滤波对趋势正则化，鼓励带结构断点的分段线性趋势。<sup>[15](https://doi.org/10.14778/3523210.3523219)</sup><sup> • </sup><sup>[16](https://arxiv.org/html/2601.04820)</sup>

## 应用

分解用于为报告去季节化序列、通过趋势-循环成分分离转折点，并作为预测的前端。STLForecast对STL去季节化后的数据拟合标准时间序列模型（如ARIMA(1,1,0)），并通过重复最后一个完整周期来预测季节成分，\( E[S_{T+h} \mid \mathcal{F}_{T}] = \hat{S}_{T-k} \)，其中 \( k = m - h + m \lfloor (h-1)/m \rfloor \)。<sup>[7](https://www.statsmodels.org/dev/examples/notebooks/generated/stl_decomposition.html)</sup> 在NN3和M1竞赛数据上，基于STL分解的预测相对于ARIMA、Theta、Holt-Winters和Holt阻尼趋势法表现良好。<sup>[17](https://ideas.repec.org/a/eee/intfor/v27y2011i4p1178-1195.html)</sup>

分解也出现在深度预测架构内部：Autoformer、FEDformer和TimeMixer使用移动平均分解模块，STLformer在变换器内使用独立的STL模块。<sup>[18](https://link.springer.com/article/10.1007/s10618-025-01120-8)</sup>

## 局限与替代方法

经典分解有已记录的缺点：前 \( m/2 \) 个和后 \( m/2 \) 个观测值没有趋势估计，它对快速上升和下降过度平滑，假设季节性逐年固定，且对异常值不稳健，因此尽管仍被广泛使用，却不被推荐。<sup>[2](https://otexts.com/fpp2/classical-decomposition.html)</sup> 与X-12-ARIMA相比，STL能处理任何类型的季节性，允许用户控制变化速率，并对异常值稳健，但不提供交易日或日历调整，且仅支持加法模型；X-12-ARIMA给出更光滑的趋势、端点估计和相对稳健性，但只适用于季度和月度序列；它生成regARIMA预测和回溯预测，这些用于在调整前延长序列，而不是作为调整后成分的预测或置信区间。<sup>[19](https://robjhyndman.com/etc2450/fpp6.pdf)</sup> 大多数季节-趋势方法要求用户指定或估计季节周期，并假设稳定的周期结构，这是近期无需季节长度的方法所解决的局限。<sup>[16](https://arxiv.org/html/2601.04820)</sup> 在预测模型实验中，没有任何单一分解技术在所有数据集上占优，STL被排除在架构级使用之外，因为反复应用Loess平滑器代价过高。<sup>[18](https://link.springer.com/article/10.1007/s10618-025-01120-8)</sup>

## References

1. [Time series components (Forecasting: Principles and Practice, 3rd ed.)](https://otexts.com/fpp3/components.html)
2. [Classical decomposition (Forecasting: Principles and Practice, 2nd ed.)](https://otexts.com/fpp2/classical-decomposition.html)
3. [STL: A Seasonal-Trend Decomposition Procedure Based on Loess (Journal of Official Statistics, Vol. 6, No. 1, 1990, pp. 3–73)](https://wessa.net/download/stl.pdf)
4. [An Overview of the Objectives and Framework of Seasonal Adjustment (NBER)](https://www.nber.org/system/files/chapters/c4320/c4320.pdf)
5. [David F. Findley and colleagues (1998). New Capabilities and Methods of the X-12-ARIMA Seasonal-Adjustment Program. Journal of Business and Economic Statistics.](https://doi.org/10.1080/07350015.1998.10524743)
6. [Kasun Bandara, Rob Hyndman, Christoph Bergmeir (2022). MSTL: A Seasonal-Trend Decomposition Algorithm for Time Series with Multiple Seasonal Patterns. International Journal of Operational Research.](https://doi.org/10.1504/ijor.2022.10048281)
7. [Seasonal-Trend decomposition using LOESS (STL), statsmodels documentation](https://www.statsmodels.org/dev/examples/notebooks/generated/stl_decomposition.html)
8. [STAT481/581: Introduction to Time Series Analysis – decomposition lecture notes](https://math.unm.edu/~lil/Stat581/6-decomposition.pdf)
9. [5.4 STL Decomposition - Time Series Analysis for Data Scientists (Charles Forgy)](https://charlescforgy.github.io/time-series-book/stl-decomposition/)
10. [R: Seasonal Decomposition of Time Series by Loess (stats::stl)](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/stl.html)
11. [Issues Involved with the Seasonal Adjustment of Economic Time Series (Census Bureau working paper, 1984)](https://www.census.gov/content/dam/Census/library/working-papers/1984/adrm/rr84-09.pdf)
12. [An ARIMA-Model-Based Approach to Seasonal Adjustment (Hillmer & Tiao, JASA 1982)](https://www.istat.it/wp-content/uploads/2014/06/An-ARIMA-Model-Based-Approach-to-Seasonal-Adjustment.pdf)
13. [Identifying Seasonality (BLS research paper on X-13ARIMA-SEATS diagnostics)](https://www.bls.gov/osmr/research-papers/2022/pdf/st220010.pdf)
14. [STR: A Seasonal-Trend Decomposition Procedure Based on Regression (Dokumentov & Hyndman)](https://robjhyndman.com/papers/wp13-15.pdf)
15. [Abhinav Mishra, Ram Sriharsha, Sichen Zhong (2022). OnlineSTL. Proceedings of the VLDB Endowment.](https://doi.org/10.14778/3523210.3523219)
16. [LGTD: Local–Global Trend Decomposition for Season-Length–Free Time Series Analysis](https://arxiv.org/html/2601.04820)
17. [Forecasting monthly and quarterly time series using STL decomposition (International Journal of Forecasting, 2011)](https://ideas.repec.org/a/eee/intfor/v27y2011i4p1178-1195.html)
18. [Unpacking the trend: decomposition as a catalyst to enhance time series forecasting models (Data Mining and Knowledge Discovery, 2025)](https://link.springer.com/article/10.1007/s10618-025-01120-8)
19. [Applied forecasting for business and economics (course notes, Rob J. Hyndman)](https://robjhyndman.com/etc2450/fpp6.pdf)
20. [statsmodels.tsa.stl.mstl, statsmodels 0.15.1 (+1154)](https://www.statsmodels.org/dev/_modules/statsmodels/tsa/stl/mstl.html)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/time-series-decomposition

English original: https://www.edgepedia.org/time-series-decomposition
