[TOC]

I. Moving Average Model (MA)

Definition 1.1 MA

Definition: The current value is a linear combination of past errors that are normally distributed and independent of each other.

Formula of order Q:

1.2 Understanding of MA

Differences between autoregressive and moving average modeling:

  • Moving Average (MA)Based onPast residuals, which is white noise to do linear combinations;
  • AR model is a linear combination of past observations.

The starting point of MA is to observe the vibration of residuals by combining residuals. MA can effectively eliminate the random fluctuation in prediction.

When the value of time series fluctuates greatly under the influence of periodic and irregular changes, and it is difficult to show the development trend, the moving average method can be used to eliminate the influence of these factors and analyze and predict the long-term trend of the series.

For example, the impact of hurricanes on the price of crude oil can be modeled to predict trends.

Two, the stability

  1. The stationarity is the requirement that the fitting curve obtained through the sample time series can continue “inertia” along the existing form in the future period (maintain state ~).

  2. Stationarity requires that the mean and variance of the sequence do not change significantly (mathematical definition of stable state ~);

2.1 Strict stability and wide (weak) stability

  1. Strict stationarity: the distribution of strict stationarity does not change with time.

For example: white noise (normal), no matter how to take, is the expectation is 0, variance is 1;

  1. Weak stationary: expectation and correlation coefficient (dependence) are constant

The value YtY_{t}Yt of TTT at a certain time in the future depends on its past information, so dependence is needed.

2.2 Mathematical characteristics of weak (wide) stationary time series

  1. Mean value E(Yt)=μE(Y_{t})= μE(Yt)=μ T constant independent of time TTT;

  2. Variance Var(Yt)=γVar(Y_{t})= gammaVar(Yt)=γ constant independent of time TTT;

  3. Covariance Cov (Yt, Yt + k) = gamma 0, kCov (Y_ {t}, Y_ {t} + k) = \ gamma_} {0, k Cov (Yt, Yt + k) = gamma 0, k is only related to time interval KKK, constant and independent of the time TTT.

  4. Since the correlation coefficients rho k = Cov (yt, yt – k) Var (yt – k) Var (yt) = Cov (yt, yt – k) Var (yt) = gamma gamma rho _} {k = 0 k \ frac {Cov (y_ {t}, y_{t-k})}{\sqrt{Var(y_{t-k)}Var{(y_t)}}}=\frac{Cov(y_{t }, Y_ {t} – k)} {Var {(y_t)}} = \ frac {\ gamma_ {k}} {\ gamma_ {0}} rho k = Var (yt – k) Var (yt) Cov (yt, yt – k) = Var (yt) Cov (yt, yt – k) = 0 gamma gamma k

2.3 difference method

For instable time series, difference method is generally used to obtain the desired stationary series, and logarithmic transformation, power transformation and other methods can also be used.

The chart below shows the us consumer confidence index series after first – and second-order differences. For example, in the figure below, the blue image on the top is the original data, the green image is the data after the first-order difference, and the red image is the data after the second-order difference. From the difference effect, the basic requirement of smoothness has been realized.

Autocorrelation coefficient and partial autocorrelation coefficient

3.1 Autocorrelation Coefficient (ACF)

  1. An ordered sequence of random variables compared to itself;

  2. Autocorrelation function reflects the correlation between values of the same sequence in different time series. (Correlation of pairwise values)

  3. Formula: ACF (k) = rho k = Cov (yt, yt – 1) Var (yt) ACF (k) = rho _} {k = \ frac {Cov (y_ {t}, y_ {1} t -)} {Var (y_t)} ACF (k) = rho k = Var (yt) Cov (yt, yt – 1);

  4. ρkρ_{k}ρk range of [-1,1];

3.2 Partial autocorrelation coefficient (PACF)

  1. For a stationary AR(p)AR(p)AR(p) model, when the hysteretic KKK autocorrelation coefficient ρkρ_{k}ρk is calculated, it is not a simple correlation between x(t)x(t)x(t − K)x(t− K)x(t− K).

  2. X (t) is also affected by k− 1K-1K −1 random variables X (t−1), x(t−2),…… , x(t−k+1)x(t-1), x(t-2)…… , x(t-k+1)x(t−1), x(t−2)…… And x(t−k+1), and the random variables k− 1K-1K −1 are all correlated with x(t−k)x(t-k)x(t−k). So rho autocorrelation coefficient k rho _ {k} rho k in actual with other variables of x (t) (t) (t) and x x x x (t) – k (t – k) x (t – k);

  3. The intermediate random variables X (t−1), X (t−2) and…… , x(t−k+1)x(t-1), x(t-2)…… , x(t-k+1)x(t−1), x(t−2)…… , the interference of x (t – k + 1), x (t) – k x (t, k) x (t) – k of x (t) (t) x x (t) affect the related degree;


  4. A C F ACF
    It also contains the influence of other variables, while the partial autocorrelation coefficient
    P A C F PACF
    Is the strict correlation between these two variables.

3.3 Tail cutting and tail dragging

Truncation: refers to the property that both the autocorrelation function (ACF) or partial autocorrelation function (PACF) of time series are 0 after a certain order (such as PACF of AR);

Trailing: The property that ACF or PACF is not zero after a certain order (e.g., ACF of AR).

Truncation: truncation of order K when it is greater than a constant K and rapidly tends to 0; Trailing: always has a non-zero value and does not become equal to zero (or fluctuate randomly around zero) after k is greater than some constant.

3.4 summary

  1. ACF

ACF is a complete autocorrelation function that provides the autocorrelation value of any sequence with a lag value. In simple terms, it describes the degree of correlation between the current value of the sequence and its past value.

Time series can contain trends, seasonality, periodicity and residuals. ACF considers all of these components when looking for correlations.

Intuitively, ACF describes the autocorrelation between one observation and another, including direct and indirect correlation information.

  1. PACF

PACF is a partial autocorrelation function or partial autocorrelation function. Basically, instead of finding a correlation between a lag like ACF and the present, it finds a correlation between the residuals (which persist after removing the effects already explained by the previous lag) and the next lag value.

Therefore, if there is any hidden information in the residuals that can be modeled by the next lag, good correlation may be obtained and the next lag will be characterized when modeling.

Note: When modeling, you generally do not want to retain too many interrelated features, which can lead to multicollinearity problems.

Iv. Order determination of AR and MA

So MA,

The order q of MA is obtained from the ACF graph, and after some order, ACF passes through the upper bound confidence interval for the first time.

According to the above, PACF can capture the relationship between residual and time series lag term, and we can get a good correlation between the nearby lag term and the past lag term.

Why not use PACF?

  1. Because the sequence of MA is a linear combination of residuals, and the lag term of the time series itself cannot directly explain the current term (because it is not an AR process).

  2. An MA process has no seasonal or trend component, so ACF can capture only the correlation due to residuals.

The core of PACF diagram is that it can extract changes that have been explained by previous lag terms. Therefore, PACF is “obsolete” in MA process, but applicable to AR process.

It can be concluded that:

  • PACF AR (p)
  • MA (q) the ACF
model ACF PACF
AR(p) Trailing, decay goes to zero Order P after truncation
MA(q) Order Q is truncated Trailing, decay goes to zero

Welcome to pay attention to individual public number: Distinct number said