Time Series Prediction Method of Bank Cash Flow and Simulation Comparison

In order to improve the accuracy of all kinds of information in the cash business and enhance the linkage between cash inventory forecasting and cash management information in the commercial bank, the first moving average prediction method, the second moving average prediction method, the first exponential smoothing prediction and the second exponential smoothing prediction methods are adopted to realize the time series prediction of bank cash flow, respectively. The prediction accuracy of the cash flow time series is improved by optimizing the algorithm parameters. The simulation experiments are carried out on the reality commercial bank’s cash flow data and the predictive performance comparison results show the effectiveness of the proposed methods.


Introduction
In recent years, the time series modeling and prediction have been one of the most active research topics in the academic research and engineering practice [1][2][3][4].The time series is usually a chronological series of observed data (information) according to the time sequence, whose values are sampled at the invariable time intervals.Researchers often predict future changes based on the historical data.For

OPEN ACCESS
example, according to the situation in the past or the current period of the market sales, the changes of stock prices, the population growth and the bank's deposit and withdrawal, the changes of the market sales, the changes of stock prices, the population growth and the bank's deposit and withdrawal in the future are predicted.The time series forecasting affects the life of people everywhere, so it has an important practical significance and research prospects in every field of today's society, which is also an important direction in the computer application field [5][6][7][8].
The bank cash flow forecasting management information system is designed to create a system management platform for the prediction and analysis of the commercial bank cash flow.It will realize the cash flow data statistics summary, the cash flow short-term and long-term prediction, the summary and statistical analysis comprehensively and scientifically of the business information, the operational information and the management information related to the commercial bank cash flow under three levels: secondary branches (Cash Operation Center), branch (Business Library) and Network.Its purpose is to provide effective data all levels of organization to analyze and assess cash business operation conditions.Also it will provide effective system management means for the cash operation managers and decision-making people at all levels.
Aiming at the existed problem in the analysis of commercial bank cash flow, four time series prediction methods are used to set up the prediction models.The simulation results show the effectiveness of the proposed methods.The paper is organized as follows.In Section 2, the time series prediction methods of bank cash flow are introduced.The simulation experiments and results analysis are introduced in details in Section 3. Finally, the conclusion illustrates the last part.

Time Series Prediction Methods of Bank Cash Flow
The time series prediction method analyzes the predicted target's changes with the time on the times series composed of the historical data according to the chronological order.The prediction method is quantitative and the related mathematical model is established for extrapolation [9][10][11][12][13][14][15].Based on the circulation data of bank cash, four prediction methods of the various cash operating specific modules are designed for providing the decision-making basis of the business plan in commercial bank.The flowchart of the time series prediction methods of bank cash flow is shown in Figure 1.The simulation environment is described as follows: Windows 7 operating system, Intel processor (2.5 GHz, 4G memory) and Matlab 2010 simulation software.

The First Moving Average Predictive Method
The moving average method is a predictive technique developed on the basis of the arithmetic average.The arithmetic average method can only reflect the average of a set of data and cannot reflect the change trend of the data.However, the basic idea of the moving average method is item by item based on time series data by taking a certain number of cycles of data to be averaged every time, successive advancing in chronological order.In each propulsion cycle, the forward cycle data is rejected, a new cycle data is added and the average value is calculated [16].Set Xt is the actual value of the cycle t.The first moving average value is calculated by the following equation.
So the predictive value of the next period (t + 1) is: where N is the number of selected data for calculating the first moving average value and 1 ˆt X  is the predictive value of the next period (t + 1).Based on the collected data in a commercial bank from January to April in 2011and 2012, the first moving average method is adopted to realize the time series prediction of bank cash flow.The cycle number of the moving average in 2011 is 2-15 and the continuous sample points are 100.The optimal moving average value for the selected data is N = 6 and the simulation results are shown in Figure 2. The cycle number of the moving average in 2012 is 2-15 and the continuous sample points are 100.The optimal moving average value for the selected data is N = 2 and the simulation results are shown in Figure 3.
It can be seen from Figures 2 and 3 that the random fluctuations of bank actual cash flow values is larger, but the random fluctuations are reduced significantly after the first moving average calculations.The more used months by calculating the average, that is to say the greater N, the stronger of the smoothing degree and the more small fluctuation.However, in this case, the reaction velocity on this change trend for the actual data is slower.Conversely, if N is set lower, the reaction velocity on this change trend for the actual data is more sensitive, but the smoothing degree is less and it is easy to reflect the random interference as the trend.Therefore, the choice of N is very important, which should be selected according to the specific situation.
When N is equal to the cycle of change, the influence of periodic change can be eliminated.In practice, the mean square error S of prediction for past data is generally adopted to be the criterion for choosing N.However, because of the accumulation of errors, the predictive error is bigger for the prediction of more distant periods.Therefore, the first moving average method is usually adapted to the stationary model and only a period prediction (i.e., predicting the t + 1 period).So when the basic mode of predicted variables changes, the adaptability of the first moving average method will be relatively poor.

The Second Moving Average Predictive Method
The second moving average method is to carry out the moving average again based on the first moving average method, that is to say the prediction model is established on the basis of the first moving average values and the second moving average values to calculate the predicted value.As mentioned above, the average value calculated by the first moving average method has a lag deviation.Especially when there is a linear trend in the time series data, the first moving average value is always behind the observation value.The second moving average method is proposed to revise this lag deviation by establishing the mathematical model having the linear time relationship of the predictive target to obtain the predictive values.
The second moving average predictive method can solve the contradiction of the predicted value lagging behind the actual observed values, which are suitable for forecasting the time series with the phenomenon having the obvious change trend.At the same time, it also retains the advantage of the first moving average method.Set Mt (2) is the second moving average value in period t, Yt is the actual value of the cycle t.The second moving average method is described as follows.
where Mt (1) is the first moving average value in period t, Mt (2) is the second moving average value in period t, n is the number of selected data for calculating the first moving average value.
In order to eliminate the influence of lag error on the prediction results, the linear trend model with the hysteresis error rule on the basis of the first and second moving average values is established.Mt (1)  and Mt (2) are used to estimate the intercept and slope of the linear trend model.The calculation formulas are described as follows. (1) ( 2 ) ˆ2 2 ˆ( ) 1 Then the linear trend prediction model is established as: where t is the current period, τ is from t to forecast period number, ˆt y   is predictive value in period t + τ, ˆt a is the estimated value of the intercept, ˆt b is the estimated value of the slope.In order to carry out the research on the second moving average method for predicting the bank cash flow time series, the same data in the first moving average method are adopted.The cycle number of the moving average in 2011 and 2012 is 2-15 and the optimal moving average value for the selected data is N = 3.The simulation results are shown in Figures 4 and 5.It can be seen from Figures 4 and 5 that the predicted effect of the second moving average method is better than the first moving average method.So it is more suitable for the prediction the time series with linear trend changes.

The First Exponential Smoothing Prediction Method
The exponential smoothing method is a time sequence analysis prediction method developed from the moving average method.By calculating the exponential smoothing value, the future of phenomenon In order to carry out the research on first exponential smoothing prediction method for predicting the bank cash flow time series, the same data in the above two methods are adopted.When the weight coefficient is 0.9, the mean square error is minimum and the simulation results are shown in Figures 6 and 7.It can be seen from Figures 6 and 7 that the first exponential smoothing model prediction method need to find the best value α through the repeated experiments.However, even with a best value α, the accuracy of predicted results also is not ideal for the time series with larger trend.

The Second Exponential Smoothing Prediction Method
Because the first moving average method and second linear moving average method all need store a large amount of historical data, in order to compensate for this limitation, the second linear exponential smoothing model is developed, which only need to use three data values and a smoothing coefficient α.At the same time, it also can make the weight of past observations small.In most cases, the use of second linear exponential smoothing model is more convenient.
The second exponential smoothing prediction method is to carry out another exponential smoothing based on the first exponential smoothing prediction method, which has the advantages of simple calculation, less sample requirement, strong adaptability and the relatively stable predicted results.It cannot predict lonely and must cooperate with the first exponential smoothing prediction method to build the time series predictive mathematical model.The weighted average of historical data is as the predicted value of future time.The second exponential smoothing prediction method is described as follows. (1) (1) where, St (1) is the first exponential smoothing value in period t, St (2) is the second exponential smoothing value in period t and α is the smoothing constant.So the prediction model of the second exponential smoothing method is described as follows. 2 ( 1 a)(S S ) where Ft + T is the predictive value in period t + T, T is the number of the future forecast period, at and bt are the model parameters.Equation ( 15) is used to add the difference between the first exponential smoothing value and the second exponential smoothing value on the first exponential smoothing value.Equation ( 16) is adopted to add the trend change value.When predicting the period t + 1, a trend change value bt is added to the at.When predicting the period t + T, the trend change value T × bt is added to the at.
In order to carry out the research on the second exponential smoothing prediction method for predicting the bank cash flow time series, the same data in the above three methods are adopted.When the weight coefficient is 0.5, the mean square error is minimum and the simulation results are shown in Figures 8 and 9.
It can be seen from Figures 8 and 9 that because the second exponential smoothing method considers the linear parameter changes in different periods of the time series, the extent of the predicted values fitting with the original time series is very good, which reflects the variation trends of the original time series in different time periods.So it is more suitable for the prediction of time series with a linear trend.

Simulation Comparison
In order to carry out the performance comparison under the above mentioned four time series predictive methods for bank cash flow, the simulation curves are shown in Figure 10.It can be seen clearly that the predicted results of the second exponential smoothing method is better than other methods.The prediction error is the deviation between the predicted results and the actual results, which determines the prediction accuracy.The accuracy of the quantitative prediction methods has a lot of measurable indicators.Suppose y1, y2,…, yn are the actual observed values of the predicted target and where  t a is the relative error at the point t, which is usually expressed as a percentage and measures the accuracy of the predicted values relative to the observed value at the predicted point t.
Prediction accuracy of the prediction points where At is the prediction accuracy at the prediction point t.

Mean square error (MSE)
Mean square error (MSE) is a kind of convenient method to measure the average error to evaluate the degree of data change, which is described as follows.Four mentioned methods are used to carry out the simulation on the same pretreated experimental.The simulation results are shown in Table 1.The performance comparison results in Table 1 also showed that the second exponential smoothing method obtains the higher prediction precision of the cash flow time series.

Conclusions
Four time series predictive methods are adopted to realize the real-time prediction of cash flow in the commercial bank.By comparing the time series predictive performance under four algorithms and analyzing the simulation results in-depth, the second exponential smoothing prediction method is the optimal prediction method.

Figure 1 .
Figure 1.Flowchart of the time series prediction methods of bank cash flow.

Figure 2 .
Figure 2. Predictive results of the first moving average method in 2011.

Figure 3 .
Figure 3. Predictive results of the first moving average method in 2012.

Figure 4 .
Figure 4. Predictive results of the second moving average method in 2011.

Figure 5 .
Figure 5. Predictive results of the second moving average method in 2012.

Figure 6 .
Figure 6.Predictive results of the first exponential smoothing prediction method in 2011.

Figure 7 .
Figure 7. Predictive results of the first exponential smoothing prediction method in 2012.

Figure 8 .
Figure 8. Predictive results of the second exponential smoothing method in 2011.

Figure 9 .
Figure 9. Predictive results of the second exponential smoothing method in 2012.
Obviously, at is the most direct measure index of prediction error, but it is affected by the measurement unit of predicted object.So it is unsuitable as the final measure indicator of prediction accuracy.
where at is the absolute error at the point t.

Table 1 .
Performance comparison results.