Time Series Analysis时间序列分析
Time Series Analysis
Time series:
– An ordered sequence of equally spaced values over time.
Understand the underlying process that generates the observed data.
Used to forecast and monitor the future data.
主要目标:
- Identify and model the structure of time series.
- Forecast future values in the time series.
Box-Jenkins methodology for time series analysis:
• A time series can consists of
Trend, Seasonality, Cyclic, and Random.
• Trend
– The long-term movement in a time series.
– The values increase or decrease over time.
• Seasonality
– The fixed, periodic fluctuation over time.
– Often related to the calendar.
• Cyclic
– Periodic, but not fixed fluctuation over time.
– Say, the boom-bust cycles of the economy.
• Random
– What remains after the above three components.
– Noise + underlying structure to be modelled.
趋势(trend)指的是时间序列中的长期移动。它表示观测值是否随着时间变化增加或降低。趋势的例子包括每月销售的稳定增长或每年因车祸死亡人数的下降。
季节效应(seasonality)描述了观测数据在时间上的固定的周期性波动。顾名思义,季节效应通常都和历法有关。例如,年内的月度销售可能因天气和假期的因素而波动。
周期(cylic)也可以视作周期性波动,但是它不像季节效应那样固定。例如,零售可能受到经济总体状况的影响。因此,零售时间序列可能常常遵循经济繁荣与萧条的周期。
最后一个部分是随机性(random)。尽管噪声肯定是随机性的一部分,但是经常存在随机性的某种底层结构可以对其进行建模,以预测给定时间序列的未来值。
Box-Jenkins methodology for time series analysis:
- Condition data and select a model
a) Identify and account for any trends or seasonality in the time series. 识别和考虑时间序列中的任何趋势与季节效应。
b) Examine the remaining time series and determine a suitable model. 评估其余的时间序列并确定一个合适的模型。 - Estimate the model parameters.
- Assess the model and return to Step 1, if needed.
使用 Box-Jenkins 方法将一个 ARIMA 模型应用到一个给定的时间序列。
ARIMA Model
– AutoRegressive Integrated Moving Average.
– Shall be applied to stationary time series.
A time series yt is a stationary time series if:
一个时间序列如果满足上面三种情况就是平稳时间序列。
如果两个变量相互独立,那么它们的协方差是 0。如果两个变量向着同一个方向变化,那么它们的协方差是正的。反之,如果两个变量向着相反方向变化,那么它们的协方差就是负的。
Constant variance
方差是常数
在该图中,数据点看起来
是以一个固定的常量(0)为中心,方差看起来是一个常数。
图中的时间序列不存在一个总体趋势,换言之有趋势的就不是平稳时间序列。
Autocorrelation function (ACF) 自相关函数(ACF)
自相关函数(ACF)通过图了解时间序列中变量的协方差及其底层结构。
对于平稳时间序列,ACF 的定义