The Development of a Fuzzy Logic System in a Stochastic Environment with Normal Distribution Variables for Cash Flow Deﬁcit Detection in Corporate Loan Policy

: This paper develops a Mamdani fuzzy logic system (FLS) that has stochastic fuzzy input variables designed to identify cash-ﬂow deﬁcits in bank lending policies. These deﬁcits do not cover the available cash-ﬂow (CFA) resulting from the company’s operating activity. Thus, due to these deﬁcits, solutions must be identiﬁed to avoid companies’ ﬁnancial di ﬃ culties. The novelty of this paper lies in its using stochastic fuzzy variables, or those categories of variables that are deﬁned by fuzzy sets, characterized by normally distributed density functions speciﬁc to random variables, and characterized by fuzzy membership functions. The variation intervals of the stochastic fuzzy variables allow identiﬁcation of the probabilistic risk situations to which the company is exposed during the crediting period using the Mamdani-type fuzzy logic system. The mechanism of implementing the fuzzy logic system is based on two stages. The ﬁrst is based on the determination of the cash-ﬂow requirements resulting from loan reimbursement and interest rates. This stage has the role of determining the need for ﬁnancial resources to cover the liabilities. The second stage is based on the identiﬁcation of the stochastic fuzzy variables which have a role in inﬂuencing the cash ﬂow deﬁcits and the probability values estimation of these variables taking into account probability calculations. Based on these probabilistic values, using the Mamdani fuzzy logic system, estimations are computed for the available cash-ﬂow (the output variable). The estimated values for CFA are then used to detect probability risk situations in which the company will not have enough resources to cover its liabilities to ﬁnancial creditors. All the FLS calculations refer to future time periods. Testing and simulating the fuzzy controller conﬁrms its functionality.


Introduction
Bank lending activities are extremely appealing to companies, as they allow them, within a relatively short period of time, to acquire the financial resources they need in order to invest in business activities. Most business activities have investment return rates that secure the bank from the reimbursement point of view. Furthermore, banks require guarantees. These guarantees are able to protect banks from potential business disruptions. This action puts the companies in a situation in which it is impossible to repay their financial debts. Another measure taken by banks is the financial sustainability analyses which are carried out to substantiate the lending decisions that relate both to the business itself as well as to the investment project that is the subject of financing. Banks are, thus, Among the authors of these, Liu and Li [5] created a fuzzy logic system in order to improve the stochastic modeling capability. Their model used a three-dimensional membership function for managing the random noise effect and stochastic uncertainties and a unique defuzzification method. In another paper, Liu and Li [6] developed an instrument to process stochastic and imprecise information. The authors created a probabilistic fuzzy logic system for modeling the stochastic and imprecise information using a 3-dimensional probabilistic fuzzy set.
Li et al. [7] used a Dempster-Shafer structure based fuzzy logic system in stochastic modeling to improve the fuzzy inference under the complex stochastic environment. Their model was able to capture the stochastic disturbance acting on the fuzzy membership function and to provide a more effective inference under strong stochastic uncertainty.
Dabbous [8] realized a fuzzy logic system in order to filter the observed systems governed by linear stochastic differential equations using the Takagi-Sugeno linear fuzzy model and assuming membership functions of Gaussian type. Spall and Cristion [9] solved the problem of a stochastic system controller with unknown equations by using discrete-time measurements, managing at the same time to accommodate complex systems with possibly time-varying dynamics.
In the economic field, Ferreira et al. [10] created indices for bank branch financial performance measurements using multi-criteria decision analysis (MCDA) techniques by integrating cognitive maps with measuring attractiveness by a category-based evaluation technique.
Aksoy et al. [11] constructed a fuzzy logic system to solve multi-period dynamic decision making for strategic supplier selection with stochastic demand, while Ghani et al. [12] developed a fuzzy logic intelligent system for measuring customer loyalty and decision making. Bolos et al. [13] elaborated on a model that adjusts the GM(1, 2) errors for financial data series that measure changes in the public sector financial indicators. Adjusting the errors in grey models must follow some rules that cannot be determined based on the chaotic trends they register in reconstructing data series. In order to ensure the adjustment of these errors, for improving the robustness of GM (1,2), an adaptive fuzzy controller was constructed. The adaptive fuzzy controller has the advantage of setting the values for error adjustments by the error's intensity, making it possible to determine the value adjustments for each element of the reconstructed financial data series.
Nielsen and Kristensen [14] created a system that modeled Markov decision processes using directed hypergraphs in order to find the K best policies in a finite-horizon. The system ranked the first K deterministic Markov policies in non-decreasing order using an additive criterion of optimality. The European options were modeled with uncertainty of both randomness and fuzziness in output by Yoshida in 2003, by introducing fuzzy logic to the stochastic financial model. The 1 9 9 2 1 9 9 3 1 9 9 4 1 9 9 5 1 9 9 6 1 9 9 7 1 9 9 8 1 9 9 9 2 0 0 0 Among the authors of these, Liu and Li [5] created a fuzzy logic system in order to improve the stochastic modeling capability. Their model used a three-dimensional membership function for managing the random noise effect and stochastic uncertainties and a unique defuzzification method. In another paper, Liu and Li [6] developed an instrument to process stochastic and imprecise information. The authors created a probabilistic fuzzy logic system for modeling the stochastic and imprecise information using a 3-dimensional probabilistic fuzzy set.
Li et al. [7] used a Dempster-Shafer structure based fuzzy logic system in stochastic modeling to improve the fuzzy inference under the complex stochastic environment. Their model was able to capture the stochastic disturbance acting on the fuzzy membership function and to provide a more effective inference under strong stochastic uncertainty.
Dabbous [8] realized a fuzzy logic system in order to filter the observed systems governed by linear stochastic differential equations using the Takagi-Sugeno linear fuzzy model and assuming membership functions of Gaussian type. Spall and Cristion [9] solved the problem of a stochastic system controller with unknown equations by using discrete-time measurements, managing at the same time to accommodate complex systems with possibly time-varying dynamics.
In the economic field, Ferreira et al. [10] created indices for bank branch financial performance measurements using multi-criteria decision analysis (MCDA) techniques by integrating cognitive maps with measuring attractiveness by a category-based evaluation technique.
Aksoy et al. [11] constructed a fuzzy logic system to solve multi-period dynamic decision making for strategic supplier selection with stochastic demand, while Ghani et al. [12] developed a fuzzy logic intelligent system for measuring customer loyalty and decision making. Bolos et al. [13] elaborated on a model that adjusts the GM(1, 2) errors for financial data series that measure changes in the public sector financial indicators. Adjusting the errors in grey models must follow some rules that cannot be determined based on the chaotic trends they register in reconstructing data series. In order to ensure the adjustment of these errors, for improving the robustness of GM(1, 2), an adaptive fuzzy controller was constructed. The adaptive fuzzy controller has the advantage of setting the values for error adjustments by the error's intensity, making it possible to determine the value adjustments for each element of the reconstructed financial data series.
Nielsen and Kristensen [14] created a system that modeled Markov decision processes using directed hypergraphs in order to find the K best policies in a finite-horizon. The system ranked the first K deterministic Markov policies in non-decreasing order using an additive criterion of optimality. The European options were modeled with uncertainty of both randomness and fuzziness in output by Yoshida in 2003, by introducing fuzzy logic to the stochastic financial model. The randomness and fuzziness in the systems were evaluated by both probabilistic expectation and fuzzy expectation, taking account of the seller's/buyer's subjective judgment.
The novelty of this paper is better reflected in comparison with the studies elaborated to date and presented in this section. The proposed paper presents a series of novelty elements, among which are:

•
It is the first financial management tool that uses an artificial intelligence technique for bank lending issues; • The Mamdani fuzzy logic system uses stochastic fuzzy variables, which allows for the identification of probable lending periods in which credit reimbursement risk may occur; • It examines the lending risk for future periods during the reimbursement period according to two important economic indicators, namely, EBITDA and changes in working capital (∆W K ). The values of these two indicators are also probabilistic values; • It allows for identification of cash-flow deficits for future periods of time underlying the credit reimbursement risk during the lending period; • It allows preventive measures to be taken in order to avoid or even mitigate bank lending risks.

The EBITDA and Available Cash-Flow Rule, and the Influence of Stochastic Elements
Credit lending policies are geared towards analyzing the company's financial performance both in terms of operating activity and projects' profitability. Among the most important key performance indicators (KPIs) of a company are EBITDA and CFA [19]. Both of these have a very important role in measuring and assessing a company's financial performance for bank financing as both contain information about the company's ability to repay debt to its financial creditors.
EBITDA provides information on the company's profitability of the operating activity by summing the net profit (π net ) with the interest expense (I exp ), the depreciation charge (D exp ), and the tax expenses (T exp ), using a relatively simple formula: CFA in turn measures the financial potential of the company to repay debt to the financial creditors, but also to pay tax liabilities and pay the shareholders. It is obtained by summing the earnings before interest and taxes (EBIT) with the reversible and irreversible depreciation expenses (D exp ), and deducting the change in working capital (∆W K ) and the change in capital expenditures (∆I) using a formula of the form: Both CFA and EBITDA evolve over time in a random, assumed continuum manner and the stochastic values of these elements depend on various factors of influence. Definition 1. EBIT(t) is a random variable that evolves over time in a random mode and can take any value from R, or EBIT (t) ∈ R. It is assumed that EBIT (t) describes a continuous stochastic process which is normally distributed and has the probability density function of the form which will always take positive values, f (EBIT) ≥ 0. The distribution function can be written as a primitive form of the probability density function: Geometrically, the above condition can be interpreted as that the under-graph area of the probability density function should be equal to 1. The probability density function has the mean (µ) and the variance (σ 2 ) and can be denoted as N EBIT, µ, σ 2 . Theorem 1. The dynamic equation of EBIT (t), as a standard normal distribution process (µ = 0 and σ = 1) over the credit period ∆t, may be expressed as follows: Proof. EBIT, as an indicator for measuring the return value of the operating activity, may take different values within the credit repayment period. For the interval ∆t = t − t 0 , the change in value is of the form: If we split (∆t) into subintervals of the form t 0 ≤ t 1 ≤ t 2 ≤ . . . ≤ t n−1 ≤ t, any increase in EBIT over the ∆t = t − t 0 can be written as: By logarithm of the above expression we obtain: According to the central limit theorem, it is known that for very large values of n we will have n t=1 EBIT(t n−1 ) → 0 , so in a normal distribution with µ = 0 and σ = 1 it will follow that: EBIT(t n−1 ) . has a log-normal distribution; • ln EBIT(t n−1 ) , with random, independent and finite variables.
We consider the assumption that EBIT evolution describes a log-normal law. In order to write the EBIT variance (∆EBIT) as a stochastic process with a normal distribution, we start from the expression of the company's profitability for the operating activity (R op ): The above relationship can be written as follows: By logarithm, the following is obtained: ln For small values of x we will have ln(1 + x) = x, so that ln EBIT has a normal distribution and µ is the average or annual profitability of EBIT during the lending period (∆t) and σ, the annual volatility may be expressed as: ∆EBIT The dynamic EBIT equation as a normal distribution stochastic process can be written as where ∆z = ε √ ∆t, with ε being a random variable with standard normal distribution: E(ε) = 0 and

Theorem 2:
The likelihood that EBIT will take certain values over a certain period (t) of the credit interval ∆t under the conditions in which CFA = lnEBIT (with logarithmic evolution) or CFA = f(EBIT) can be established by the relation: Proof: We assume that the evolution of the available cash-flow is logarithmic and characteristic of the assets resulting from bank financing, which mostly depend on EBIT evolution. The logarithmic evolution of CFA is explained by the fact that its values are large at first, but as assets depreciate, the CFA values begin to decrease as a result of increased operating costs. This assumes that CFA = ln EBIT or CFA = f (EBIT). EBIT dynamics have been described above and are given by the relationship: According to Itô's lemma [38], between CFA and EBIT a relationship will be established which takes the following form: Calculation of derivatives leads to the following results, namely: By replacing the predetermined partial derivatives in Itô's lemma [38], we will have: By taking into consideration that at the initial moment t 0 we will have a value of EBIT 0 , we assume that: From Theorem 1 it results that ln EBIT(t n−1 ) is normally distributed with the following normal distribution: ln By applying the probability formula for the standard normal distribution we will have: This results in: By solving the above inequality, it follows that or In conclusion, it can be stated that the EBIT evolution during the lending period depends on the initial EBIT value, which is also presumed by its annual average (µ) and the standard deviation (σ), according to the above formula.

Cash Flow Deficits during Lending Period
Cash flow deficits during lending periods are unavoidable due to the fact that reimbursement periods (RP c ) are almost always shorter than the invested capital recovery periods. These recovery periods, also called amortization periods (AP), are an irreversible depreciation. Modern economic theory has introduced the notion of economic life (EL), which is understood as the time period in which the capital invested in infrastructure is recovered. Between the repayment period (RP c ) and the economic life of the infrastructure assets (EL), there is the relationship (RP c ) < (EL).
The size of cash flow deficits (CFD) is influenced by two main elements, namely, the amount of capital recovered annually as a result of investment in infrastructure assets and the amount of credit and interest reimbursement rates due to financial creditors.
The amount of capital recovered annually as a result of investments in infrastructure (ARC) is also known in the literature as the value of the annual depreciation and depends on two parameters: invested capital (IK) and share of capital recovery (RCS = 100% EL ). The annual value of the capital recovered as a result of infrastructure investments is given by: EL . The capital recovered annually may be linear, degressive, or accelerated, which is similar to the current depreciation rates that companies use for the amortization system. For ease of calculation, it is assumed that the annual share of recovered capital invested in infrastructure assets is linear and the system can be adapted to company needs. The recovered capital invested in infrastructure assets takes place by including the amounts resulting from the recovery mechanism described above in the products and services value obtained. Thus, during the economic life of assets equal to n (EL = n), taking into account an annual discount rate (r ai ), the annual values of the recovered capital may be expressed as follows: For the first year of asset operation: For the second year of asset operation: . If the discount rate (r a = cst) is constant over the asset's life, the annual amount of the capital recovered as a result of the investments in the infrastructure assets can be written as follows: The amount of credit and interest reimbursement rates (RR CI ) follows the same rules as in the banking domain knowledge. The value of these rates depends on the amount of the borrowed capital (BK) and the credit repayment time (RP c ) equal to m, with (m ≤ n) and the interest rate (Ir).
For the first year of the reimbursement period, the repayment rate (R c ) and the interest rate will be determined using the relationship: For the second year of the reimbursement period, the repayment rate and the interest rate will be determined using the relationship: For the last (m) year of reimbursement period, the repayment rate and the interest rate will be determined using the relationship: RR CI (m) = BK RP c + Ir(BK − (m − 1) × R c ) (1 + r a1 )(1 + r a2 ) · · · (1 + r am ). If the discount rate (r a = cst) is constant over the reimbursement period, the repayment rate and the interest rate will be given by the following relationship: Or, in generalized form: The option for computing the amount of capital recovered as a result of investments in infrastructure assets (ARC) and for the value of credit and interest reimbursement rates (RR CI ) can be adapted in response to the complexity or specificity of each company in order to prevent cash-flow deficits that may threaten maturity reimbursement.
Since RP c ≤ EL, RR CI > ARC, which leads to short, medium, and long-term occurrence of cash-flow deficits. The amount of these deficits for each year of the reimbursement period is as follows: For the first year of the reimbursement period, the amount of the cash-flow deficit will be: For the second year of the reimbursement period, the amount of the cash-flow deficit will be: And for the last year (n) of the reimbursement period, the amount of the cash-flow deficit will be: The value of the cash-flow deficit during the reimbursement period will be: Cash-flow deficits are covered by the available cash-flow the company derives from its operating activity. In order to ensure repayment of the loan and interest, the company will have to achieve an annual CFA level that is higher than the annual cash flow deficit (CFD): CFA(i) ≥ CFD(i). The value of the required level of CFA(i) for the compensation of CFD(i) will be determined using fuzzy modeling, with CFA considered the output variable of the probabilistic fuzzy logic system.

Identification of Fuzzy Stochastic Variables
Fuzzy variables are extremely useful in studying the reimbursement of bank loans as they capture very well the "vague" notion that is involved in analyzing the company's financial sustainability. For example, EBIT values can be classified as large or medium, assuring the shift from one linguistic value to another gradually using fuzzy sets.

Definition 2.
The EBIT variable is a triangular fuzzy variable defined by fuzzy sets and it is noted µ EBIT (z) if for any x ∈ R and for any a, b which are two real non-negative numbers, the variable EBIT = (x, a, b) is the fuzzy subset on R, defined by the function of membership: ; for any a and b > 0.
If a and b = 0 than EBIT(x) = 1 and EBIT(z) = 0 for z x.
The EBIT values resulting from the company's operating activity over a period of time (∆t) have different membership degrees. These are determined by the membership function and can take values in µ EBIT (z) ∈ [0, 1]. The triangular fuzzy set defined by the fuzzy variable µ EBIT (z) is of the form: µ EBIT : EBIT → [0, 1] , using the aforementioned membership function.
At the same time, the variable EBIT(t) is a random variable that can take any value from R, which describes according to Definition 1 a random, continuous, normally distributed process with and with the distribution function written as a primitive of the distribution density function Also, according to Theorem 2, the probability for EBIT to take a certain value during the lending period (∆t) is given by the relation:

Definition 3.
The EBIT is called a stochastic fuzzy triangle variable if for any x ∈ R and for any a, b which are two real non-negative numbers, the following conditions are cumulatively met: (1) The variable EBIT = (x, a, b) is defined by the membership function of the form: (2) The interval [a, b] is defined by the variable probability of occurrence of the variable (EBIT z ) which is given by the relation: EBIT(t 0 )e (µ− 1 (3) The number of membership degrees for the stochastic fuzzy triangular variable (EBIT z ) is located in the range: µ EBIT(t 0 )e (µ− 1 and with the distribution function written as a primitive of the distribution density function The probabilistic fuzzy values of the input variables for the definition interval

ordered by means of linguistic values
to determine the membership degree and the formation of the rules specific to the probabilistic fuzzy logic system. At these probability ranges the membership degree of the fuzzy variables defines the fuzzy set that is formed by the membership function.

Elaboration of the Mamdani Fuzzy Logic System in a Stochastic Environment
The existing problem: Most companies have difficulties in assessing the risks involved in banking lending policy. This is because the factors influencing these kinds of risks are extremely complex and diversified. It is not known how the EBITDA will fluctuate or how the working capital will evolve (∆W K ) over the lending period to prevent any financial difficulties caused by the lack of available cash-flow from which credit rates and interest are reimbursed. Thus, a financial management tool that detects bank lending periods in which the company may face financial difficulties in credit reimbursement must be identified. The credit reimbursement risk arises in the form of cash-flow deficits that occur during the bank lending period and lead to the impossibility of repaying bank loans and interest, with immediate consequences on the company's operating activity. The financial management tool which is developed within this study will allow companies to set preventive measures over bank lending periods to avoid as much as possible the credit reimbursement risk mentioned above.
Suggested solution: For the detection of the cash-flow deficit risk during the lending period, as well as to establish preventive measures to mitigate this risk, a Mamdani fuzzy logic system with stochastic fuzzy variables has been developed. These variables allow for the study of reimbursement risk at certain probabilistic value ranges, in order to determine whether this risk may occur during these intervals. The output variable (CFA) indicates whether there is a probability of cash-flow deficits during these intervals.
The probabilistic Mamdani fuzzy logic system aims to determine the values of the output variable and the available cash-flow for future time periods, resulting from the fuzzy modeling of the system input variables. The input variables are stochastic fuzzy variables. The resulting CFA values form the system output variable, which will also be a stochastic fuzzy variable, which analyzes the cash-flow deficit during the lending period.

Definition 4.
Any probabilistic fuzzy logic system, normally distributed, has the following features: • The input variables of the fuzzy logic system are stochastic, normally distributed, and have the estimated values determined by the relation: The fuzzy logic system rules are formed on the variation intervals of the fuzzy input stochastic variables and from the fuzzy modeling of the rules, with the output variable also being a stochastic and fuzzy variable; • The rule-based inference operation is a max-min type, specific to the Mamdani fuzzy logic system; • The fuzzy defuzzification of the result after the fuzzy inference operation is obtained with the Center of Aria (COA) method or the centroid defuzzification method. The results obtained using this type of defuzzification are sufficiently linear to obtain a control curve without sudden variations.
To obtain the fuzzy logic system in the probabilistic environment, the following steps are taken: Step 1. Input variables identification: In the input variables category are included the variables that directly affect the available cash-flow and those considered the variables with direct impact on the cash flow deficit, being EBIT(t) and ∆W K , being.
The stochastic fuzzy input variable EBIT(t) has the main influence on CFA with the following features. The EBIT(t) values are established using the following relation: . For the aforementioned interval, the fuzzy set E EBIT(x) = (x, EBIT min , EBIT max ) has the membership function established by the relation: The linguistic values attributed to the triangular fuzzy stochastic variable are grouped into three categories-low (L), medium (M), and high (H)-which also take into account the probability values established using the above relation represented in Figure 2.
The linguistic values attributed to the triangular fuzzy stochastic variable are grouped into three categories-low (L), medium (M), and high (H)-which also take into account the probability values established using the above relation represented in Figure 2. The stochastic fuzzy input variable ∆ (t) is the second variable of influence on the available cash-flow, and has the following characteristics. The values ∆ (t) are set values for future periods using the calculation relation: ∆ √ ∆ √ ∆ . For the aforementioned variation range, the fuzzy set ∆ , ∆ , ∆ has the membership function established by the relation: Even in this case, the linguistic values attributed to the stochastic input variable are grouped into three categories: low (L), medium (M), and high (H). These also take into account the probability values established using the above relation represented in Figure 3. The membership function for earnings before interest and taxes (EBIT(t)) in probabilistic environment.
The stochastic fuzzy input variable ∆W K (t) is the second variable of influence on the available cash-flow, and has the following characteristics. The values ∆W K (t) are set values for future periods using the calculation relation: . For the aforementioned variation range, the fuzzy set ∆W K (x) = (x, ∆W Kmin , ∆W Kmax ) has the membership function established by the relation: Even in this case, the linguistic values attributed to the stochastic input variable are grouped into three categories: low (L), medium (M), and high (H). These also take into account the probability values established using the above relation represented in Figure 3. Step 2. Identification of the stochastic fuzzy output variable: the stochastic fuzzy output variable is the available cash-flow whose membership function is of the form: The linguistic values attributed to the output variable are grouped into five categoriesvery low, low, medium, high, and very high-according to Figure 4. Linguistic variable stratification for the output variable was established to capture the exposure to the cash flow deficit risk so that the company can take early action to avoid financial Step 2. Identification of the stochastic fuzzy output variable: the stochastic fuzzy output variable is the available cash-flow whose membership function is of the form: The linguistic values attributed to the output variable are grouped into five categories-very low, low, medium, high, and very high-according to Figure 4. Step 2. Identification of the stochastic fuzzy output variable: the stochastic fuzzy output variable is the available cash-flow whose membership function is of the form: The linguistic values attributed to the output variable are grouped into five categoriesvery low, low, medium, high, and very high-according to Figure 4. Linguistic variable stratification for the output variable was established to capture the exposure to the cash flow deficit risk so that the company can take early action to avoid financial difficulties. Linguistic variable stratification for the output variable was established to capture the exposure to the cash flow deficit risk so that the company can take early action to avoid financial difficulties.
Step 3. The Probabilistic Fuzzy Rule Base: This is constructed starting from the linguistic values assigned to them so as to set the CFA values to influence the company's cash flow deficits during the lending period. The resulting rule basis is shown in Table 1.  The inference operation of the rule-based probabilistic fuzzy logic system designed for the detection of cash-flow deficit within the lending policies is of max-min type. The implication relationship formula used for the mathematical description of each rule in the fuzzy rule base is of min type. The aggregating method of partial conclusions generated by the rules in the fuzzy rule base is of max type.
Step 4. Defuzzification: The final step in the probabilistic fuzzy logic system is the determination of the output variable, the defuzzification of the fuzzy result obtained after the fuzzy inference operation. This operation is known in the literature as the centroid defuzzification, or the Center of Aria (COA) method. The results obtained by this type of defuzzification are sufficiently linear in order to obtain a control curve without sudden variations.
The formula after which the value of the output variable is computed, based on the output fuzzy set, is determined as follows: • For continuous variables: • For discrete variables: The output variable of the fuzzy controller (∆CFA * ) gives us information about the variable evolution when there is a change in the value of the input variables: EBIT and ∆EBIT. An example is provided in Figure 5.
The output variable of the fuzzy controller ∆ * gives us information about the variable evolution when there is a change in the value of the input variables: EBIT and ∆ . An example is provided in Figure 5.

Implementation of the Probabilistic Fuzzy Logic System for Detecting Cash-Flow Deficiencies in Bank Lending Policies
The mechanism of applying the probabilistic fuzzy logic system is based on the identification and establishment of cash-flow deficits during the lending period, as well as the identification of the risk exposures determined by the output variable (CFA), respectively. Those situations estimated on the future in which the company can no longer repay the debts to financial creditors at maturity consists of two steps: The first step is to determine the amount of the cash-flow deficit for each year of the lending period according to the above calculation formula: The formula for computing the cash-flow deficit is based on the calculation of the cash-flow requirement (CFR) resulting from credit and interest reimbursement, as well as on the calculation of resources (R a ) from asset depreciation determined as the ratio between the amount of the borrowed capital and the economic life of assets. The structure of the cash-flow deficit is presented in Table 2.
The data in Table 2 shows the cash-flow deficit in every year over the reimbursement period, due to the gap between this period and the economic life of the assets. This deficit should be covered by the EBIT generated by the operating activity and the investment itself that is the object of the financing. In the second step EBIT is estimated from the company's operating activity and from the working capital variation (∆W K ) for each year of the lending period, taking into account that EBIT and (∆W K ) are considered random input variables which are normally distributed and meet the requirements of Definition 3, using the formulas and The resulting variation ranges for EBIT and ∆W K are stratified by local gradients gl EBIT , gl ∆W K

Cash-Flow Deficit Formula
Year 1 Year 2 The resulting values for EBIT and working capital variation are modeled using the probabilistic Mamdani fuzzy logic system to determine the CFA value attained when a change in EBIT and ∆W K , as main factors of influence on CFA, is made. The CFA values established with the help of this fuzzy logic system enable the identification of the time periods that would be affected by the cash-flow deficit. In order to avoid the risk of late payment (or non-payment) of debts to financial creditors during these periods, the company must adopt measures to increase the value of CFA.

Fuzzy Logic Simulation in a Stochastic Environment
In order to conduct a simulation of the fuzzy logic system, two categories of data were considered: data related to the bank's lending policy and data related to the company's current activity. The bank lending policy refers to asset acquisition required for the operating activity with an estimated value of EUR 10 million, repayment duration of five years, an interest rate of 5%, and an economic life of 10 years. For each year the cash-flow deficit during the lending period was computed, starting from the cash flow requirements (credit and interest) and the available resources.
Cash-flow deficits are recorded each year during the lending period as the gap between the assets economic life (10 years) and the credit repayment period (five years). These cash-flow deficits must be covered by the available cash-flow resulting from the company's operating activity. For the company's current activity, the EBIT was computed, as shown in Table 3. Table 3. EBIT evolution resulting from the company's operating activity over a 10-month period *. According to the calculations made using the second formula from Definition 3 (2) for one year of the lending period, an estimated value for EBIT(1) was obtained, with a probability of 99%: Also, from the company's current activity, the working capital variation ∆W K was obtained, and is presented in Table 4 below: Table 4. ∆W K evolution resulting from the company's operating activity over a 10 month period *. According to the calculations made using the formula of Definition 3 (2) for one year of the lending period, an estimated value for ∆W K was obtained, with a probability of 99%: Based on the probabilistic values stated above, the input variables of the probabilistic fuzzy logic system have been modeled as EBIT(t) and ∆W K (t), and the output variable as CFA. The values of the output variable have been obtained by applying the max-min inference operation and the COA defuzzification method. The variation interval of the EBIT(t) and ∆W K was stratified with the help of local gradients. Also, the CFA was computed using the probabilistic fuzzy logic system, giving the results in Figure 6. From the above data it can be concluded that it is likely that in the first year of the credit period there will be cash-flow deficits for CFA values lower than the CFR for values of CFA smaller than 1500 million where the company will need to adopt a series of prudential measures aimed at increasing the CFA value. For values above 1500 million, the company will not register cash-flow deficits, but it is still useful to monitor CFA values that are closer to the funding requirement (1500 million) to avoid cash-flow deficits that make debt repayment impossible at maturity.

Conclusions
The proposed Mamdani fuzzy logic system in a stochastic environment uses stochastic variables as input variables: EBIT(t) and working capital variation ∆ . The main characteristic of these stochastic input variables is that they allow for estimation of the values for future time periods in the form of interval limits (min, max). Based on their values and using the fuzzy logic system, an output variable was obtained. The estimation interval used in the probabilistic fuzzy logic system is equal to one year. In order to obtain the results and to conduct an analysis related to cash flow deficit detection Probabilistic available cash-flow according to the fuzzy logic system and the membership function.
From the above data it can be concluded that it is likely that in the first year of the credit period there will be cash-flow deficits for CFA values lower than the CFR for values of CFA smaller than 1500 million where the company will need to adopt a series of prudential measures aimed at increasing the CFA value. For values above 1500 million, the company will not register cash-flow deficits, but it is still useful to monitor CFA values that are closer to the funding requirement (1500 million) to avoid cash-flow deficits that make debt repayment impossible at maturity.

Conclusions
The proposed Mamdani fuzzy logic system in a stochastic environment uses stochastic variables as input variables: EBIT(t) and working capital variation ∆W K . The main characteristic of these stochastic input variables is that they allow for estimation of the values for future time periods in the form of interval limits (min, max). Based on their values and using the fuzzy logic system, an output variable was obtained. The estimation interval used in the probabilistic fuzzy logic system is equal to one year. In order to obtain the results and to conduct an analysis related to cash flow deficit detection in corporate loan policy, a series of steps were followed.
The first step targeted the determination of the cash-flow requirement resulting from the reimbursement loan and interest rates. This stage had the role of determining the financial need of a company to cover its financial obligations to creditors. A second step was based on the identification of fuzzy stochastic variables with a role in influencing cash-flow deficits (EBIT and ∆W K ) and also on estimating their probability values by making probability calculations.
Based on these values, and using the Mamdani fuzzy logic system, estimations for the output variable were computed. The estimated values of the output variable (CFA) were then used to detect probable risk situations in which the company would not have enough resources to cover its liabilities to financial creditors.
The main advantages of the proposed Mamdani fuzzy logic system in a probabilistic environment to substantiate financial decisions are the following:

•
The system allows for the study of the behavior of input variables for future periods of time, making it easy to anticipate situations of financial difficulty within a company;

•
The system allows for fuzzy modeling of the evolution and behavior of the output variables on which the financial decisions are based. Values of output variables are determined for future time periods by probabilistic calculations, which makes it possible to identify the anticipation of financial risks. Consequently, the company can take measures to mitigate or even avoid risks;

•
The system helps to substantiate the company's financial decisions by anticipating the development of exogenous factors with high risk, which have an unfavorable influence on the company's economic performance.