Time series of stationary time series forecasting, trend series forecasting, composite series forecasting

A time series is a sequence of successive observations of the same phenomenon at different times. One of the main purposes of studying time series is to make predictions, mainly to predict future changes based on existing time series data. The key to time series forecasting is to determine the pattern of change in the existing time series and assume that this pattern will continue into the future (contrast with Markov forecasting models).

The components of time series are trend, seasonality, periodicity and randomness.

  • A trend is a continuous upward or downward change in a time series over a long period of time.
  • Seasonality is also called seasonal variation, which is a periodic fluctuation of time series that recurs within a year.
  • Periodicity, also known as cyclical volatility, is a wave-like or oscillating change around a long-term trend that appears in the time series .
  • Randomness, also known as irregular fluctuation, is the occasional fluctuation after removing the trend, periodicity and seasonality in the time series.

Time series can be divided into two categories: stationary series and non-stationary series. A stationary series is a series with basically no trend. A non-stationary series is a series that contains trend, seasonality, or periodicity, and it may contain only one of these components, or several components.

 Forecasting of Stationary Series

Stationary time series usually only contain random components (time series components do not contain trend, periodicity and seasonality) , and its forecasting methods mainly include simple average method, moving average method and exponential smoothing method, etc. These methods mainly use time series Smoothing is performed to remove random fluctuations, hence the name smoothing.

simple average

The simple average method uses the existing t-period observations to predict the value of the next period through a simple average, that is, Y_{i},i=1,2,...t.the average of the existing t-period values ​​is used as the t+1 period forecast value F_{t+1},

F_{t+1}=\frac{1}{t}\sum_{i=1}^{t}Y_{i}

moving average method

The moving average is a forecasting method that obtains the average number as the forecast value by shifting the time series period by period, and its methods include simple moving average and weighted moving average.

  • simple moving average

The simple moving average averages the data of the last k periods as the forecast value of the next period. Assuming that the moving interval is k (1<k<t+1), then the moving average of period t+1 is,

F_{t+1}=\bar{Y}_{t}=\frac{Y_{t-k+1}+Y_{t-k+2}+\cdots +Y_{t-1}+Y_{t}{}}{k}

  • weighted moving average

In the simple moving average, the proportion of the selected recent data in the forecast calculation is the same, but the recent data generally contains information about the future, so it is given a higher weight, similar to the weighted average, and the weighted moving average formula is ,

F_{t+1}=\frac{w_{1}Y_{t}+\cdots w_{N}Y_{t-N+1}}{w_{1}+w_{2}+\cdots w_{N}},t\geqslant N

 That is, the weighted moving average of period t is used as the forecast value of period t+1, where is w_{i}the Y_{t-i+1}weight of .

exponential smoothing

The exponential smoothing method is a method of forecasting the weighted average of past observations. This method makes the forecasted value of period t+1 equal to the weighted average of the actual observed value of period t and the forecasted value of period t. Exponential smoothing includes primary exponential smoothing, secondary exponential smoothing, etc. An exponential smoothing takes the linear combination of the predicted value and the observed value in a period of time as the predicted value of the t+1 period, and its prediction model is,

F_{t+1}=\alpha Y_{t}+(1-\alpha) F_{t} 

Among them Y_{t}, is the actual observed value in period t, F_{t} is the predicted value in period t, and \alphais the smoothing coefficient.

Forecasting of trend series

Trend prediction is divided into two categories: linear trend and nonlinear trend (the applicable time series does not include periodicity and seasonality)  . If this trend can continue into the future, it can be used for extrapolation prediction.

Linear Trend Forecasting

When the phenomenon develops and changes according to a linear trend, it can be described by the following linear trend equation

\hat{Y}=b_{0}+b_{1}t

where  \hat{Yrepresents Y_{t}the predicted value of the time series.

b_{0}The sum of the two undetermined coefficients in the trend equation b_{1}is usually obtained by the least square method in regression, and the formula is,

 The error of trend prediction can be measured by the estimated standard error in linear regression, and the calculation formula is,

 Where m is the number of unknowns to be determined in the trend equation.

Nonlinear Trend Forecasting

Trends in a series are generally considered to be formed by certain fixed factors acting in the same direction. If these factors change linearly over time, you can fit a trend line to the time series; if there is a nonlinear trend, you need to fit an appropriate trend curve. Several common trend curves are introduced below. 

  • exponential curve

 General natural growth and most economic sequences have an exponential trend, and the trend equation of the exponential curve is,

\check{Y}=b_{0}b_{1}^{t}

Among them b_{0}, b_{1}is the undetermined coefficient.

b_{0}In order to determine the constant sum in the exponential curve  b_{1}, linearization means can be adopted to transform it into a logarithmic straight line form, that is, logarithms at both ends are obtained:

lg\hat{Y}=lgb_{0}+tlgb_{1}

Then according to the principle of the least square method, the  standard equation to solve the sum is as follows lgb_{0},lgb_{1}

After lgb_{0}summing  , the sum is obtained .lgb_{1}b_{0}b_{1}

  • multi-order curve

The changing form of some phenomena is more complex, and there are multiple inflection points in the changing process. At this time, it is necessary to fit a polynomial function. When there is only one inflection point, you can fit a second-order curve, that is, a parabola; when there are two inflection points, you need to fit a third-order curve; when there are k-1 inflection points, you need to fit a k-order curve. The general form of the curve function of order k is

\hat{Y}=b_{0}+b_{1}t+b_{2}t^{2}+\cdots +b_{k}t^{k} 

The coefficients in the function can still be obtained by the method of least squares, only need to linearize the above formula, then it can be obtained by the method of least squares. 

Decomposition Prediction of Composite Sequences 

Composite sequence refers to a sequence that contains trend, season, cycle and random components . Since the analysis of periodic components requires years of data, it is difficult to obtain multi-year data in practice, so periodic components are not considered here . There are many forecasting methods for composite sequences. Here, only the decomposition forecast is considered. This method usually decomposes the various factors of the time series in turn, and then makes predictions. The decomposition forecast model is,

\hat{Y}=T_{t}+S_{t}+I_{t}

When using the decomposition method for forecasting, it is necessary to find out the seasonal component and separate it from the sequence, and then establish a forecasting model before forecasting. Forecasting by decomposition method is usually carried out in the following steps:

    1. Identify and isolate seasonal components.

Determine the seasonal component and calculate the seasonal index, then separate the seasonal component from the time series, that is, divide each observed value of the sequence by the corresponding seasonal index.

     2. Build a forecasting model and make a forecast.

Build a forecasting model from the series after removing the seasonal component. When the sequence after eliminating the seasonal component is a linear trend, it can be predicted by a linear regression model, and when it is a nonlinear model, an appropriate nonlinear model can be used for prediction.

     3. Calculate the final predicted value.

Multiply the predicted value obtained in the second step by the corresponding seasonal index to obtain the final predicted value. 

 

 

Guess you like

Origin blog.csdn.net/weixin_44734502/article/details/127074894