Fuzzy Logic in Financial Management

W rozdziale tym przedstawiono rozwazania na temat mozliwości prognozowania sytuacji finansowej gospodarstw domowych przy zastosowaniu logiki rozmytej. Autor zaproponowal model skladający sie ze zmiennych wejściowych opartych na informacjach demograficznych i finansowych konsumentow - na przyklad: wiek, wyksztalcenie, liczba dzieci, wynagrodzenie, stopien zabezpieczenia finansowego.


Introduction
Fuzzy logic has been widely used in machinery, robotics, and industrial engineering.This chapter introduces the use of fuzzy logic for the needs of financial management.The process of globalization has led to the emergence of a complex network of relationships in the business environment.In a free market economy, this means increased complexity and uncertainty of factors affecting the financial standing of entities.Nowadays many phenomena in finance and economics are fuzzy, but are treated as if they were crisp.In this chapter two such financial research problems are analyzed.The first concerns the issue of consumer credit scoring, while the second the forecasting of the financial situation of firms in short and medium periods (one year and two years forecasts).Predicting both business and consumer bankruptcy, is imprecise and ambiguous.The failure process is affected by many internal and external factors that cannot be precisely and unambiguously defined.Also, the mere allegation that a company or an individual consumer is at risk of bankruptcy must be considered imprecise, and in fact rarely in economic reality are there firms/persons that can be considered as 100% bankrupt.It is difficult to accurately determine the degree of bankruptcy threat using traditional statistical methods such as multivariate discriminant analysis.When the value of the discriminant function is less than the threshold value, we find that a company is at risk of bankruptcy.With the use of fuzzy logic vague and ambiguous concepts can be defined, such as "high risk of bankruptcy" or "low risk of bankruptcy".The presented models are the result of the chapter author's ten years of experience on this issue.They can be used not only for forecasting the level of risk of bankruptcy but also for determining the degree of positive financial standing of the analyzed entity (a company or consumer) -for example, such as "outstanding solvency" or "average solvency" etc.The global financial crisis that began in mid-2008 caused the number of companies in danger of bankruptcy to significantly increase around the world.Furthermore, the highly globalized environment has caused the economies of countries to deteriorate too (for example: such countries as Greece or Iceland risking bankruptcy; the decrease of the USA's credit rating from AAA to AA+ by rating agencies for the first time in history), which directly and indirectly influences the financial situation of both companies and consumers.Therefore, analysts are no longer faced with the dilemma of whether to predict the financial standing of entities (enterprises, consumers, or even countries), but what forecasting method to use in order to minimize forecast errors.This chapter consists of three sections.In the first the author introduces his financial forecasting methodology and describes the concept of using fuzzy logic in finance.Section 2 is devoted to the author's research on the use of fuzzy logic in consumer credit scoring.Models developed by the author are based on demographic and financial variables of customers of a Central European bank.In the last section, the author presents business bankruptcy prediction models programmed by him.These models are based on financial variables of companies quoted on a stock exchange in Central Europe.
The information contained in this chapter may be used in practice in several aspects:


in the context of early warning of the deteriorating financial situation of an audited company,  from the viewpoint of assessing the solvency of partners and customers,  from the perspective of credit risk assessment by financial institutions,  in the context of the implementation of financial and economic plans in a company,  from the perspective of risk assessment, the purchase of shares by individual and institutional investors on stock exchanges,  in the context of credit scoring the credit applications of consumers by banks,  from the viewpoint of assessing the consumer bankruptcy threat.

Classification of financial forecasting models
In literature, forecasting models are categorized into three main groups: statistical models, theoretical models, and models using soft computing techniques, which are part of a separate field of science defined as Computational Intelligence (a term understood as solving various problems with the help of artificial intelligence).According to literature, 64% of case studies used statistical models, 25% soft computing techniques, and 11% other types of models (Aziz & Dar, 2006).
In statistical models, selected financial ratios that have diagnostic value are estimated and used.The selection of each ratio is based on empirical studies of ex-post groups of entities, consisting of enterprises/consumers with good financial condition and those at risk.Furthermore, the set of indicators is reduced by excluding variables of similar information content, e.g.ratios that are correlated with each other.After defining a set of diagnostic variables, the model's parameters are estimated.Each variable selected receives discriminatory weight.The bankruptcy prediction model is created by a gradual "compaction" of the set of individual ratios, to obtain a single index called a synthetic indicator."Compaction" is carried out using appropriate statistical and econometrical methods.Using such a model for assessing the risk of bankruptcy is the substitution of the actual value of financial ratios and the calculation of the synthetic indicator of risk.This synthetic index characterizes the financial situation of the audited company/client.In contrast to the statistical models, methods of soft computing techniques effectively cope with imprecisely defined problems, incomplete data, imprecision, and uncertainty.The issue of consumer and business bankruptcy prediction has all of the above characteristics.In addition, soft computing models are suitable for use in dynamic systems designed to fit certain internal parameters to changing environmental conditions (so-called learning systems).The difference between statistical models and soft computing models is based on aspects such as the precision, reliability, and accuracy of variables used.These elements are the basis of statistical models, while the starting point, e.g. for the fuzzy logic model, is the thesis that precision and certainty carry a cost, and calculating, reasoning, and decision making should exploit tolerance for imprecision and uncertainty wherever possible.Soft computing techniques, in contrast to statistical models, thus tolerate inaccurate data, uncertainty, and approximation.The essence of models based on computational intelligence is the processing and interpretation of data in a variety of capacities.They are able to formulate rules of inference and generalized knowledge about situations where they are expected to predict or classify the object into one of the previously observed categories.
The theoretical models are mainly focused on the use of qualitative information in predicting the bankruptcy of entities.In contrast to the statistical and soft computing methods that rely on the symptoms of going bankrupt, theoretical models focus on finding the causes of the collapse.Theoretical models typically use different statistical techniques for drawing conclusions and quantitative proof of the theoretical argument.Thus, for example in the hazard model, an entity can be seen from the perspective of the player -gambler who plays burdened with a certain probability of loss.The player (company/consumer) continues to function until the moment when its net worth reaches zero (bankruptcy).
Another example of the theoretical model is the KMV model, which is based on the use of option pricing theory for the valuation of risky loans and bonds.In the KMV model an entity's net assets are essential.This model assumes that at any time the value of assets can be modelled as a call option whose underlying is the market value of company assets and the exercise price -the value of the entity's liabilities at the time of their maturity.Using the KMV model the probability of a company's value falling below the value of its liabilities (making the firm insolvent) can be determined, .
Literature studies show that the financial situation predictions are dominated by discriminant analysis models, which make up 30.3 percent of all models created among all methods -statistical, soft computing, and theoretical (Aziz & Dar, 2006).Undoubtedly the most popular model for forecasting bankruptcy risk is the statistical model developed by American Professor -E.Altman in 1968.As a pioneer in the use of multivariate discriminant analysis to predict the bankruptcy of companies, he developed a model consisting of a single function with five financial ratios (Altman, 1993): where: X1 = working capital / total assets X2 = retained earnings / total assets X3 = earnings before taxes / total assets X4 = market value of equity / total long term and short term liabilities X5 = sales / total assets Altman proposed the use of three decision areas depending on the value of the Z score: .81 then it is a signal of a high probability of bankruptcy,  if 1.81 < Z < 2.99 then the risk of financial failure of the company is not possible to define (it is a so-called "gray area"),  if Z > 2.99 then there is low probability of bankruptcy.
Predicting the bankruptcy of companies is imprecise and ambiguous.The process of business failure is affected by many internal and external factors that cannot be precisely and unambiguously defined.Also, the mere allegation that a company is at risk of bankruptcy must be considered imprecise, and in fact rarely in economic reality are there companies that can be considered as 100% bankrupt.It is difficult to accurately determine the degree of bankruptcy threat using traditional statistical methods such as multivariate discriminant analysis.When the value of the discriminant function is less than the threshold value, we find that a company is at risk of bankruptcy.With the use of fuzzy logic vague and ambiguous concepts can be defined, such as "high risk of bankruptcy" or "low risk of bankruptcy".The concept of fuzzy sets was introduced by Zadeh in 1965 (Zadeh, 1965).The fuzzy set "A" in a non-empty space X (AX) can be defined as: where μ A : X  [0,1] is a function for each element of X that determines the extent to which it belongs to set A. This function is called a membership function of fuzzy set A.
Classical set theory assumes that any element (company) fully belongs or completely does not belong to a given set (bankrupt or non-bankrupt set of companies).In turn, in the fuzzy set theory an element (company) may partially belong to a certain set, and this membership may be expressed by means of a real number in the interval [0,1].Thus, the membership function μ A (x) : U [0,1] is defined as follows: where: μ A (x) -function defining membership of element x to set A, which is a subset of U; f(x) -function receiving values from the interval [0,1].The values of this function are called the degrees of membership.
A membership function assigns the degree of membership of each element x  X to a fuzzy set A, where we can distinguish three situations: <1 means partial membership of an element x to the fuzzy set A.
Membership functions are usually presented in graphical form.A trapezoidal function μ A (x) is often used (see Figure 1).The graph shows information from literature about the accepted values of the cash liquidity ratio.The correct values for this ratio are values in the interval [0.2, 0.5], and incorrect values are in the range of (0; 0.2)(0.5,).When this ratio is lower than 0.2 it is considered that the company has a cash liquidity shortage; in turn, when this amount is higher than 0.5 it is said that the company has excess liquidity, which is also rated as a negative phenomenon (in the case of excess liquidity such companies have too much cash, which is rated as inefficient company management).In this case, using the classical set theory to evaluate this financial ratio, there is a sharp boundary between the two sets of ratio values 0.2 and 0.5.If one company recorded a cash liquidity ratio of 0.19, it would be classified as an incorrect value -negative, while if a second company recorded this ratio at the level of 0.2, it would be regarded as a correct value -positive assessment of bankruptcy risk, even though the financial ratio of the two firms differ only by 0.01.The interpretation of the values of individual ratios (e.g.liquidity) is further complicated by the fact that different literature sources give different reference limit values for individual financial ratios.
Application of a fuzzy set changes the assessment of the problem.A cash liquidity ratio with a value of 0.19 is considered as partly correct and partly invalid.The degree of membership to both sets depends on the shape of the membership function.
With such defined subsets, the boundary between the values considered to be positive or negative, is fuzzyficated -a certain ratio value is "partially good" and "partially bad."There is no such possibility in the case of classical logic, i.e. bivalent, in which the value of the ratio is "good" or "bad".Therefore, the use of classical logic in assessing the financial situation of companies affect negatively on the effectiveness of posed forecasts.This occurs especially in ratios which values are close to the threshold of subsets, where an excess of the critical value determines the final evaluation of the ratio (as entirely positive or negative), which is not true, because both values reflect almost the same situation in the enterprise.
The above example concerns the prediction of bankruptcy of companies.But the example for the usefulness of fuzzy logic in assessing the creditworthiness of consumers can also be given.In consumer credit scoring different demographical and financial variables of consumers are taken into account.Bank analysts set individual criteria to each of them in order to evaluate the credit risk of the applicant (setting certain points to each variable).One of the most popular factors is the age of the consumer.
It is generally accepted that the middle aged consumers group is less risky (young people tend to have smaller and less stable income than middle aged men, and old consumers bear higher risk because of their life expectancy).The issue is to set proper age limits into each category.Using the most common classical logic it can be set that middle aged consumers are those in the range of 30-45 years old.In such case a credit applicant who is 29 years old is evaluated on a scoring card worse than the consumer who is only 1 year older.The drawbacks of using classical logic are not only for the bank's clients who may not receive the credit but also for the bank itself that looses the potential profits from refused credit, which could have been given without much larger risk than in case of middle age people.Application of fuzzy logic can improve the efficiency in forecasting the probability of ontime repayment of granted credits.Figure 2 shows that classical logic uses crisp classification of the age of customers -group of young people in age ranges of (0; 30), group of old people in age ranges of (45 and more).With the help of fuzzy logic a bank can set that consumers with an age between 25 and 30 are partially young and middle age ones, and with an age between 45 and 50 are partially middle age and old ones.In the described example, the credit applicants who are 29 years old will be scored very similarly to those who are 30 years old, which would not be possible using credit scoring applications that are based on classical logic.

Drawbacks and limitations of traditional forecasting models
Despite the high popularity of traditional bankruptcy prediction models, they are not free of defects and limitations, which rarely receive substantive discussion in literature.The first limitation has already been discussed -the crisp separation between "good" and "bad" values, conditions or situations.Such models use classical logic with no possible partial belonging to a defined group of criteria.
The second issue in assessing the effectiveness of these models is the method of developing a learning dataset (based on which the model shall be estimated) and a testing dataset that consists of entities that did not make it into the learning sample.Elements of the testing sample are unknown to the model.It enables evaluating the effectiveness of the model in conditions similar to those in business practice.In literature, the vast majority of scientists (e.g.: Ooghe & Balcaen, 2006;or Kumar & Ravi, 2007) suggest that the learning dataset was a balanced sample (consisting 50% of entities at risk of bankruptcy, and 50% of entities in good financial condition).This will enable the model to learn to distinguish "good" and "bad" entities.Note, however, that in a market economy the number of firms/consumers at risk of bankruptcy is much smaller than the number of "healthy" entities.Evaluation of the effectiveness of models that use a balanced testing dataset become highly questionable.After all, these models are developed for use in business practice, where the proportion of bankrupts to non-bankrupts is many times smaller.The author of this chapter proved in his previous research that fuzzy logic models are superior over traditional bankruptcy prediction models (both statistical and soft computing techniques) in forecasting risk of bankruptcy of companies in the case of an unbalanced testing dataset (Korol, 2011).
Another controversial aspect on the effectiveness of the most popular analysis methodsmultivariate discriminant, logit, and probit , is the possibility of manipulation of the threshold in order to maximize the classification results of these models.This allegation was raised by M. Nwogugu.According to him, the statistical methods do not guarantee reliable results because of the ease at which the threshold which separates "good" and "bad" entities can be manually set (Nwogugu, 2007).Such manipulation, of course, does not increase the effectiveness of the model in business practice after its implementation in a bank, but only in theoretical tests in literature.The next complaint toward traditional bankruptcy models is the issue of becoming obsolete with the passage of time since their estimation.It is assumed that the models function well for 4-6 years, after which it is necessary to modify and update them (Agarwal & Taffler, 2007).It should be noted, however, that the model life cycle presented in Figure 3 is only generally accepted, but there are no strict rules that exactly define the length of the model's life cycle.Forecasting applications become outdated as a result of changes in the business cycle, changing economic conditions which influence the change of appropriate values of financial ratios of the entities (Altman & Rijken, 2006).Fuzzy logic models, of course, also get outdated, but unlike the traditional models, it is easy to update them according to the changing environment without the need for their re-estimation as in the case of statistical models or most of the soft computing techniques.In relation to statistical models scientists also mention an allegation about the adoption of an assumption about normal distribution of financial ratios of analyzed companies during the estimating of models (Mcleay & Omar, 2000).This assumption is often not observed due to the fact that few variables are characterized by such distribution.However the desire to meet this assumption, significantly limit the number of indicators that truly reflect the financial situation of the company and thus would cause deterioration in the effectiveness of models of this type.
Artificial neural networks, belonging to the soft computing methods, are not subject to the above drawback concerning the normal distribution of financial ratios.This does not mean that they are free from other defects in predicting the financial situation of companies and consumers.The most common complaint encountered in literature is the inability to justify the decisions made.Often the way artificial neural networks forecast are described as a "black-box system" (Bose & Mahapatra, 2001).Analysis of the process for assigning individual variable weights is complex and difficult to interpret.Neural networks do not provide the course of reasoning leading to certain assessment.They only give their outcome, without being able to trace further evidence leading to a final conclusion.This makes it difficult to correctly identify the causes of generated errors by an artificial neural network.
Another drawback of the use of artificial neural networks in predicting bankruptcy is an arbitrary method of selecting the network architecture.Although there are general formulas to designate the number of hidden neurons, in literature it is postulated to use an individual and arbitrary approach for each forecasted phenomenon separately.

Research assumptions
To conduct this research1 the author has used the demographical and financial variables of 500 Polish consumers who took consumption credit (400 consumers were "non-bankrupt"they were repaying the credit with no delays and 100 clients were "bankrupt" -those who had delays in repayment longer than 3 months2 ).This population of consumers was divided into:  learning dataset -used for developing the model.There were 50 bankrupt consumers and 50 non-bankrupt ones. testing dataset "one" -used for testing the model created in conditions of an equal proportion of bankrupt and non-bankrupt customers.There were 50 "good" consumers and 50 credit applicants in danger of going bankrupt. testing dataset "two" -consisting of all the customers from testing dataset "one" with the addition of 300 non-bankrupt ones.This enabled testing the ability of the model created to identify customers who have problems with credit repayment among nonbankrupt bank clients in the business practice in proportion of 12,5%/87,5% ("50 bad customers"/"350 good ones").

Fuzzy logic model
The structure of the developed model is presented in Figure 4.The model consists of four different rule blocks.Rule Block 1 "demographics" evaluates the consumer's demographical variables (age, education level, marital status, number of children in household).Rule Block 2 "finance" assesses the financial condition of the consumer based on three variables (monthly income, the length of employment, type of employment contract).Rule Block 3 "financial security" analyzes the financial strength of the customer and eventually the security for the granted credit.Rule Block 4 "the score" uses as entry variables the forecasted output of all three Rule Blocks, which are: demographics variable (there are three states of demographics forecasted at Rule Block 1: weak, average, strong), finance variable (there are three states of financial strength forecasted in Rule Block 2: weak, average, strong), and financial security variable (there are three states of security forecasted at Rule Block 3: weak, average, strong).Based on these three evaluated inputs the model forecasts the final credit scoring output.
The model's output is a variable representing a forecast of the financial situation of an audited consumer.This variable ranges from 0 to 1, while it is assumed that there are three levels of risk: high risk for values smaller than 0.3, medium risk for values from 0.3 to 0.7, and low risk for values larger than 0.7.This model is based on sets of rules written by the author in the form of IF -THEN, where expert knowledge is stored.For each entry variable to the model, the author identified from two to three fuzzy sets (which are subsets of a set of values of the entry variable), and their corresponding membership functions.The fuzzy sets and the shape of membership functions have been arbitrarily designated by the author.The fuzzy sets and the thresholds for all membership functions are presented in Table 3.Based on above set of decision rules the model evaluates a consumer's demographical situation that has direct influence on their credibility.There are four variables analyzed in this rule block: age of consumer, education level, marital status, and number of children in household.The rules are constructed in such a way to consider the different influence each variable has on the strength of a consumer's demographical state.Level of education (values from 0 to 3) is considered to have a positive influence on the credibility of the credit In the Rule Block 2 "Finance" there are three variables analyzed: monthly income, the length of employment and the type of employment contract.Based on set of decision rules in this rule block, the model evaluates a consumer's financial strength that has influence on their credibility.It is considered that each variable has different influence on the financial strength of the customer.Monthly income (values from 800 PLN to 5000 PLN) and length of employment (values from 0 to 15 years) are considered to have a positive influence on the financial stability of the customer (the higher value the better).Third variable -the type of employment contract, defines if the customer source of monthly income is stable.There are three types of the contracts specified: task job contract, limited duration contract, indefinite duration contract.The task job contract is considered to be the worst for the stability of the customer's income.The best contract is indefinite duration one.
In case of Rule Block 3 "Financial Security" there are following three variables analyzed: value of the car, net value of the apartment/house, value of other assets.The task of this rule block is to evaluate the loan collateral.The rules are constructed in such a way to analyze the positive influence of all three variables on financial security of the customer.In addition the net value of apartment/house is considered to have dominant role on the output of this rule block, as it is characterized by the highest value and stability than two other variables.
The outputs of rule blocks 1, 2, and 3 are considered as input variables to the Rule Block 4 "The Score".The model's output "The Score" is a variable representing a forecast of the financial situation of an audited consumer.As it was mentioned earlier in this section of chapter, the output variable ranges from 0 to 1, while it is assumed that there are three levels of risk: high risk for values smaller than 0.3, medium risk for values from 0.3 to 0.7, and low risk for values larger than 0.7.
The use of variables (financial and demographical -Figure 4) implemented in this research is consistent with the credit scoring applications in literature.Most authors mainly use age, education, employment/unemployment status, monthly income, and number of children in household in consumer credit scoring models (e.g.: Henley & Hand, 1996;Wiginton, 1980;Thomas, 2000;Tingting, 2006).As described in Section 2 of this chapter, most of the credit scoring applications are statistical models.One of the newest examples of a developed model is the probit model with nine variables (Tingting, 2006).The estimates for each variable in this model are as follows: if consumer was unemployed (1.4207), family income in $00,000 (-0.155), state property exemption in $0,000 (0.1802), if consumer is collegeeducated (-0.4677), age of consumer (-0.1541), if consumer is male (-0.3354), if consumer is married (-0.0693), if consumer is white (-0.1838), number of children (0.0401).The variables with negative estimates positively influence the risk of bankruptcy (the higher variable value the lower risk of going bankrupt) and variables with positive estimates negatively influence the risk of insolvency (the higher variable value the higher risk).From the form of the model it can be seen that education and status of employment were influencing the output of the model the most3 .

The results
Model was evaluated based on two types of errors and overall effectiveness: It is necessary to make a note that a I type error is much more costly than a II type error to make.I type error means that a bank classifies a bankrupt consumer as a non-bankrupt one.II type error means that a non-bankrupt entity is classified as a bankrupt one.
The results obtained from testing the developed model against the bankruptcy risk while testing dataset "one" and "two" are presented in Table 6.

Testing Type Effectiveness
Testing dataset "One" (50 "bad" / 50 "good" consumers) E1 10% (5 cases) E2 8% (4 cases) S 91% Testing dataset "Two" (50 "bad" / 350 "good" consumers) E1 10% (5 cases) E2 11.42% (40 cases) S 88.75% Table 6.Results of Effectiveness of the Fuzzy Logic Model in Consumer Credit Scoring In the case of testing dataset "one", it can be seen that the fuzzy logic model created evaluated 9 credit applications incorrectly.Among those, 5 cases concerned classification of consumers with the risk of insolvency as "good" borrowers, and remaining 4 mistakes where II type errors, which means that the model classified "good" credit applicants as the high risk operations.The overall effectiveness of this model obtained from that dataset was 91%.
Due to the equal distribution of "bad" and "good" consumers in testing dataset "one", the author treats this research approach as a theoretical possibility test of the predictive power of the method used.From the viewpoint of the practical applicability of the fuzzy logic model in business, the conclusions from the tests conducted on testing dataset "two", which contained 87.5% consumers with good financial condition and 12.5% consumers at risk of insolvency, are more important to analyze.When testing the model with such a proportion of "bad" and "good" consumers, the II type mistakes increased by 3.43 percentage points (from 8% to 11.42%).This caused the decrease of overall effectiveness of the model from 91% to 88.75%.Nevertheless such effectiveness can be rated as high.Unlike the models predicting bankruptcy of firms, it is difficult to conduct comparative analysis of effectiveness of models forecasting bankruptcy of consumers.Models used in literature are theoretical ones, or their authors do not provide results, or they are models for commercial use of restricted character.From the available research, the results of statistical models vary from 72 % (Tingting, 2006) to 77.5 % (Boyle et al., 1992) -figure 7. Comparing the overall effectiveness of the models found in literature to effectiveness of fuzzy logic model created by author, it can be seen that author's model is characterized by: networks), the author conducted a correlation analysis for all ratios from Table 7.The objective of this analysis was to choose ratios that were highly correlated with the score and at the same time had a low correlation between each other.The following ratios were taken into the models as entry data nodes:  one year prior bankruptcy -X3_1, X8_1, X9_1, X10_1,  two years prior bankruptcy -X1_2, X3_2, X5_2, X7_2, X8_2.
For each entry variable to the model, the author identified two fuzzy sets (which are subsets of a set of values of the entry variable): "positive" and "negative", and their corresponding membership functions.The fuzzy sets and the shape of membership functions have been arbitrarily designated by the author.
In order to set the critical values for membership functions in the models, the author calculated for all ratios the first and the third quartile, and median value separately for "good" and "bad" companies.The value of the third quartile of the "bad" firms was used as the threshold value for membership functions.These values are presented in Table 8.The set of rules used by the fuzzy decision model contains 16 rules for analysis of companies one year prior to bankruptcy and 25 rules for analysis with an increased period of forecast.

Ratio Symbol Threshold value for membership function
Extending the length of prediction to two years prior to insolvency required supporting the models (both fuzzy logic and artificial neural networks) with a larger amount of financial information, i.e. financial ratios.
The structure of the fuzzy logic model created for one year and two years prior to bankruptcy is presented in Figure 8 (Figure 8 presents the use of financial ratios for two years analysis, in case of one year analysis the structure is the same, but used financial ratios are different -see table 8).The model consists of four inputs (financial ratios) in one year prior bankruptcy, five inputs (financial ratios) in two years prior financial failure and one rule block in both years.The model's output is a variable representing a forecast of the financial situation of an audited company.This variable ranges from 0 to 1, while it is The exemplary form of the membership functions are presented in Figure 9 for the variable "X3_2" and in Figure 10 for variable "X8_2".After creating the two fuzzy logic models the author, using the same financial ratios, programmed two artificial neural networks based on the same learning dataset.The aim of such a research approach is to compare the effectiveness of an innovative forecasting method in economics -fuzzy logic (until 2006, the use of fuzzy logic in finance and economics was practically unknown4 ), with the most popular method of soft computing techniques.By using the same population of enterprises to develop models, author is able to verify their effectiveness and to identify the most effective model.
In the last stage of this research, the author analyzed the efficiency of the discriminant analysis model created by Altman in forecasting business bankruptcy one year and two years before, based on testing dataset "one" and "two".The form of this model can be found in Section 2 of this chapter.The aim of such comparison is to analyze the usefulness of the first bankruptcy model created in 1968 (which is still the most popular and widely used in the business world) on the same population of companies as in case of developed fuzzy logic and artificial neural network models.

The results
The results obtained from testing the two fuzzy logic models and two artificial neural networks developed against the bankruptcy risk of enterprises while testing dataset "one" and "two" are presented in Table 9.
The tests carried out on dataset "one" showed in the analysis one year prior to bankruptcy that the fuzzy logic model obtained 87.03% effectiveness.The same effectiveness was generated by the artificial neural networks model.Table 9 shows, however, that as the forecasting period increases to two years before bankruptcy, the fuzzy logic model is characterized by much better predictive properties than the artificial neural networks model (83.33% vs. 68.51%).In both years of analysis, the discriminant analysis model was worse than the fuzzy logic model (by 9.26 percentage points -one year before, and by as much as 18.52 percentage points -two years before) and artificial neural networks (by 9.26 percentage points -one year before, and by 3.7 percentage points -two years prior to bankruptcy).It is also necessary to point out that in the fuzzy logic model case the decrease of effectiveness with increased period of forecast is the smallest compared to the other two  Similarly at it was in case of consumer credit scoring, due to the equal distribution of bankrupt and non-bankrupt companies in the testing dataset "one", the author treats this research approach as a theoretical possibility test of the predictive power of methods used.
From the viewpoint of the practical applicability of these methods in business, the conclusions from the tests conducted on testing dataset "two", which contained 81% companies with good financial condition and less than 19% firms at risk of insolvency, are more important to analyze. Figure 12 shows that in such circumstances, the fuzzy logic model achieved greater overall effectiveness:  in the analysis one year prior to bankruptcy S1: by 8.34 percentage points better than artificial neural network and by 23.49 percentage points better than the discriminant analysis model (effectiveness: 81.06% vs. 72.72%and vs. 57.57%); in the analysis two years prior to bankruptcy S2: by 3.03 percentage points better than artificial neural network model and by as much as 15.90 percentage points better than the discriminant analysis model (effectiveness 65.90% vs. 62.87% and vs. 50%).
It is also worth mentioning that despite a small difference of overall effectiveness S2 in analysis of two years prior to bankruptcy between fuzzy logic model and artificial neural networks (65.90% vs. 62.87%) -figure 12, the artificial neural networks generated six times greater I type errors E1 than fuzzy logic model (24% vs. 4%), and discriminant analysis model made seven times greater errors of such type than fuzzy logic model (28% vs. 4%) -see figure 13.As it was explained before -such errors are much more costly to make by banks than II type errors.
Figure 13 shows also that discriminant analysis model additionally generated much greater II type errors E2 than fuzzy logic and artificial neural networks.
Evaluating I type (E1) and II type (E2) errors in one year prior financial failure of enterprises, it can be said that discriminant analysis model made only 8 percentage points greater I type errors than both fuzzy logic and artificial neural network model (24% vs. 16%) -figure 14.But there is a huge difference in II type errors between analyzed models.Figure 14 shows that DA model generated as much as 46.72% of II type errors, while fuzzy logic model only 19.62%.The above conclusions regarding the overall effectiveness, I type and II type errors proved the superiority of developed fuzzy logic models for both years of analyses over the model of discriminant analysis and artificial neural networks.

Conclusions
The research conducted showed that it is worth developing such early warning models.All presented fuzzy logic models in the chapter are characterized by high forecasting effectiveness.The author has proven that fuzzy logic can be a very useful and powerful tool in financial analysis, even though the use of fuzzy logic in finance was practically unknown until 2006.Therefore, it is one of the first attempts at using fuzzy logic to predict enterprise and consumer bankruptcy in worldwide literature.The developed bankruptcy prediction models presented in this chapter can be easily used by financial managers as a decisional aid tool in the process of evaluating the financial situation of enterprises and consumers.
It should be emphasized that the fuzzy logic models presented have high practical values.
Due to the fact that these models are an "open" application, a person interested in its use can not only use them in their current form, but can also easily modify them for their own needs.For example, a person managing an international company can add exchange rate as a risk factor to the model.The number of model adaptations is virtually unlimited by transforming the set of decision rules for individual needs.
The models presented are superior to even the sophisticated methods of artificial intelligence, such as artificial neural network models, not only in terms of effectiveness achieved, but also in terms of three aspects: explicit knowledge, -ability to explain how to solve the problem (which is in opposition to the model of artificial neural network, which operates on the "black box" principle), -quick and easy updates to changing economic conditions.In the case of statistical models and artificial intelligence models the desire to change the model involves the need to re-estimate the entire model.
It is necessary to note that the aim of this paper was to evaluate the efficiency of fuzzy logic model in forecasting the financial situation of companies and households and to give the reader "the opened" structure of fuzzy logic model, that can be easily adopted to changed economic situation in the country or even adopted for implementation in different country or region of the world.Therefore, despite the fact that the presented research (both consumer and business credit scoring) is based on financial data from the years 2000 -2007, it is still valid (the value of variables used did not change significantly in the economy) and useful tool to use nowadays and in future with adopting individual variables (for examplethe monthly income of customer etc.).To summarize, this chapter provides the reader with practical models that can be used in financial management.Such models are an useful tool that can be both updated with the passage of time, and adopted for individual needs.
The conclusions of these studies can also be applied to other European, American or Asian companies and consumers.

Fig. 1 .
Fig. 1.An Example of the Trapezoidal Membership Function for the Cash Liquidity Ratio Value of the cash liquidity i

Fig. 2 .
Fig. 2.An Example of the Trapezoidal Membership Function for the Age of Consumers.

Fig. 3 .
Fig. 3.The Life Cycle of the Bankruptcy Prediction Model.

Fig. 4 .
Fig. 4. Structure of the Fuzzy Logic Model for Consumer Credit Scoring.

-
Error Type I -E 1 = D 1 / BR * 100%, where D 1 -number of consumers who did not repay the credit classified by the model as "good" clients, BR -number of "bad" consumers in the testing set; -Error Type II -E 2 = D 2 / NBR * 100%, where D 2 -number of non-bankrupt consumers classified by the model as a "bad" clients, NBR -number of "good" consumers in the testing set; -Overall effectiveness -S = {1 -[(D 1 + D 2 ) / (BR + NBR)]} * 100%.

Fig. 8 .
Fig. 8.The Complete Block Diagram of the Fuzzy Logic Model for Business Credit Scoring

Fig. 11 .
Fig. 11.Architecture of the Artificial Neural Network Model for Evaluating Polish Enterprises in the Analysis of Two Years Prior To Bankruptcy

Fig. 13 .
Fig. 13.The Results of Generated I and II Type Errors by Fuzzy Logic Model (FL), Artificial Neural Network (ANN) and Discriminant Analysis Model (DA) in Forecasting Business Bankruptcies -Testing Dataset "Two" -25:107 -Two Years Prior Bankruptcy.

Fig. 14 .
Fig. 14.The Results of Generated I and II Type Errors by Fuzzy Logic Model (FL), Artificial Neural Network (ANN) and Discriminant Analysis Model (DA) in Forecasting Business Bankruptcies -Testing Dataset "Two" -25:107 -One Year Prior Bankruptcy.

Table 2 .
Demographical and Financial Variables of Customers.

Table 8 .
The Threshold Values for Membership Functions Used in Both Fuzzy Logic Models.
The effectiveness of the fuzzy logic model decreased by 3.7 percentage points (from 87.03% one year before bankruptcy to 83.33% two years prior to insolvency).In the case of the artificial neural network effectiveness decreased by 18.52 percentage points (from 87.03% to 68.51%) and in the case of the discriminant analysis model prediction quality decreased by 12.96 percentage points (from 77.77% to 64.81%). www.intechopen.commodels.

Table 9 .
The Results of Effectiveness of Fuzzy Logic Model (FL), Artificial Neural Network (ANN) and Discriminant Analysis Model (DA) in Forecasting Business Bankruptcies (parentheses contain the number of misclassified firms).