Cash Flow Forecasting using Supervised and Unsupervised Neural Networks Larisa Lokmic and Kate A. Smith School of Business Systems Monash University Clayton, Victoria 3 168 Australia email:
[email protected] Abstract This paper examines the use of neural networks as both a technique for pre-processing data and forecasting cash flow in the daily operations of a financial services company. The problem is to forecast the date when issued cheques will be presented by customers, so that the daily cash flow requirements can be forecast. These forecasts can then be used to ensure that appropriate levels of funds are kept in the company’s bank account to avoid overdraft charges or unnecessary use of investment funds. The company currently employs an ad-hoc manual method for determining cash flow forecasts, and is keen to improve the accuracy of the forecasts. Unsupervised neural networks are used to cluster the cheques into more homogeneous groups prior to supervised neural networks being applied to anive at a forecast for the date each cheque will be presented. Accuracy results are compared to the existing method of the company, together with regression and a heuristic method.
1. INTRODUCTION The company involved in this case study is a leading financial institution that meets the needs of more than one million Australian customers. Their services cover a wide range of superannuation and insurance products, as well as investment and savings products, life insurance plans, preparation of wills and estate-planning services. Most importantly, the company manages funds for individual investors, corporate firms, industries and government sectors, which are currently worth $29 billion (Australian) dollars. Such a diverse range and number of services and clients contribute to a huge number of daily transactions, a great deal of which involve issuing cheques. The company keeps a daily record of cheques issued to its customers, which may range from a very small amount to as much as millions of dollars. There may be as many as a thousand cheques issued in a day. The company has little knowledge about when and which of those cheques the clients will cash in. Hence, there is no accurate method for determining how much money to keep in its bank accounts to meet the demand. The current manual methods used by company prepare presented cheque estimates on an ad-hoc basis. At the end of the day, the estimates are produced manually based on experience of the staff, and are collated and sent off to Bank Administration. Bank Administration further processes the estimates and forwards them to Funds Management. The Funds Management section uses these estimates to derive the cash flow estimates and deposit the required amount of money into the bank account so there is enough to accommodate incoming cash-ins. However, if the company deposits too little money they will incur overdraft charges from the bank, which can be quite considerable given the size of the cheques involved. On the other hand, if too much money is deposited, the company will lose the earnings on the extra money had it been kept in a savings account or invested. The main aim of this paper is to test the feasibility of developing a more accurate model for forecasting the timing of cashing in of cheques. In order to achieve this aim the company’s current cheque forecasting model will be compared with the application of neural networks and traditional statistical forecasting tools. The importance of modelling the problem based on homogeneous data sets will be illustrated by examining the impact of pre-processing the data into groups and clusters prior to modelling. While neural networks have been used successfully on a broad range of forecasting problems (see [ 1, 2, 31 for examples), we have been unable to find any previous research on this problem. 2. DATA The raw data used in the analysis was from a randomly selected, three-month period. The cheque dataset obtained for the analysis comprised 10594 cheques drawn from Is‘ of September to 30’ of November 1998. The original data contained the following cheque information:
343 0-7695-06 19-4/00 $10.00 02000 IEEE
a unique identifier of a cheque, 1. Cheque Number: ......................................................... .................................................................. Cheque value, 2. Amount:............................ ............................. a date on which a cheque was drawn, 3. Date Drawn: ..................... 4. ...................... a post code would indicate the destination of a cheque, 5 . Date Presented:..................... a date on which the cheque was cashed in by the client, 6. Status: ..................... =Presented, R=Reversed (stop payment etc.), W=Unpresented. The presented cheque particulars were extracted from the company’s bank reconciliation system and combined with the drawing details from their cheque drawing systems, Accounts Payable and Payment systems. This data comprised a collection of all reimbursement, superannuation, payroll cheques and others issued to clients. To assist with the investigation of the accuracy of neural networks and other stated methods, the company provided a hard copy of the daily Long Term Reconciliation statements for September and October 1998, which was the forecasted period. These statements contained a section on Presented Cheques (Payments), which showed the details of the presented cheque estimates, the actual presented cheque figures and variance of the two. Also, for the purpose of pre-processing, a hardcopy delivery timetable was acquired from the national postal service, which contained information on the number of days required to deliver a letter from Melbourne where the company is located to any other place in Australia. The table included 4,947 Australian postcodes grouped according to delivery time.
2.1 Data Pre-ProcessingTechniques Descriptive statistics were carried out on the cheque data as shown in Table 1 . For each cheque, the date was transformed into variables to indicate the day, week, and month of the year that the cheque was issued and presented. Computing the life cycle or duration of a cheque was the final action in the pre-processing. Duration is defined as the number of days from the time the cheque is drawn to the time it is cashed in by the customer. The duration was calculated as the difference in days between the Date Drawn and Date Presented. Pre-processing generated seven independent variables that were used in the models. These were: Amount, Postcode, Lookup Days (based on postal delivery information) and Date Drawn (with sub variables: DayOfWeekD, WeekOjMonthD, MonthOjYearD and DayOjYearD). The dependent variables were: Duration and Date Presented (with sub variables: DayOfWeekP, WeekOjMonthP, MonthOjYearP and DayOjYearP).
II DescriDtive statistics I Minimum I Maximum I Median
I Variable: Amount I $0.02 I $32.640.600.00 I, $1.000.00 . , ~
II I I
I
Mean I $20,741.32 Standard Dev I 368,813.16 Table 1: Descriptive statistics based on cheque amount Through an analysis of the company’s forecasting methods, it was noted that there is a risk associated with cheques smaller than $50,000, which tend to have a large variance. These cheques accounted 95.67% of the selected data sample. Currently there is no model used by the company that focuses on these cheques, even though they make up the majority of the transactions. A decision was made to manually separate the data into three groups: Small, Medium and Large. The first contained cheques of less than $50, 000. The Large contained those greater than $1,000,000, while the Medium contained all of the cheques between $50,000 and $1,000 000. Each group was prepared for individual examination, with the major part of the analysis placing an emphasis on cheques valued at or below $50,000.
3. FORECASTING TECHNIQUES Now that the data has been grouped by cheque size, different forecasting methods can be applied within each group to arrive at estimates for the date when each cheque will be presented. These estimates can then be compiled to arrive at a forecast for the funds required for each day. The three major techniques applied to data were neural networks, regression, and a heuristic based on using the average duration of the cheques in the group as the estimate.
3.1 Justification for Grouping Data
344
Initially, we applied regression and neural networks to the whole sample data set. However, both techniques exhibited very poor results on the whole sample data set. The results were measured in terms of R2, the Coefficient of Multiple Determination, which compares the accuracy of the model to the accuracy of a trivial benchmark model where the prediction is a mean of all of the samples. There was little success in applying neural networks or regression to the data set. Multiple R2 gave a result of 0 most of the time indicating that the predictions are less reliable than those calculated by simply finding the average duration of cheques (mean of the sample case output). All neural network parameters were varied during the network training, however the best R2 value that could be produced by the network was equal to 0.0121. The regression analysis was performed on the same set of data using the same variables except that a loglo transformation was applied to Amount to ensure a more normal distribution. The results for regression also produced an R2 close to 0. Such poor results could not lead to any further steps or valid conclusions about the data, until further modelling took place, which involved grouping data according to cheque values. The motivation for data separation was the ambition of finding out whether a particular cheque group exhibits different presenting patterns, and to improve the modelling by considering more homogeneous groups of the data. Once the data had been grouped according to cheque size, all three techniques were applied, but within each group. Separating the data improved the R2 values, however the Small group was still too inhomogeneous. Kohonen's SOFM was applied to separate the data from the Small group into three clusters, in order to see whether the results of the techniques would improve even further. The whole process of data analysis and modelling is illustrated in Figure 1.
/
$5
Figure 1: Techniques Applied in Modelling Data
3.2 Model Parameters The clustering of the Small group was achieved using Kohonen's self-organising feature map [4]with three clusters (neurons). The inputs to the network were: Amount, DayOfWeek, WeekOfMonth, MonthOfYear, DayOfYear and LookupDays. The network completed 10,000 epochs through the data. The remaining network parameters included a learning rate of 0.5 and an initial neighbourhood size of 2. The next step that followed was applying the average duration heuristic and backpropagation neural networks to these three clusters and the two groups: Medium and Large. 20% of the data was randomly reserved for testing. For the neural network, the learning rate was 0.1, initial weights were randomly centred around 0.3, and a momentum factor of 0.1 was selected (these parameters were varied, but did not significantly affect the results). The same six inputs were used, with 20 hidden neurons and a single output neuron. The output for some
345
experiments predicted the duration (in days) until the cheque is presented, while for other experiments it attempted to predict the day in the year the cheque will be presented. 4. RESULTS Within each group or cluster, the R2 values improved due to the increased homogeneity. Table 2 shows the R2 values obtained within each group using both regression and neural networks. For each technique, two models were developed predicting either duration in days (labelled duration) or actual day in the year when the cheque will be presented (labelled D o n . For all cheques in the Large group, the duration was zero days (cheques are collected and cashed immediately), making R2 calculations inapplicable. The results can be further improved when applying Kohonen’s SOFM to the Small group as shown in Table 3. It should be noted that better results can consistently be obtained when attempting to predict the day of the year in which the cheque will be presented, rather than attempting to predict how many days until the cheque will be presented.
Table 2: Results for Groups Clusters within Small group
Cluster 1
Cluster 2
Cluster 3
Size of Cluster (cheques) Average Duration Regression R’ (Duration) Regression R3(DofY) Neural Network R2(Duration) Neural Network R2(DofY)
3098 6.6 0.034 0.466 0.1610 0.5365
3505 8.2 0.015 0.463 0.0341 0.4697
3532 6.23 0.052 ~~0.545 0.0904 0.5601
It is not until we post-process these estimates to compile the cash flow forecasts for each day that the accuracy of each technique can be compared. Since the neural network outperforms regression within each group of data, we will only compare the cash flow forecast accuracy of neural networks and the heuristic method (using average duration of the group or cluster). These results will be compared to those obtained using the company’s existing method for cash flow forecasting. Table 4 presents these results based on a 26 day period falling after the period used for training and testing the techniques. The error is measured as ABS((actual - forecast)/actual).
Table 4 Forecasting Errors Generated by each forecasting method over a 26 day period
346
Looking at the results it is clear that the company’s existing manual method can be improved, since all the other techniques produced smaller errors (using both mean and median error as measures). The variances are similar. However, the interesting thing about the results is that there appears to be no real significant difference in the results between the two neural network methods and the simple heuristic approach (using average days of group). Neural networks have not outperformed the latter method, even though they are a potentially much more powerful technique. These results indicate that the cash forecasting problem, in terms of presented cheques, is not a problem that can be easily modelled. The pre-processing and data grouping strategy has proven to be more effective than the modelling technique in this case.
5. CONCLUSIONS The aim of this study has been to investigate if alternative techniques can help improve the current cash flow forecasts of a financial services company. It has been shown that the current method of forecasting can be improved, but the reason is more because of a pre-processing strategy than the use of sophisticated modelling techniques like neural networks. There are a number of limitations to this study that should be mentioned. Firstly, the number of variables available for the investigation was very limited and the data that was available had some inconsistencies. Information about the client would also have benefited the analysis, so that the patterns of particular clients could have been learned and applied in the modelling. Future research should investigate alternative data grouping structures informed by additional data, which may also improve the accuracy of the modelling techniques used within the data groups. REFERENCES [ l ] Gately, E. (1996), Neural Networks for Financial Forecasting, John Wiley & Sons, New York. [2] Smith, K. A. (1999), Introduction to Neural Networks and Data Mining f o r Business Applications, Eruditions Publishing, Melbourne. [3] Venugopal, V. and Baets, W. (1994), “Neural networks and their applications in marketing management”, Journal of Systems Management, September, pp. 16-21. [4] Kohonen, T. (1 988), Selforganisation and Associative Memory, Springer-Verlag, New York.
347