<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2018.64003</article-id><article-id pub-id-type="publisher-id">JCC-84028</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  The Dynamic Analysis of the Cash Flows on ATM
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Zhengyou</surname><given-names>Wang</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Department of Film and Television Arts, Shanghai Publishing and Printing College, Shanghai, China</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>15902100556@163.com</email></corresp></author-notes><pub-date pub-type="epub"><day>19</day><month>04</month><year>2018</year></pub-date><volume>06</volume><issue>04</issue><fpage>38</fpage><lpage>43</lpage><history><date date-type="received"><day>19,</day>	<month>March</month>	<year>2018</year></date><date date-type="rev-recd"><day>23,</day>	<month>April</month>	<year>2018</year>	</date><date date-type="accepted"><day>26,</day>	<month>April</month>	<year>2018</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Based on the time series of cash flows on ATM, the varying rule of with-drawal is analyzed. The model of autoregression and moving average is established by Matlab and the reliability is checked. According to the model, the cash flows on ATM are forecasted in the coming 10 days. It is important for banks to prepare the cash.
 
</p></abstract><kwd-group><kwd>Cash Flows</kwd><kwd> Autoregression Model</kwd><kwd> Dynamic Analysis</kwd><kwd> Forecast</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>As the pace of life is accelerating, the application of ATM (Automated Teller Machine) becomes wider and wider. Every day, there is considerable amount of cash withdrew through the means of ATMs. Therefore, how to accurately predict the daily ATM cash flows becomes a significant issue for banks in their preparation and allocation of cash. This article, based on the known time series of ATM cash flows, analyzes the varying rules of cash withdrawal amount of ATMs. It builds an autoregressive and moving average model (ARMA) (p, q) via model recognition and parameter estimation. Based on the model, ATM cash flows for the coming 10 days are forecasted.</p><p>The main steps for predicting ATM cash flows by using time series analysis are as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p></sec><sec id="s2"><title>2. Mathematical Model</title><p>Since the observed time series data often contains random interference components, the building of mathematic model for time series will offset the interference to the maximum, so as to focus on the essential characteristics of time series.</p><p>Time series analysis is a fast developing discipline due to its wide range of application, which leaves us enormous mathematic models illustrating time series. Main models include ARIMA (autoregressive integrated moving average model), wavelet model, and neural network model [<xref ref-type="bibr" rid="scirp.84028-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.84028-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.84028-ref3">3</xref>] . However, this article adopts the most typical model and a model applied most widely―the autoregressive moving average model for the illustration of the varying rules of ATM cash flows.</p><sec id="s2_1"><title>2.1. Data Import</title><p>Time series is featured by that the data values vary with time, which means, there is great randomness in values or locations of points for different moments. It is not possible to accurately predict values by historical values. However, the values before and after the moment or the location of data points have certain correlations [<xref ref-type="bibr" rid="scirp.84028-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.84028-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.84028-ref6">6</xref>] . This article adopts Matlab as the tool for modeling and analysis. It imports original data of daily withdrawal of an ATM in the year of 2016, which constitutes the time series to be analyzed and is stored in the system as output column vector { X ( t ) } .</p></sec><sec id="s2_2"><title>2.2. Stationarity Evaluation</title><p>Use Matlab toolbox to analyze the stationarity of time series and employ default ARMA models and relevant parameters provided by Matlab for time series modeling. As shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>, the stationarity of original data is weak.</p><p>By observing the fit of the model, we can find that: the fit of the model is 3.3381. Since the stationarity of the model is relatively weak, the fit of the model is not strong. Therefore, the original data requires stationarity processing.</p></sec><sec id="s2_3"><title>2.3. Data Preprocessing</title><p>In order to better model and predict, data should be firstly subject to stationarity processing. The method adopted is to differencing the data by EXCEL and get a more stationary group of series. Import the processed data into Matlab and we will see <xref ref-type="fig" rid="fig3">Figure 3</xref> in the Matlab toolbox.</p><p>The stationarity of the series curve after stationarity processing is better than the curve of original data, and the fit of the model is also better than the original ones. As shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>, compared with the original time series, the time series after preprocessing offset the trend components of the original time series, which means, the processed one filters out the low frequency part.</p></sec><sec id="s2_4"><title>2.4. Order Determination</title><p>After stationarity processing, it is the stage of order determination, which means, to determine the values of p and q in ARMA (p, q). Since the order determination is different, the consequent fit values of models are different. Hence, the choosing of a proper order is vital for determining the fit between the model and original data and also for the accuracy of data prediction after modeling.</p><p>There are a number of methods for order determination, such as FPE, AIC, BIC and etc. Test in accordance with the following orders which are arranged from low to high orders: ARMA (2, 1) ARMA (1, 1), ARMA (3, 2), ARMA (3, 1), ARMA (2, 2), ARMA (4, 3), ARMA (4, 2), ARMA (4, 1), ARMA (3, 3) and ARMA (4, 4) models. The order is determined through the fit values between the series and models of different orders.</p><p>Comparison of model fit is shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p><p>It is concluded that the model fit of (p = 4, q = 3) is better than the fit chart of other selected orders. Therefore, ARMA (4, 3) is selected.</p><p>And the standard form of the ARMA model is:</p><p>{ 1 − ∑ i = 1 p a i B i } x ( t ) = { 1 − ∑ j = 1 q c j B j } ε (t)</p><p>In which, B is the backward shift operator and ε ( t ) is white noise. This model may be simplified as:</p><p>A ( B ) x ( t ) = C ( B ) x (t)</p><p>The model after order determination is outputted as:</p><p>C ( B ) = 1 − 2.444 B + 2.07 B 2 − 0.6207 B 3</p><p>C ( B ) = 1 − 2.444 B + 2.07 B 2 − 0.6207 B 3</p></sec><sec id="s2_5"><title>2.5. Model Checking</title><p>First evaluate the independency of the model residual, that is, to evaluate whether analyzing residuals have autocorrelation, so as to get the corresponding residual analysis graph <xref ref-type="fig" rid="fig6">Figure 6</xref>.</p><p>In <xref ref-type="fig" rid="fig6">Figure 6</xref>, we can see clearly that the residuals are strictly distributed between −0.1 and 0.1, by which we can conclude that the model residuals have no autocorrelation and the independency of the model residuals are strong. Therefore, this ARMA model is suitable for simulating this time series.</p><p>In addition, difference analysis is conducted and the residual plot is as shown in <xref ref-type="fig" rid="fig7">Figure 7</xref>.</p><p>Besides, by calculation, we can get the average error of 14.12% (Average accuracy is 85.88%), which proves that this model has sound original data for fit and that this model may be employed to predict future values.</p></sec></sec><sec id="s3"><title>3. Predict</title><p>After the model is built, we proceed to the stage of prediction. The adopted principle for prediction is to obtain corresponding estimates through simulation of data by the model and the estimates are the predicted values. The prediction may be easily completed by using Matlab toolbox. This is the predicted cash</p><p>flows of this ATM for the next 10 days. The predicted values for the next 10 days are:</p><p>71.850, 40.116, 52.453, 56.345, 57.699, 62.215, 65.810, 52.470, 44.929, 41.179.</p></sec><sec id="s4"><title>4. Conclusions</title><p>Data analysis is always a popular topic for research, creating various new cross-disciplines. It gathers research findings of various disciplines including machine learning, database, pattern recognition, statistics, AI, management information system and etc., and attracts experts and scholars of different backgrounds to engage in research and development in this area. It is deemed as an important tool bringing huge returns by the business circles. Especially, the utilization of times series research methods in solution and prediction of actual issues are applied in a wide range of areas. It has been transferred from pure theoretical studies to more practical connection, integration and application in the real world and engineering practices. By using the varied types of times series and through analysis and choosing of proper mathematic models, we can predict future occurrence and realize our purpose of understanding of things.</p><p>This article predicts cash flows of an ATM by analyzing the ATM cash flows data and building ARMA models. As we all know, the application of ATM is an integral part of a society of which the life pace is speeding up. Every day, there is a considerable amount of cash withdrew by means of ATMs. Therefore, the accurate prediction of daily cash flow is of great importance for banks and corresponding organizations in preparation and allocation of cash.</p></sec><sec id="s5"><title>Cite this paper</title><p>Wang, Z.Y. (2018) The Dynamic Analysis of the Cash Flows on ATM. Journal of Computer and Communications, 6, 38-43. https://doi.org/10.4236/jcc.2018.64003</p></sec></body><back><ref-list><title>References</title><ref id="scirp.84028-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Tian, Z. (2016) Theories and Methods for Dynamic Data Processing—Time Series Analysis. Northwest University Press, Xi’an.</mixed-citation></ref><ref id="scirp.84028-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Chen, Z.G. (2016) Time Series and Spectrum Analysis. Science Press, Beijing.</mixed-citation></ref><ref id="scirp.84028-ref3"><label>3</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Guo</surname><given-names> G.D. </given-names></name>,<etal>et al</etal>. (<year>2015</year>)<article-title>Data Simplification and Categorization Based on Space Division</article-title><source> Journal of Chinese Computer Systems</source><volume> 23</volume>,<fpage> 456</fpage>-<lpage>459</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.84028-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Ganti, V., Gehrke, J. and Ramakrishnan, R. (2013) DEMO: Mining and Monitoring Evolving Data. IEEE Transactions on Knowledge and Data Engineering, 13, 50-63.  
https://doi.org/10.1109/69.908980</mixed-citation></ref><ref id="scirp.84028-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Zakirr, J. (2014) Scalable Algorithms for Association Mining. IEEE Transactions on Knowledge and Data Engineering, 12, 372-390. https://doi.org/10.1109/69.846291</mixed-citation></ref><ref id="scirp.84028-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Agrawal, R., Faloutscs, C. and Swami, A. (1993) Efficient Similarity Search in Sequence Databases. Proceedings of the 4th International Conference on Foundations of Data Organization and Algorithms, 13-15 October 1993, Chicago, Illinois, 69-84.  
https://doi.org/10.1007/3-540-57301-1_5</mixed-citation></ref></ref-list></back></article>