The Performance Characterization of Discrete Kalman Filter under the First Order Autoregressive Demands

The accuracy of forecasting is important to the performance of supply chain systems. This research focuses on the demand which is stationary. Since Box-Jenkin’s first order autoregressive model or AR (1) is widely used to characterize the stationarity, the data in this research is simulated on the basis of the AR (1) model. Moreover, because Kalman filter is a recursive technique used to forecast the observation, the objective is to facilitate the utilization of Kalman filter by practitioners. The empirical study is conducted to characterize the performance of Kalman filter when the structure of observations follows AR (1) model. Due to the experimental results, the different degrees of stationarity are adjusted by controlling the values of autoregressive coefficients (). Afterwards, Kalman filter is applied to forecast the simulated data while the forecasting errors in term of minimum average percentage error (MAPE) are calculated. The results indicate that Kalman filter might work at its best when the autoregressive coefficient is highly positive. After the assessment, the application of Kalman filter to AR (1) observations is completely standardized so it provides the procedures and guidelines for practitioners when dealing with the stationary process.


Introduction
The precision of demand forecasting is important to the performance of supply chain systems.There are many forecasting methods used for demand prediction.A criterion to select the appropriate technique depends on the stationarity of data, stationary and non-stationary.Box Jenkin's autoregressive integrated moving average (ARIMA) is widely used to explain the stationarity structure of data.A subclass of ARIMA, first order autoregressive (AR (1)) model, is utilized to explain stationary observations.However, since there are noises or disturbances embedded in the process, it is hard to apply a specific forecasting technique which is able to handle all the fluctuation in the observations.As a result, Kalman filter, a recursive estimating technique commonly used in the digital signal processing area, is introduced for the estimation because of its advantage, the adaptive capability.Elaborately, a correction step is added to the existing estimates to improve the prediction result.Moreover, there are many applications for Kalman filter in different disciplines, e.g., forecasting power demand and economically related demands.Examples are shown in the works of Inglesi-Lotz (1) and Arisoy and Ozturk (2) .They utilized Kalman filter to improve the estimation of the future electricity demand.Moreover, Kalman filter is also applied to improve the demand estimation for supply chain systems.Gursoy and Erkip (3) reported that Kalman filter was also used effectively for multivariate forecasting when demand was correlated.The market prices of products were also smoothed and forecasted when Kalman filter was applied to the selling price.Therefore, Kalman filter was used for the whole process of supply chain including procurement, inventory and production.Moreover, Sun and Deng (4) used Kalman technique to forecast the oil demand in China while the same method was deployed to estimate the water demand by Nasseri, Moeini and Tabesh (5) .
Chaolong et al. (6) had utilized Kalman filter method to predict short-term changing trend and irregularity occurred in time series.For financial application, Huang et al. (7) had integrated Kalman filter with support vector machine method to forecast the option price in Taiwan future exchange while Vo (8) applied Kalman filter to predict the interest rate with risk-free condition and with risk premium.Kalman filter was also extensively used to the environmental area, e.g., forecasting air quality (Ridder et al. (9) ) and wind speed (Cassola and Burlando (10) ), Therefore, Kalman filter is successively applied to improve the forecasting capability but the research framework is limited for the case-by-case basis only.There are only few works applying Kalman filter to the standardized stationary model, i.e., AR (1).Brouste and Kleptsyna (11) had analyzed the performance of Kalman filter when the observations are d-dimensional autoregressive noises which were simulated by following the pattern of the first order autoregressive, AR (1), and the first order moving average, MA (1), models.Wang (12) had developed R package to fit continuous autoregressive model of order p with unequally sampled time series.The coefficients of AR model were calculated by using Kalman filter algorithm.Ferreira, Rodriguez and Lagos (13) deployed Kalman filter and Monte Carlo simulation to estimate the parameters of a non-stationary model.According to the literature, since there are some limitations regarding the performance assessment of Kalman filter, it is interesting to characterize the capability of Kalman filter under the stationary scenario which is based on the AR(1) model.The empirical study is conducted by adjusting the value of AR parameters and Kalman filter is implemented to forecast the simulated observations.Hence, there are standardized guidelines for implementing this technique when practitioners have to deal with the demand forecasting.

Methodology
Kalman filter is a mathematical algorithm developed by R. E. Kalman in 1960s and it is widely used in time series analysis.The basic concept of Kalman filter is built upon observations measured over time.Since these measurements contain random noises, they are utilized to predict the value of unknown variable.Moreover, the result is proved to be more accurate than the one from a single measurement.Kalman filter is mainly based on the following two models, process or plant model and measurement model in ( 1) and ( 2),   =  −1 + (1) , where x k and x k-1 are observations at time k and k-1, A is a transition matrix, w k and  k are process noise and measurement noise.
Afterwards, a recursive process is utilized on the estimation of noise parameters (mean and standard deviation of noise).This process is based on two stages, time update (prediction) and measurement update (correction), at a time.Time update equations are shown in (3) as follows: The purpose of ( 3) is to project the value of the forecast for the state ahead (k) along with (4) which is used to project the error covariance, , where Q is the process noise covariance.
Next, Kalman gain for the state ahead (K k ) is computed as a multiplicative factor to assist in improving the predicted value as shown in (5).
, where R is the measurement noise covariance.
When the actual value at the next state (x k ) is observed, it will be utilized to update the measurement as shown in (6).
The model widely used to represent stationary processes is the first order autoregressive, AR (1) or ARIMA (1, 0, 0), which is a subclass of Box-Jenkin's autoregressive integrated moving average (ARIMA) model.The equation of AR (1) is shown in (8),   =  −1 +   (8)   , where  is autoregressive coefficient,  k is white noise at time k.
According to (8), AR ( 1) is a linear model with white noise and has the same pattern as (1) where A =  and w k =  k .Therefore, AR (1) model is utilized to simulate demand processes in this study.Based on AR (1) process, Kalman filter is applied to compute the following equations as shown in ( 9) and (10).
Substitute   − into (5), then Therefore, the updated forecasting value is equal to and the updated error covariance is The estimation process of Kalman filter is shown in  .

Simulation Study
The empirical study was conducted to assess the performance of Kalman filter algorithm utilized to forecast the stationary processes which are based on the AR (1) model.For each value of AR coefficient (), a number of 10,000 iterations of AR (1) processes are simulated while the average forecasting errors are calculated to indicate the performance of Kalman filter when the observations are correlated with the pattern of AR (1) model.The process was simulated at  = 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.9 while the length of simulation period was 80 weeks.For the simulation, the initial conditions of input parameters were set as follows: A =  H = 1 B = 0 Q = 10 R = 10 w k = 10 and 50  k = 0. To execute the simulation, M-file code was programmed and run on Matlab.After the simulation, the average values of MAPEs were calculated so the performance of Kalman filter at each degree of  was asessed.

Empirical Results
After the stationary data of AR (1) pattern was simulated, Kalman filter was applied to forecast the observations.Numerically, the forecast errors in term of average MAPE for the different values of  were computed and shown in Table 1.

Fig. 1
Fig. 1 which illustrates two important steps of the recursive, correction (measurement update) and prediction (time update), respectively.When i is equal to k-1, the observation at a period behind (k-2) is used to derive the estimation at i = k-1 ( ̂−1 − ).Afterwards, the forecast is updated by the measurement update process, the corrected estimation is improved to be  ̂−1 .
increasing.On the other hand, the relationship between errors and  is inversely proportional.To demonstrate the performance of Kalman filter graphically, the observations and forecasts at each  (when w k = 10) are randomly selected and shown in Fig.2-10.