A Fuzzy Statistical Expert System for Cash Flow Analysis and Management under Uncertainty

We live in the world of ambiguity and uncertainty. In such a fuzzy world, using tools that are close to natural language and have the ability to conclude like human mind, and even deal with more data and complex relations are important. This paper provides a fuzzy statistical expert system for cash flow management, one of the most important issues in business. It helps managers in managing their organizational cash resources. For this purpose, first input and output variables and their membership functions have been defined. Then, we formed rules using fuzzy inference system to infer ending cash balance from a set of combination of 25 separate rules. Finally, linguistic levels converted to certain numbers by centered method (defuzzification) to help managers to see the effects of changes in the levels of inputs on ending cash balances. defuzzification represents the relationship between the variables with numerical values. The required data for practical illustration of our mode is gathered from Cement Companies listed on Tehran Stock Exchange, which their financial reports are prepared based on Iranian Accounting Standards. The authors believe that the proposed system helps managers to analyze the effects of changes in input variables on ending cash balances.


Introduction
The importance of cash flows for business units is of no doubt. Cash is the ideal in the business world, which business cycle starts with and ends to it. There is no need to talk about the importance and effectiveness of cash and its features. So, if it is possible to provide a situation that analysis and control this essential business resource is better off, then the business unit may achieve its goals more conveniently.
Statement of cash flows in financial reports is one of the main data resources of cash. It illustrates how it was generated and spent by firms. For instance, it shows how much cash was generated by operational activates and how much of it was used for loans repayments, dividends and reinvestments.
Released information related to cash inflow and outflow in a given period helps stakeholders to have a proper evaluation about risk, insolvency, financial flexibility and profit quality of the firm. Moreover, cash availability provides opportunity for economic benefits. To have a proper evaluation of business threats and opportunities, along with precise assessment of management stewardship function, it is required to have a good understanding of nature of a business; including its way of cash generation and usage (Iranian Accounting Standards, 2007).
Forecast future using past experiences, desirability that evermore been undeniable for anyone, but the future is always accompanied by uncertainty. As Yuan (2009) states "when market fluctuations cannot be predicted with certainty, managers have to make decisions under condition of uncertainty. Under these conditions, decisions to make or not are often based on managers' human intuitions, common sense and experience, rather than on the availability of clear, concise and accurate data". In this condition to help for decision making matter, statistic science can used to representation the phenomenon occurrence probability that helps to decide the issues in different fields. Although the literature provides some probabilistic and stochastic models for analyzing uncertainties, but because of some reasons such as their complexity and/or expensiveness especially for SMEs, some managers do not use them in practice (Yuan, 2009). Furthermore, as Maloo (1991) states, prevalent stochastic and simulation models are restrictive in application because they are based on some unrealistic assumptions. Therefore, managers need a practical and simplified method that could minimize these complexities and that requires minimal resources in solving problems under uncertainty condition.  (Lukasiewicz, 1970). Yuan (2009) suggests that for managers to be successful in planning and control, they have to identify all the interrelationships between. In order to identify these relationships, managers first should focus on the realization that helps creating maximum cash for business purposes. Thus, a technique that can provide a reliable range of estimates of flow's for planning purposes, thereby minimize the differences between the planned and actual results should be seriously considered.
Under uncertainty, one's thinking process contains fuzzy factors because he/she usually thinks in imprecise terms (Black, 1937). Then for representing real situations, we have to incorporate such fuzziness (Yuan, 2009).
A Fuzzy Expert System (FES) is able to formulate imprecise information by incorporating knowledge in such a way that is represented in the human mind. In fact, utilizing FES improves cognitive modeling of a problem (Akhter, Hobbs, & Maamar, 2005;Cox, 1994). In addition, resent advances in IT increased successes of Artificial Intelligence (AI) reports. This let to use of knowledge-based systems for solving various decision making problems in business and management (Salo et al, 1992).
FL leads to a new intelligent system that is similar to the human understanding process. This paper shows how use of fuzzy concept can be useful in the analysis and management of cash flows. Then, we apply a set of mathematical techniques to adopt a FL approach for easy analysis of the relationship between the variables affecting the uncertain decisions. Fuzzy mathematics that are based on approximate reasoning was applied because they are very close to system of human nature. For the implementation of the FL, Toolbox software technical math "Matlab" has been used. As Zadeh suggests, most of problems that we face are under uncertainty and ambiguity and we can do a better job in accepting some level of imprecision (Timothy, 2004).
FL is simple way to achieve certain results based on input vague and imprecise information and fuzzy theory decrease need to precision data in the decisions. FL is imitation of a human mind, but with much higher speed and precision. FL models create based on decision makers' experiences.
Since information systems are rigid, they are inconsistent whit human thought; they consequently cannot satisfy managers' information needs with high efficiency. In order to create efficiency and effectiveness and make the system more intelligent and compatible with the human thought, it is required to design our systems based on FL and/or neural network.
There are several cases in literature to show FL framework power and ability in solving various problems of humans in the real world. For example, Bertrand Russell's (1923) states "All traditional logic habitually assumes that precise symbols are being employed. It is therefore not applicable to this terrestrial life, but only to an imagined celestial existence". Also Kosko (1993) implies to Heisenberg quantum uncertainty principle. In the financial and accounting perspective, Water believes that accountants usually are in a position that should be responsive for many demands, while some of these demands are in vague. In many areas of accounting due to undefined and imprecision terms face with a lot of confusion. Many of these ambiguities are human emotions and linguistic variable's (Zariffard, 1997).
Review of the literature clears that in recent years, using FL is rapidly increasing in all area of decision making especially in the economic, business and accounting. Using this technique is very promising when we face to uncertainty (Klir, 1987). The purpose of this paper is to utilize FL to analysis and management of cash flows.

Review of Literature
A huge number or researches have been implemented on cash flow management. In this section, we review some researches on cash flow forecasting models used of fuzzy sets and systems, expert based methodologies, artificial intelligent systems, neural network and genetic algorithm and so on.
Weber-Lee et al. (1996) propose a system that builds a fuzzy cash flow from the outcome of a Case-Based Reasoning (CBR) system. The CBR system suggests a set of estimated values, appraising cash flow accounts. The system selects the values that better represent the given set using MTV approach, automatically creating Most Typical Fuzzy Sets describing values such as "around $500.00". The content of the fuzzy cash flow consists of actual numbers, stated values and fuzzy constraints. The actual and stated values are combined with the fuzzy constraints with the purpose of building fuzzy cash flows to support financial decision making.
Boussabaine and Kaka (1998) employed a neural network in cash flow forecasting and control in order to overcome the inability of prevalent models based on the regression technique to perform multi-attributes nonlinear mapping. Carlsson (1999) applies fuzzy cash flows for Capital budgeting. Boussabaine and Elhag (1999) Applying fuzzy techniques to cash flow analysis. Boussabaine and Elhag (1999) used a fuzzy technique that increased the effectiveness of cash flow analysis conducted under conditions in which cash flow at particular valuation stages is uncertain. Kuo et al (2001) provides an intelligent stock trading decision support system through integration of genetic algorithm based fuzzy neural network and artificial neural network. Ko (2002) and Cheng (2006) propose a different method of firm valuation based on fuzzy logic and expert systems. Their method takes explicit account of quantitative and qualitative variables and their mutual integration. Financial, strategic and business aspects are considered by focusing on 29 value drivers that are combined together via "if-then" rules. The output of the system is a real number in the interval [0, 1], which represents the value-creation power of the firm. To corroborate the model a sensitivity analysis is conducted. The system may be used for rating and ranking firms as well as for assessing the impact of managers' decisions on value creation and as a tool of corporate governance.
Magni (2007) applies fuzzy expert systems to rate and rank firms. They extend the classical discounted cash flow (DCF) model by developing a fuzzy logic system that takes vague cash flow and imprecise discount rate into account Wang (2002Wang ( , 2003 tries to predict stock price using fuzzy set system. Various methods and approaches that use traditional statistical methods or AI techniques have been developed to deal with time series problems as well as to forecast and control cash flow. Sapankevych and Sankar (2009) found time series analysis methods including Kalman filters, artificial neural networks (ANNs) and support vector machines (SVMs) have been applied in various fields. They also found that the most important current application of time series analysis is in financial forecasting.
The ability of project managers to make reliable cash flow predictions enhances project cost flow control and management. During project implementation, cash flow is the most critical factor affecting profitability (Hwee and Tiong, 2002). Kenley and Wilson (1986) introduce a construction project cash flow model using an idiographic approach. Kaka and Price (1991) make some discussion on the reliability of net cash flow models. Park et al. (2005) proposed a cash flow forecasting model for construction projects that considered both variable cost weights and time lag. Based on their findings, this model asserted that most previous models developed to predict cash flow addressed realities current in the planning phase, but not necessarily in the construction phase, where uncertain factors can impact upon costs, resource allocations, and timelines. Liu (2006) provides an evolutionary fuzzy neural Inference model for the prediction of cash flow for construction projects. In addition, Khosrowshahi and Kaka (2007) develop a decision support model for construction cash flow management.
The complex, mutable nature of construction projects currently requires significant reliance on experience and expert opinions to predict cash flow on an ongoing basis. Recent studies have indicated good potential for using artificial intelligence (AI) to reduce reliance on human input in cash flow prediction processes. Cheng and Roy (2011) developed an Evolutionary Fuzzy Support Vector Machine Inference Model for Time Series Data (EFSIMT), an AI hybrid system focusing on the management of time series data characteristics which fuses fuzzy logic (FL), weighted support vector machines (weighted SVMs) and a fast messy genetic algorithm (fmGA), represents a promising alternative approach to predicting cash flow. Simulations performed on historical cash flow data demonstrate the EFSIMT is an effective tool for predicting cash flow.
This paper is about cash flow, one of the most important issues in accounting and finance area. It tries to help managers to manage their cash resources in their business cycle more efficiently using Fuzzy Statistical Expert System. For this purpose, first, input and output variables and their membership functions have been defined. Then, we formed ending cash balance rules using fuzzy inference system to infer ending cash balance from a set of combination of 25 separate rules. The rules made from the beginning cash balance and cash flows from five following sources: operating activities return on investment & financing, income tax, investment activities, and from financing activities & adjusted the exchange rate. Final step was defuzzification or converting linguistic levels to certain numbers by centered method to help managers to see the effects of changes in the levels of inputs on the output variables, ending cash balances. In fact, it represents the relationship between the variables with numerical values. Required data for practical illustration of our modeling is gathered from Cement Companies listed on Tehran Stock Exchange (TSE), which their financial reports are prepared based on Iranian Accounting Standards. The authors believe that the proposed system helps managers to analyze the effects of changes in input variables on ending cash balances.

Data and Methodology
According to accounting standards in Iran (2007), cash flow statements should represent cash flows for a given period under the five following main categories; 1) operational activities cash flow, 2) return of investment and financing cash flows, 3) income tax cash flows, 4) investment activities cash flows, and 5) financing activities cash flows. This standard also considers two other sub-categories (beginning cash balance and cash flow for exchange rate adjustment) within the main categories in order to calculate ending cash balance.
According to accounting standards in Iran, ending cash balance in cash flow statements can be calculated by Equation (1): ECB = BCB + OCF + RIFCF + TCF + ICF + FCF + ARC (1) Where ECB, BCB, OCF, RIFCF, TCF, ICF, FCF, and ARC denote ending cash balance, beginning cash balance, operational cash flow from operating activities, return of investment and financing cash flow, cash flow from income tax, cash flow from investment activities, cash flow from financing activities, and cash for adjustment of exchange rate, respectively.
Generally, companies have not accurate information about all components of cash flows statement, particularly about cash flows from future operational activities. In this case, managers usually determine the values based on experiences. Because of lack of information about the future, they may predict the cash flows by intervals (imprecise information) and membership functions. Tables  1 and 2 show the membership functions of input and output variables. Since the variables are determined mentally, the results obtain under uncertainty and they have different effects on the cash flows. For example, the levels of input variables in linguistic form are low, medium and high, while the output variable levels with more sensitivity are very low, low, medium, high and very high.   4,1967. Its capital worth 300 bill IRR with issued shares 300.000.000 and 253 staff. TSE mission is launching a fair, efficient and transparent market equipped with diversified instruments and easy access to create added value for the stakeholders. Its objectives are as follows: 1. Increasing the share of capital market in financing the economic productive activities 2. Applying effective rules and procedures to protect the market's integrity and shareholders' rights 3. Expanding market with the use of updated and efficient technology and processes 4. Developing financial knowledge and improving investment and shareholding culture in Iran 5. Facilitating market access by means of information technology 6. Observing accountability and transparency in cooperation with the stakeholders 7. Constant expansion of the company's intellectual properties and human resources This paper attempts to show how to analysis and manage cash using an expert system that is based on FL. This way is not general rather we want to show the practical use of FES in a real world problem based on scientific principles that have high tolerability under uncertainty. We utilized FES because our linguistic variables with non-crisp information are consistent with the imprecise nature, traditional quantitative analyses did not address the issue of such imprecision, and because the concept of fuzzy set lets mathematical operations on this imprecise information or knowledge (AbouRizk & Sawhney, 1993).
In this study, fuzzy set membership functions are used to represent the imprecise values related to cash flows. Cash flow from operating activities levels, OCF are represented by fuzzy sets defined by Equation (2): where OCFi is universe fuzzy subset of cash flow from operating activities levels; i is an indicator of cash flow from operating activities level, i = 1, 2, 3, representing low, moderate, and high, respectively. Similarly the BCB, RIFCF, TCF, ICF and FCF are also divided into three levels (low, moderate, and high) and ARC takes two levels (low and high). Ending cash balance will have five fuzzy subsets (very low, low, moderate, high, and very high).
Membership functions can also be designated graphically. Sales managers used membership functions to determine variables' levels in the fuzzy sets (Figs 1 to 8 Thus, the membership value (or the degree of belonging to the set) for low and moderate levels of operating cash flows is 0 but for the middle level it takes 1.       Anderson (1993) believes that the thought and the human mind can be in the form stated rules and laws (Anderson, 1993). Before the development of FES, we need to create Fuzzy Rules (FRs). Total number of rules depends on the collections of restrictions. Therefore fuzzy rules to determine the number of levels, ending cash balance of these cases could be conclusion: beginning cash balancing (three levels), cash flow from operating activities (three levels), cash flow from return from investment & financing (three levels), cash flow from income tax (three levels), cash flow from investment activities (three levels), cash flow from financing activities (three levels) and adjusted the exchange rate (two levels) that results from a combination of 25 separate rules is formed (See Table 3). We know that natural language about logical disjunction is "or" term and natural language about logical conjunction is "and". Also, logical symbols about them are "v "and "^" use, respectively. With a brief reflection that can be interpret (pvq) to (p + q) and (p^q) to (p.q) in mathematics (numbers based on 2). The rules describing the basis for a given ending cash balance level were based on the degrees of input variables. From Table 3

Fuzzy Expert System
An Expert System (ES) is a program makes available some of the skills of an expert to non-experts by imitating expert's thinking patterns (Siler & Bukley, 2005). ES is the most common type of Artificial Intelligence (AI). According to Trippi and Turban (1990), ES is software package which can be with access knowledge to achieve a person expert ability at decision making (Trippi & Turban, 1990). Fuzzy Expert Systems (FES) is an ES that utilizes Fuzzy Set or FL (Kandel, 1991). As shown in Fig.9, to take advantage of FES, an inference diagram is used to explain the processes involved.  middle  middle  12   middle  low  low  high  middle  high  middle  middle  13   low  low  high  middle  middle  low  middle  middle  14   middle  low  middle  middle  high  high  low  middle  15   low  low  low  high  middle  high  low  middle  16   low  low  high  middle  low  middle  low  middle  17   high  low  middle  low  high  middle  high  low  18   Very high  low  low  high  middle  middle  high  low  19   high  low  high  low  middle  middle  high  low  20   Very low  low  middle  low  middle  high  middle  low  21   Very low  low  low  high  high  high  low  low  22   low  low  low  high  middle  high  low  low  23   high  low  high  middle  high  middle  low  low  24 Very low low middle high low low low low 25 To determine the levels of ending cash balance, we have to use of beginning cash balance, cash flows from operating activities, from return of investment, from financing, from tax income, from investment activities, from financing activities and from adjustment exchange rate. This value converts from the numerical values to descriptive or linguistic level (Fuzzification). Utilizing the laws of logic and the Mamdani inference method, the output (ending cash balance) will be calculated. After getting all the outputs, the process was carried about linguistic amounts of cash convert to numerical values that this process is call defuzzification (Fig. 31). Table 3 explains formation of ending cash balance rules.

Fuzzy Inference System
Fuzzy Inference System (FIS) includes the formulation steps of mapping from a given input to an output using FL. It provides a base for decisions or patterns discerned and involves all elements: membership functions, FL operators, and if-then rules (Mathworks Inc, 2000). FIS are associated with a number of names, such as fuzzy-rule-based systems, fuzzy expert systems, fuzzy modeling, fuzzy associative memory, FL controllers, and simply (and ambiguously) fuzzy systems and broadly applied in several multidisciplinary fields such as automatic control, data classification, decision analysis, expert systems, and computer vision.
Two types of FIS in the FL Toolbox are Mamdani-type and Sugeno-type. They are different in terms of determination of outputs. Mamdani's FIS is the most common fuzzy methodology. It was introduced in 1975 by Ebrahim Mamdani and was among the first control systems developed based on fuzzy set theory. Mamdani's FIS was based on Lotfi Zadeh's 1973 paper. It suppose that the output membership functions are in fuzzy sets (Mathworks inc, 2000).
Takagi-Sugeno-Kang FIS first introduced in 1985. It is similar to the Mamdani FIS in many aspects. The main difference between Mamdani FIS and Sugeno FIS is that the output membership functions are only linear or constant for Sugeno FIS (Mathworks inc, 2000).
In this paper we applied Mamdani FIS because our output variables are not fixed and in linear form.

Analysis of Ending Cash Balance in Connection with the Constituent Factors
As previously mentioned, cash is a main and very important source for the business units. A business unit managers and executives to achieve favorite goals must have appropriate understand of this source flows and the factors affects on it. If they want to know the impacts of various factors on each level of ending cash balance, it is required to test each of them, separately.
For our case, although we mentioned effective factors based on Iranian Accounting Standards, but executives tend to access to analysis that allow them to understand accurate and reasonable forecasts of impact changes in each of these factors to ending cash balance. Consequently, for future planning a number of questions should be answered. For example, should we increase or decrease the value of variables which may be effective (according to rules derived from experience) on achieving favorite cash?. If we are in conditions that can't change the effects of some factors (such as exchange rate adjustment or beginning cash balance), can we set some policies for other factors (such as operational or financing cash flow)?
In order to answer these questions, we visualize the ending cash balance level as a continuous function of its input parameters. As you will see in figures 10 to 30 in appendix I, each figure shows a three dimensional relationship between a given couple of input variables and output variable. The following explain these relationships: Fig. 10 shows the relationship between variables 1 and 2 with output variable. Fig. 11 shows the relationship between variables 1 and 3 with output variable. Fig. 12 shows the relationship between variables 1 and 4 with output variable. Fig. 13 shows the relationship between variables 1 and 5 with output variable. Fig. 14 shows the relationship between variables 1 and 6 with output variable. Fig. 15 shows the relationship between variables 1 and 7 with output variable. Fig. 16 shows the relationship between variables 2 and 3 with output variable. Fig. 17 shows the relationship between variables 2 and 4 with output variable. Fig. 18 shows the relationship between variables 2 and 5 with output variable. Fig. 19 shows the relationship between variables 2 and 6 with output variable. Fig. 20 shows the relationship between variables 2 and 7 with output variable. Fig. 21 shows the relationship between variables 3 and 4 with output variable. Fig. 22 shows the relationship between variables 3 and 5 with output variable. Fig. 23 shows the relationship between variables 3 and 6 with output variable. Fig. 24 shows the relationship between variables 3 and 7 with output variable. Fig. 25 shows the relationship between variables 4 and 5 with output variable. Fig. 26 shows the relationship between variables 4 and 6 with output variable. Fig. 27 shows the relationship between variables 4 and 7 with output variable. Fig. 28 shows the relationship between variables 5 and 6 with output variable. Fig. 29 shows the relationship between variables 5 and 7 with output variable. Fig. 30 shows the relationship between variables 6 and 7 with output variable. Fig. 31 shows the rules and defuzzification (inferring cash flows using fuzzy sets with 7 input variables).
Final step in our expert system is defuzzification or converting linguistic levels to certain numbers ( Figure 31). We used centered method in difuzzification because it's very simple and don't need to judge of personal analyst. In this step, the inference system help managers to see the effects of changes in the levels of inputs on the output variables, ending cash balances. In fact, it represents the relationship between the variables whit numerical values.

Conclusions and Final Remarks
Cash is a main and very important source for all business enterprises. A business unit managers and executives to achieve favorite goals must have appropriate understanding of this source flows and the influence factors. Achieving commercial purposes needs cash analysis and control.
Analysis of trends and factors affecting on cash is a useful tool for management.
This paper represents a model for analyzing factors impact on the ending cash balance under ambiguity and uncertainty. The model uses fuzzy set theory to handle ambiguity. It applied rule-based knowledge and a fuzzy inference mechanism based on Mamdani's fuzzy reasoning method to assess ending cash balances. For this purpose, first, input and output variables and their membership functions have been defined. Then, we formed ending cash balance rules using fuzzy inference system to infer ending cash balance from a set of combination of 25 separate rules. Final step was defuzzification or converting linguistic levels to certain numbers by centered method to help managers to see the effects of changes in the levels of inputs on the output variables, ending cash balances. In fact, it represents the relationship between the variables with numerical values. Required data for practical illustration of our modeling is gathered from Cement Companies listed on Tehran Stock Exchange (TSE), which their financial reports are prepared based on Iranian Accounting Standards.
Prediction using the proposed model is very simple, useful and more convenient. The model also provides a practical approach that helps managers to analysis and makes decisions under uncertainty more effectively. The example mentioned in this study made it clear how the proposed fuzzy model enables managers to make their own fuzzy logical rules and analyze the relationships between input and output variables without expanding quantitative knowledge that is necessary in the probabilistic models. Using the proposed model, managers can respond to changes with few calculations in a very short time and update the process in a very simple way.