Next Article in Journal
Optimal Scheduling of Residential Home Appliances by Considering Energy Storage and Stochastically Modelled Photovoltaics in a Grid Exchange Environment Using Hybrid Grey Wolf Genetic Algorithm Optimizer
Next Article in Special Issue
Emotion AI-Driven Sentiment Analysis: A Survey, Future Research Directions, and Open Issues
Previous Article in Journal
Feasibility Study of the Installation of Wave Energy Converters in Existing Breakwaters in the North of Spain
Previous Article in Special Issue
Application of Technological Solutions in the Fight Against Money Laundering—A Systematic Literature Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Currency Crises Prediction Using Deep Neural Decision Trees

by
David Alaminos
1,
Rafael Becerra-Vicario
2,*,
Manuel Á. Fernández-Gámez
2 and
Ana J. Cisneros Ruiz
2
1
Department of Computer Science, University of Málaga, 29071 Málaga, Spain
2
Department of Finance and Accounting, University of Málaga, 29071 Málaga, Spain
*
Author to whom correspondence should be addressed.
Appl. Sci. 2019, 9(23), 5227; https://doi.org/10.3390/app9235227
Submission received: 14 October 2019 / Revised: 14 November 2019 / Accepted: 29 November 2019 / Published: 1 December 2019

Abstract

:

Featured Application

The superiority of a novel computational technique (deep neural decision trees) for prediction of currency crises over other methodologies and the construction of new crisis prediction models more precise than existing ones.

Abstract

Currency crises are major events in the international monetary system. They affect the monetary policy of countries and are associated with risks of vulnerability for open economies. Much research has been carried out on the behavior of these events, and models have been developed to predict falls in the value of currencies. However, the limitations of existing models mean further research is required in this area, since the models are still of limited accuracy and have only been developed for emerging countries. This article presents an innovative global model for predicting currency crises. The analysis is geographically differentiated for regions, considering both emerging and developed countries and can accurately estimate future scenarios for currency crises at the global level. It uses a sample of 162 countries making it possible to account for the regional heterogeneity of the warning indicators. The method used was deep neural decision trees (DNDTs), a technique based on decision trees implemented by deep learning neural networks, which was compared with other methodologies widely applied in prediction. Our model has significant potential for the adaptation of macroeconomic policy to the risks derived from falls in the value of currencies, providing tools that help ensure financial stability at the global level.

1. Introduction

Currency crises can have a catastrophic impact on the real economy in a short space of time. In general, they occur when there is a sudden devaluation in a currency, often resulting in a speculative attack on the international currency market. Currency crises can also occur as a result of high balance of payments deficits or when governments are unable to restore the value of their currency after a fall in its price in the markets.
One of the first currency crises occurred in 1992 when many European countries faced a crisis as part of the Exchange Rate Mechanism (ERM). Another episode was the currency crisis suffered by the Mexican peso in December 1994. This crisis began with an abrupt decision by the Mexican government to devalue its currency, causing a crash in the peso days later and an economic crisis that resulted in a sharp drop in GDP. However, the biggest event has been the Asian Financial Crisis in 1997. The crisis began with the sharp devaluation of the Thai baht and was the first to show the effect of contagion on other countries. However, the event was about more than just speculation on the Thai currency and saw the collapse of Asian stock markets. The financial crisis that began with the devaluation of the Thai baht exchange rate resulted in a sharp increase in interest rates and the collapse of many companies, as well as an increase in the cost of credit and a general fall in GDP in the region [1]. This resulted in foreign and national investors pulling out investment. Not only did this crisis affect Asian countries, but it also had a negative impact on other emerging economies, especially in Latin America, showing that currency crises are not limited to a specific economy. Globalization can increase the economic difficulties of societies and affect the structure of national economies after the real economy has suffered a damaging impact [2]. Figure 1 shows the number of currency crises per year at the international level.
On the other hand, it is interesting to influence the economic consequences that currency crises can cause. Reference [3] demonstrated that a currency crisis makes it difficult to design an optimal monetary policy, making the setting of the interest rate a dilemma; since, if it increases, it makes it difficult to lend money to companies, and, if it decreases, it devalues the debt denominated in foreign currency. They concluded that the best decision is to reduce the interest rate, thanks to the continuous international financial development and the increase in credit flows. Following this argument, some works indicated that currency crises deteriorate the balance sheets of companies based on the fact that, if prices are rigid, a depreciation of the currency leads to an increase in the obligations of payment of the debt in the foreign currency of companies, causing a fall in their profits [4,5]. This reduces the borrowing capacity of companies and, therefore, investment and production in an economy with credit limitations which, in turn, reduces the demand for the national currency and leads to depreciation. Other authors presented a general equilibrium model of currency crises and how they are driven by credit restrictions and rigidity of nominal prices [6,7,8]. They showed that an increase in the interest rate to support the currency in crisis may not be effective, but that relaxation of short-term loan facilities can make this policy effective by mitigating the increase in interest rates for companies [9]. In addition to interest rate policy being an instrument to end a currency crisis, intervention in the foreign exchange market is also a measure to stabilize inflation and production as a result of this type of crisis. They demonstrated how intervention in the foreign exchange market improves the situation of the economy, regardless of the exchange rate regime chosen by the country. It can achieve great results if the economy encounters imperfect capital mobility/asset substitutability movements, producing the same result as discretionary monetary policy and without jeopardizing the inflation target [9,10,11].
To avoid future crises, researchers have tried to identify common factors underlying exchange rate instability and develop predictive models. However, despite impressive results for in-sample, the existing early warning models encounter difficulties when it comes to predicting crises outside it [12,13,14].
In recent years, there has been considerable research on currency crises, mainly on the application of computational techniques for emerging economies. Statistical methods have also been used, albeit with limited success. For example, Reference [12] applied extreme value theory, obtaining an accuracy of 44%. Reference [15] developed a discrete choice early warning system considering the persistence of the phenomenon of the crisis. Their logistic regression system used a maximum likelihood estimation method both country-by-country and in a panel framework. The model obtained predictive capacity that significantly improved the existing static models, both inside and outside the sample (89.8% and 90.2%, respectively).
Reference [1] used computational combinations with support vector machine (SVM), logistic regression, and logical analysis of data tree (LADTree), based on the k-nearest neighbor. The results showed that the computational classifiers were more accurate than the traditional statistical methods, obtaining a level above 90%. Reference [2] individually used SVM for the currency crisis in Argentina, obtaining a high level of robustness. Similarly, Reference [13] studied currency crises in developed countries using the classification and regression tree methodology (CART) and random forest (RF). Their findings determined that significant factors included high short-term domestic interest rates and overvalued exchange rates. Reference [16] compared logistic regression, neural networks (NNs), and decision trees (DTs) to predict the currency crisis in Turkey, with NNs achieving the highest level of accuracy. Also for Turkey, Reference [17] used logistic regression to analyze the determinants of the currency and banking crisis. The study found that currency crises are caused by an excessive fiscal deficit, short-term increases in external debt, overvaluation of the Turkish lira, and adverse external shocks, confirming the results obtained by other studies based on the experiences of emerging countries [18,19].
This study attempted to build more accurate models for predicting currency crises. To do so, we developed models for four regions of the world (i.e., Latin America, Asia, Africa, and the Middle East and Europe) together with a global model for all world regions. This study thus sought to address a gap in the literature, which requires broader models that can provide powerful and homogeneous empirical tools for public institutions in different countries. It did this using the deep neural decision trees (DNDTs) methodology, developed in Reference [20], which allows for solutions to forecasting problems involving data outside of a sample, also one of the least resolved aspects in the existing literature. We compared this novel method in terms of accuracy with other popular methodologies used in time-series prediction such as regression logistic, neural networks, support vector machines, and AdaBoost.
The rest of this article is organized as follows: Section 2 describes the DNDTs algorithm, and Section 3 summarizes the data and variables used as possible predictors. The results and their comparison with the existing literature are provided in Section 4. Finally, Section 5 summarizes the main conclusions.

2. Methodology

As already stated above, the DNDT algorithm was applied to solve the research question raised, but we have also used different methods in the construction of the currency crisis prediction model. The use of different methods aimed to achieve a robust model which is contrasted not only through a classification technique but also by applying all those that have shown success in the previous literature [1,2,12,13,14]. Specifically, logistic regression, artificial neural networks, support vector machines, and AdaBoost were used. A synthesis of the methodological aspects of each of these classification techniques appears below.

2.1. Logistic Regression

The logistic regression model (Logit) is a non-linear classification model, although it contains a linear combination of parameters and observations of the explanatory variables [21]. The logistic function is bounded between 0 and 1, thus providing the probability that an element is in one of the two established groups. From a dichotomous event, the Logit model predicts the probability that the event will or will not take place. If the probability estimate is greater than 0.5, then the prediction is that it does belong to that group, otherwise it would assume that it belongs to the other group considered. To estimate the model, we started from the quotient between the probability that an event will occur and the probability that it will not occur. The probability of an event occurring is determined by Expression (1).
P ( Y i = 1 x i ) = e ( β 0 + β 1 + X 1 + + β k X k ) 1 + e ( β 0 + β 1 + X 1 + + β k X k ) = 1 1 + e ( β 0 + β 1 + X 1 + + β k X k )
where β0 is the constant term of the model and β1, …, βk are the coefficients of the variables.

2.2. Support Vector Machines

Support vector machines (SVMs) have been shown to achieve good generalization performance over a wide variety of classification problems, where it is seen that SVM tends to minimize generalization errors, that is, classifier errors over new instances. In geometric terms, SVM can be seen as the attempt to find a surface (σi) that separates positive examples from negative ones by the widest possible margin [22,23,24].
The search that meets the minimum distance between it and an example of training is the maximum and is performed across all surfaces (σ1, σ2…) in the A-dimensional space that separates the positive examples from the negative in the training set (known as decision surfaces). To better understand the idea behind the SVM algorithm, we take the case in which the positive and negative examples are linearly separable; therefore, the decision surfaces are |A|-1-hyperplanes. For example, in the case of two dimensions, several lines can be taken as decision surfaces. In this circumstance, the SVM method chooses the middle element of the widest set of parallel lines, that is, from the set in which the maximum distance between two of its elements is the greatest. It should be noted that the best decision surface is determined only by a small set of training examples, called support vectors.
An important advantage of SVM is that it allows the construction of non-linear classifiers, that is, the algorithm represents non-linear training data in a high-dimensional space (called the characteristic space) and builds the hyperplane that has the maximum margin. In addition, due to the use of a kernel function to perform the mapping, it is possible to calculate the hyperplane without explicitly representing the feature space.
In the present work, the method of minimum sequential optimization (SMO) was used to train the SVM algorithm. In general, SMO divides a large number of quadratic programming (QP) problems that need to be solved in the SVM algorithm by a series of smaller QP problems.

2.3. Artificial Neural Networks (Multilayer Perceptron)

A multilayer perceptron (MLP) is a feedforward artificial neural network model of supervised learning which is composed of a layer of input units (sensors), another output layer, and a certain number of intermediate layers, called hidden layers, in so much that they have no connections with the outside. Each input sensor is connected to the units of the second layer and these in turn with those of the third layer, etc. The network aims to establish a correspondence between a set of input data and a set of desired outputs.
Reference [25] confirmed that learning in MLP is a special case of functional approximation, where there is no assumption about the model underlying the analyzed data. This process involves finding a function that correctly represents the learning patterns, in addition to carrying out a generalization process that allows to efficiently treat individuals not analyzed during said learning [26]. For this, we proceed to the adjustment of weights, W, from the information from the sample set, considering that both the architecture and the connections of the network are known, being the objective to obtain those weights that minimize the learning error. Given, then, a set of pairs of learning patterns {(x1, y1), (x2, y2) … (xp, yp)} and an error function ε (W, X, Y), the training process implies the search for the set of weights that minimizes the learning error E(W) [27], as expressed in Equation (2).
m i n W E ( W ) =   m i n W i   =   1 p ε ( W ,   x i ,   y i )

2.4. AdaBoost

AdaBoost is a meta-algorithm learning machine that can be used in conjunction with many other types of learning algorithms to improve its performance. The output of the other learning algorithms of the “weak” classifiers is combined in a weighted sum representing the final output of the driven classifier. AdaBoost is adaptive in the sense that weak posterior classifiers are adjusted in favor of those cases poorly classified by previous classifiers. AdaBoost is sensitive to noisy data and outliers. In some problems, however, it may be less susceptible to problems than other learning algorithms [28].
While each learning algorithm tends to adapt to some types of problems better than others, and usually has many different parameters and configurations to adjust before achieving optimal performance in a data set, AdaBoost (with decision trees such as weak classifiers) is often referred to as the best classifier outside the sample. Unlike neural networks and SVMs, the AdaBoost training process selects only those characteristics known to improve the predictability of the model, reduce dimensionality, and, potentially, improve the execution time of functions as irrelevant that do not need to be calculated.
AdaBoost refers to a method of training a driven classifier [29]. A boost classifier is designed as follows:
F T ( x )   =   t   =   1 T f t ( x )
where each ft is a weak learner that takes an object x as input and returns a result of real value that indicates the class of the object. The weak classifier output signal identifies the predicted object class and the absolute value gives confidence in that classification. Similarly, the T of the layer classifier will be positive if the sample is believed to be in the positive and negative class in another way.
Each weak classifier produces an output, the hypothesis h(xi), for each sample in the training set. In each iteration t, a weak learner is selected and assigned a coefficient αt such that the training error sum Et of the resultant t of the classifying pulse is minimized.
E t   =   i E [ F t 1 ( x i ) + α t h ( x i ) ]
where Ft−1 is the driven classifier that has been built up to the previous stage of the formation, E(F) is the error function, and ft (x) = αth(x) is the weak beginner being considered for the addition to the final classifier.

2.5. Deep Neural Decision Trees (DNDTs)

Deep neural decision trees are DT models executed by deep-learning NNs, where a configuration of DNDT weightings corresponds to a specific decision tree and is thus interpretable [20]. Nevertheless, as DNDT is performed by the NN, it has several different properties of conventional DTs: DNDTs can be implemented from the NN structure in software such as Python (Pytorch). All parameters are optimized simultaneously with stochastic gradient descent (SGD) instead of a complex greedy splitting procedure; this allows large-scale processing with mini-batch-based learning and can be connected to any larger NN model for end-to-end learning with backward propagation. Continuing with this explanation, conventional DTs learn through a greedy and recursive division of characteristics [30]. This may have benefits with respect to the selection of functions; however, this greedy search may become inefficient [31]. Some recent work explores alternative approaches to train decision trees that aim to achieve better performance, for example, with a latent variable structured prediction [31]. On the other hand, a DNDT is much simpler, but we can still find the best solutions compared to conventional DT inductors when looking for the structure and parameters of the tree with SGD. Finally, while conventional DT inductors only use binary divisions to simplify, DNDT can also work with arbitrary cardinality divisions which can sometimes generate more interpretable trees. The algorithm begins by implementing a soft binning function to calculate the error rate for each node, making it possible to make decisions divided into DNDTs [32]. In general, the input of a binning function is a real scalar x which generates an index of the containers to which x belongs. Assuming x is a continuous variable, group it into n + 1 intervals. This requires n cut-off points which are trainable variables in this context. The cut-off points are denoted as (β1, β2, …, βn) and are strictly ascending such that β1 < β2 < … < βn.
The activation function of the DNDT algorithm is implemented based on the NN defined in Equation (1).
π = fw,b,τ (x) = softmax((wx + b)/τ)
where w is a constant with value w = [1, 2, …, n + 1], τ > 0 is a temperature factor, and b is defined in Equation (6).
b = [0, −β1, −β1, −β2, …, −β1 − β2 − … − βn]
The NN defined in Equation (1) gives a coding of the binning function x. Additionally, if τ tends to 0 (often the most common case), the vector sampling is implemented using the Straight-Through (ST) Gumbel–Softmax method [33].
Given the binning function described above, the key idea is to build the DT using the Kronecker product. Assuming we have an input instance x ∈ RD with D characteristics. Associating each characteristic xd with its own NN fd (xd), we can determine all the final nodes of the DT, in line with Equation (7).
z = f1(x1) ⊗ f2(x2) ⊗ … ⊗ fD(xD)
where z is now also a vector that indicates the index of the leaf node reached by instance x. We assume that a linear classifier on each leaf z classifies the instances that reach it. The number of cut points per feature is the complexity parameter of the model. The cut-off point values are not limited, which means that some of them may be inactive. For example, they are smaller than the minimum xd or greater than the maximum xd.
With the method described so far, we can route the input instances to the leaf nodes and classify them. Therefore, training a decision tree becomes a matter of training the cut-off points of the container and the sheet sorters. Since all steps forward are differentiable, all parameters can be trained directly and simultaneously with SGD.
The DNDT scales well with the number of inputs due to the training of the mini-batches of the NN. However, the main drawback of the design is the use of the Kronecker product, which means it is not scalable in terms of the number of characteristics. In our current implementation, we avoided this problem by using broad datasets, training a forest with a random subspace [34]. This involved introducing multiple trees and training each with a subset with random characteristics. A better solution that does not require a forest of hard interpretability involves exploiting the dispersion of the binning function during the learning since the number of non-empty leaves grows much slower than the total.

2.6. Sensitivity Analysis

While DTs have a high explanatory capacity, when numerous exploratory variables are used, we need indicators to show the determined impact of these variables. Sensitivity analysis is used for this purpose, allowing the quantification of the relative significance of the independent variables related to the dependent variable [35]. The DT models used in this study build an appropriate measure of significance as shown in Table A3. The sensitivity analysis is also used to reduce the models to the most significant variables, eliminating or ignoring those of lesser significance. A variable is considered more significant than another if it increases the variance compared to the set of variables of the model. Each DT model generates significance scores for each independent variable. This is done using the Sobol method [36], which decomposes the variance of the total output V(Y) in line with the equations in Equation (8).
V ( Y ) = i V i + i j > 1 V i j + + V 12 k
where V i = V ( E ( Y | X i ) ) and V i j = V ( E ( Y | X i , X j ) ) V i V .
The sensitivity indexes are determined by Si = Vi/V and Sij = Vij/V, where Sij indicates the effect of the interaction between two factors. The Sobol decomposition allows the estimation of a total sensitivity index STi which measures the sum of all the sensitivity effects involved in the independent variables.

2.7. Research Steps

The empirical research for predicting currency crises involved five steps: Creating the sample, data preprocessing, model construction, accuracy assessment, and classification and prediction as shown in Figure 2. The first step (sample creation) was based on obtaining the relevant data from the data sources such as information published by international economic bodies. The attributes of the dataset include measurements of exposure to debt, the external sector, domestic macroeconomic factors, the banking sector, and political attributes. The data preprocessing step involved making the attributes with continuous values discreet, generalizing data and analysis of the relativity of the attributes, and eliminating outlier values. Regarding outliers values, since the deletion of elements of the sample implies a loss of information, only the ends that do not belong to the interval have been suppressed:
(Q1 − 3RQ, Q3 + 3RQ)
where Q1 is the first quartile, Q3 is the third quartile, and RQ is interquartile range.
The step of constructing the model was based on inductively learning from the preprocessed data using the DNDT algorithm defined in Section 2 and choosing the significant independent variables via the proposed sensitivity analysis. To do so, the sample was randomly divided into three mutually exclusive datasets: Training (70%), validation (10%), and testing (20%). This process used the 10 fold cross-validation method with 500 iterations to estimate error ratios [37]. The first subset of data was used to train the models and estimating the parameters. The second subset was used for model selection. Finally, the third dataset (testing) was used to evaluate the predictive accuracy of the model in the accuracy assessment step. This was complemented by the analysis of the model’s robustness and its predictive capacity for currency crises at the global level in the classification and prediction step. All variables used in this study were considered in every dataset of training, validation, and testing data

3. Data and Variables

The sample used in this study comprised 162 developed, emerging, and developing countries with information for the period 1970–2017 (Appendix A). The granularity of the data was annual, following the format data of previous works [1,12,38]. The dataset of the present study had 7708 observations, being 236 crisis observations. Specifically, a set of 32 explanatory variables chosen from the existing literature on the prediction of currency crises was obtained. Of these, 23 corresponded to factors related to debt exposure, the external sector, domestic macroeconomy, and the banking sector [1,14,15,17,19]. This information was sourced from the International Monetary Fund (IMF) International Financial Statistics, World Bank Development Indicators, World Economic Outlook, and the World Bank Global Financial Database. The nine remaining variables refer to political factors and have been extracted from the database of the Polity IV Project of Center for Systemic Peace, selecting the variables used in Reference [39]. The dependent variable was constructed based on the definition in Reference [38]: “a currency crisis is defined as a nominal depreciation of the currency with respect to the US dollar by at least 30% and at least 10 percentage points higher than the depreciation rate for the previous year”. This dependent variable was 1 for the years in which currency crises occurred and 0 otherwise. The choice of countries was mainly guided by the availability of data, covering four main regions: Africa and the Middle East, South and East Asia, Latin America, and Europe. Table 1 shows the independent variables used in this research.

4. Results

4.1. Descriptive Statistics

The main descriptive statistics for the variables of the sample are provided in Table 2. Episodes of currency crises (dependent variable = 1), compared to the absence of these episodes (dependent variable = 0), are characterized by higher average levels of public debt (Total Debt and Short-Term Debt), less openness to the rest of the world (Trade Openness, Imports, and Exports), and alarming results in certain macroeconomic indicators like Real GDP Growth and Inflation. In contrast, the remaining variables have lower average values. There is also a moderate dispersion in the distribution of the variables analyzed which can be extended to the sample as a whole.

4.2. Estimated Models

Table 3 shows the levels of precision (in percentage) reached in the classification of the currency crises of the methodologies applied in the present study for the three data sets: Training, validation, and testing. In greater order to less accuracy, it is shown that in all models, the DNDT method was the one that achieved greater classification capacity, followed by AdaBoost, MLP, SVM, and Logit.
Figure 3 shows the results obtained using DNDTs for the models in each region and the global model. The classification accuracy obtained using the training data was 99.17%, 98.42%, 99.68%, 100%, 99.16% for the models for Africa and Middle East, Latin America, South and East Asia, Europe, and Global, respectively. The accuracy obtained using the validation was 98.85%, 97.79%, 99.03%, 99.61%, and 98.87% for the models for Africa and Middle East, Latin America, South and East Asia, Europe, and Global, respectively. Finally, the accuracy for the testing data was 98.24% for Africa and Middle East, 96.90% for Latin America, 98.54% for Asia, 99.07% for Europe, and 98.43% for the Global model. Figure 4 shows the accuracy rates obtained for each model in the 500 calculation iterations.
The goodness-of-fit for the models developed was measured by both the corresponding ROC curves and root mean square error (RMSE). The area of the ROC curve for the five models was close to 1, indicating satisfactory levels in all cases (Figure 5). The RMSE for the 500 iterations in the estimations with the test data is shown in Table 4 and Figure 6. The RMSE was less than 0.30 in all models, also showing a close fit for all models.
Figure 7 shows the most significant variables for each model in line with the sensitivity analysis (Appendix B shows the sensitivity of all the variables). The results show a group of significant variables that are repeated in practically all the estimated models. The variable Fixed Capital Formation was significant in all models, showing the significance of the change in the net investment of a country for the risk of a currency crisis. This result contradicts the previous experience in Reference [40], for which this variable was not significant. Regarding the domestic macroeconomic variables, those for monetary supply (M2 Multiplier Growth and M2/Reserves) were also highly significant, showing that a surge in money supply was detrimental to the currency price (also corroborated by the sensitivity of the variable REER Overall in the majority of models). Similarly, variables for the External Sector attribute, such as Trade Openness, FDI and Current Account, were highly sensitive, indicating the significance of the behavior of a country’s international trade on its currency price. This is in contrast to the findings of previous studies [1,15,41]. Similarly, the variables Total Debt and Government Spending (related to the accumulation of debt) were also highly significant, showing that high public debt ratios increase the risk of currency crises. Finally, the most significant political variables in our models were SFI (Latin America and Global), which shows the capacity of the government to make and implement public policy, and Polity which indicates the level of democracy of a country. Existing literature has not found these political variables to be significant [39]. The results also differ in terms of the variables for the banking sector which have been significant in previous work [6,7] but which did not exhibit a high level of sensitivity in our estimations.
The results of this study confirm that the models developed using DNDTs obtained a predictive capacity of nearly 100% for currency crises in both regional models and the global model, obtaining higher levels of accuracy than previous studies. The accuracy of the global model was 96.38%, although a comparison of this model is difficult, since it is the first model created to protect currency crises at the global level. Other studies have obtained lower levels of accuracy than our results, such as Reference [6], which obtained an accuracy of 84.62% using the dynamic panel model. Similarly, we also improved on the results obtained by Reference [16] which obtained 93.8% accuracy using NN for Turkey. Our methodology also had greater predictive power than other computational techniques like kNN-SVM, which obtained 97% accuracy for a sample of emerging countries [1] and random forests and wavelet transform, recently applied in Reference [42] to a sample of emerging and underdeveloped countries (ROC value = 0.94).

5. Conclusions

Currency crises constitute an area of international concern that has received interest from macroeconomic researchers and public policymakers in recent decades. Our results show that DNDTs improve the accuracy of predictive models for currency crises. They also improve the quality of information for policymakers in the regions under consideration who require empirical tools to mitigate and resolve the impact of a sharp fall in the value of their currency and the negative effects. Our models may also be of particular relevance to financial institutions, such as rating agencies and central banks, which need to control the risk of a potential imminent crisis.
The DNDT algorithm exhibited high predictive capacity in the case analyzed as a result of using NNs to implement DTs. The algorithm also improved the interpretation of results and the quality of information. The results are more accurate than in the existing literature, taking into account the requirement of the samples used in this study.
The results of this study have also suggested a new set of variables to predict currency crises. In this respect, the significance of variables for the external sector and domestic macroeconomy stands out, suggesting they are the best indicators to predict a currency crisis at the global level. There are also a number of other variables for models adapted to the specific circumstances of Asia and Europe, and Africa and Latin America, in which the political and domestic credit variables stand out.
Given the significance of the issue addressed in this study, presenting a global forecasting model to address a gap in the existing literature and obtaining accuracy in the testing sample of over 96% represents significant progress in the challenging task of forecasting future currency crises. It also provides a unique international experience, simplifying and reducing the resources and effort for creating different models for predicting currency crises.

Author Contributions

This paper is the result of the joint work by all the authors.

Funding

This research was funded by Universidad de Málaga.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Table A1. List of Countries in the Sample.
Table A1. List of Countries in the Sample.
AlbaniaGabonNew Caledonia
AlgeriaGambia, TheNew Zealand
AngolaGeorgiaNicaragua
ArgentinaGermanyNiger
ArmeniaGhanaNigeria
AustraliaGreeceNorway
AustriaGrenadaPakistan
AzerbaijanGuatemalaPanama
BangladeshGuineaPapua New Guinea
BarbadosGuinea-BissauParaguay
BelarusGuyanaPeru
BelgiumHaitiPhilippines
BelizeHondurasPoland
BeninHungaryPortugal
Bhutan IcelandRomania
BoliviaIndiaRussia
Bosnia and HerzegovinaIndonesiaRwanda
BotswanaIran, I.R. ofSão Tomé and Principe
BrazilIrelandSenegal
BruneiIsraelSerbia, Republic of
BulgariaItalySeychelles
Burkina FasoJamaicaSierra Leone
BurundiJapanSingapore
CambodiaJordanSlovak Republic
CameroonKazakhstanSlovenia
CanadaKenyaSouth Africa
Cape VerdeKoreaSpain
Central African Republic.KuwaitSri Lanka
ChadKyrgyz RepublicSudan
ChileLao People’s Democratic RepublicSuriname
ChinaLatviaSwaziland
China: Hong KongLebanonSweden
ColombiaLesothoSwitzerland
ComorosLiberiaSyrian Arab Republic
Congo, Democratic Republic ofLibyaTajikistan
Congo, Republic ofLithuaniaTanzania
Costa RicaLuxembourgThailand
Côte d’IvoireMacedoniaTogo
CroatiaMadagascarTrinidad and Tobago
Czech RepublicMalawiTunisia
DenmarkMalaysiaTurkey

Appendix B

Table A2. Variable significance values of variables for currency crisis (Continued).
Table A2. Variable significance values of variables for currency crisis (Continued).
DjiboutiMaldivesTurkmenistan
DominicaMaliUganda
Dominican RepublicMauritaniaUkraine
EcuadorMauritiusUnited Kingdom
EgyptMexicoUnited States
El SalvadorMoldovaUruguay
Equatorial GuineaMongoliaUzbekistan
EritreaMoroccoVenezuela
EstoniaMozambiqueVietnam
EthiopiaMyanmarYemen
Fiji NamibiaYugoslavia, SFR
FinlandNepalZambia
FranceNetherlandsZimbabwe
Table A3. Variable significance values of variables for Currency Crisis.
Table A3. Variable significance values of variables for Currency Crisis.
VariablesAfrica and Middle EastLatin AmericaSouth and East AsiaEuropeGlobal
Total Debt0.0000.7260.1830.5860.439
Short Term Debt0.0000.0000.0240.2250.000
Real Interest Rate0.0000.0000.2040.0000.000
Foreign Exchange Reserves0.0000.0000.6340.0790.000
Trade Openness0.7481.2531.3510.0000.834
Imports0.0000.4150.0000.0000.000
Exports0.0000.0000.6570.1280.000
Current Account0.4830.0001.1810.0000.624
Portfolio Investments0.5310.0000.0000.1420.000
FDI1.1780.2170.1920.0550.375
Real GDP0.0001.1730.0000.0000.000
Real GDP Growth0.0000.0000.0000.0000.000
Inflation0.0000.0000.0000.0000.000
M2 Multiplier Growth1.7320.1860.0001.4941.248
M2/Reserves0.6200.0730.1550.0001.172
REER Overall0.2490.0000.3490.0000.597
Government Spending0.1840.1420.0000.0000.214
Fixed Capital Formation0.7850.5930.1720.8430.187
Unemployment0.0000.0000.0000.0000.000
Contagion0.0000.0000.0000.0000.000
Soft Peg0.0000.0040.0000.0000.000
Peg0.0000.0000.0000.0000.000
Domestic Credit0.6270.3010.0001.5180.000
Lending Interest Rate0.0000.0000.0000.0000.000
Deposit Interest Rate0.0000.0000.0000.0000.000
Polity0.4930.2390.1470.0000.382
Durable0.0000.0000.0000.0000.000
Persist0.0000.0000.1820.0000.000
SFI0.2110.0000.0850.2310.275
Left Government0.0000.1510.0000.0000.000
Election0.0000.0000.0000.0000.000
Turnover0.0000.0960.0000.0000.000
Years0.0000.0000.0000.0000.000
Economic Effectiveness0.0000.0000.0000.0000.000

References

  1. Ramli, N.A.; Ismail, M.T.; Wooi, H.C. Measuring the accuracy of currency crisis prediction with combined classifiers in designing early warning system. Mach. Learn. 2014, 101, 85–103. [Google Scholar] [CrossRef]
  2. Chaudhuri, A. Support Vector Machine Model for Currency Crisis Discrimination. arXiv 2014, arXiv:1403.0481. [Google Scholar]
  3. Aghion, P.; Bacchette, P.; Banerjee, A. A simple model of monetary policy and currency crises. Eur. Econ. Rev. 2000, 44, 728–738. [Google Scholar] [CrossRef]
  4. Aghion, P.; Bacchette, P.; Banerjee, A. Currency crises and monetary policy in an economy with credit constraints. Eur. Econ. Rev. 2001, 45, 1121–1150. [Google Scholar] [CrossRef]
  5. Korinek, A. The new economics of prudential capital controls: A research agenda. IMF Econ. Rev. 2011, 59, 523–561. [Google Scholar] [CrossRef]
  6. Aghion, P.; Bacchette, P.; Banerjee, A. A corporate balance-sheet approach to currency crises. J. Econ. Theory 2004, 119, 6–30. [Google Scholar] [CrossRef]
  7. Aghion, P.; Bacchetta, P.; Ranciere, R.; Rogoff, K. Exchange rate volatility and productivity growth: The role of financial development. J. Monet. Econ. 2006, 56, 494–513. [Google Scholar] [CrossRef]
  8. Gertler, M.; Gilchrist, S.; Natalucci, F.M. External constraints on monetary policy and the financial accelerator. J. Money Credit Bank. 2007, 39, 295–330. [Google Scholar] [CrossRef]
  9. Ghosh, A.R.; Ostry, J.D.; Chamon, M. Two targets, two instruments: Monetary and exchange rate policies in emerging market economies. J. Int. Money Financ. 2016, 60, 172–196. [Google Scholar] [CrossRef]
  10. Chamon, M.; García, M.; Souza, L. FX interventions in brazil: A synthetic control approach. J. Int. Econ. 2017, 108, 157–168. [Google Scholar] [CrossRef]
  11. Cavallino, P. Capital Flows and Foreign Exchange Intervention. Am. Econ. J. Macroecon. 2019, 11, 127–170. [Google Scholar] [CrossRef]
  12. Cumperayot, P.; Kouwenberg, R. Early warning systems for currency crises: A multivariate extreme value approach. J. Int. Money Financ. 2013, 36, 151–171. [Google Scholar] [CrossRef]
  13. Joy, M.; Rusnák, M.; Šmídková, K.; Vašíček, B. Banking and Currency Crises: Differential Diagnostics for Developed Countries. Int. J. Financ. Econ. 2017, 22, 44–67. [Google Scholar] [CrossRef]
  14. Chong, T.T.L.; Yan, I.K. Forecasting Currency Crises with Threshold Models. Int. Econ. 2018, 156, 156–174. [Google Scholar] [CrossRef]
  15. Candelon, B.; Dumitrescu, E.I.; Hurlin, C. Currency crisis early warning systems: Why they should be dynamic. Int. J. Forecast. 2014, 30, 1016–1029. [Google Scholar] [CrossRef]
  16. Sevim, C.; Oztekin, A.; Bali, O.; Gumus, S.; Guresen, E. Developing an early warning system to predict currency crises. Eur. J. Oper. Res. 2014, 237, 1095–1104. [Google Scholar] [CrossRef]
  17. Ari, A.; Cergibozan, R. Currency crises in turkey: An empirical assessment. Res. Int. Bus. Financ. 2018, 46, 281–293. [Google Scholar] [CrossRef]
  18. Rao, B.M.; Padhi, P. Common determinants of the likelihood of currency crises in BRICS. Glob. Bus. Rev. 2018. [Google Scholar] [CrossRef]
  19. Bucevska, V. Currency crises in EU candidate countries: An early warning system approach. Panoeconomicus 2015, 62, 493–510. [Google Scholar] [CrossRef]
  20. Yang, Y.; Garcia-Morillo, I.; Hospedales, T.M. Deep Neural Decision Trees. In Proceedings of the 2018 ICML Workshop on Human Interpretability in Machine Learning (WHI 2018), Stockholm, Sweden, 14 July 2018. [Google Scholar]
  21. Cox, D.R. Analysis of Binary Data, 2nd ed.; Routledge: New York, NY, USA, 2018. [Google Scholar]
  22. Hearst, M.A. Support vector machines. IEEE Intell. Syst. 1998, 13, 18–28. [Google Scholar] [CrossRef]
  23. Park, J.Y.; Yoon, Y.G.; Oh, T.K. Prediction of concrete strength with P-, S-, R-Wave velocities by support vector machine (SVM) and artificial neural network (ANN). Appl. Sci. 2019, 9, 4053. [Google Scholar] [CrossRef]
  24. Wang, B.; Ke, H.; Ma, X.; Yu, B. Fault diagnosis method for engine control system based on probabilistic neural network and support vector machine. Appl. Sci. 2019, 9, 4122. [Google Scholar] [CrossRef]
  25. Nuñez de Castro, L.; von Zuben, F.J. Optimised Training Techniques for Feedforward Neural Networks Technical Report DCA RT 03/98; Department of Computer Engineering and Industrial Automation, FEE/UNICAMP: Campinas, Brasil, 2001. [Google Scholar]
  26. Heidari, E.; Sobati, M.A.; Movahedirad, S. Accurate prediction of nanofluid viscosity using a multilayer perceptron artificial neural network (MLP-ANN). Chemom. Intell. Lab. Syst. 2016, 155, 73–85. [Google Scholar] [CrossRef]
  27. Lee, D.; Yeo, H. Real-Time Rear-End Collision-Warning System Using a Multilayer Perceptron Neural Network. IEEE Trans. Intell. Transp. Syst. 2016, 17, 3087–3097. [Google Scholar] [CrossRef]
  28. Alfaro, E.; García, N.; Gámez, M.; Elizondo, D. Bankruptcy forecasting: An empirical comparison of AdaBoost and neural networks. Decis. Support Syst. 2008, 45, 110–122. [Google Scholar] [CrossRef]
  29. Zhou, L.; Lai, K.K. AdaBoost Models for Corporate Bankruptcy Prediction with Missing Data. Comput. Econ. 2018, 50, 69–94. [Google Scholar] [CrossRef]
  30. Quinlan, J.R. C4.5: Programs for Machine Learning; Morgan Kaufmann Publishers Inc.: Burlington, MA, USA, 1993. [Google Scholar]
  31. Norouzi, M.; Collins, M.D.; Johnson, M.; Fleet, D.J.; Kohli, P. Efficient non-greedy optimization of decision trees. In Advances in Neural Information Processing Systems 28 (NIPS 2015); The MIT Press: Cambridge, MA, USA, 2015. [Google Scholar]
  32. Dougherty, J.; Kohavi, R.; Sahami, M. Supervised and unsupervised discretization of continuous features. In Proceedings of the Twelfth International Conference on Machine Learning, Tahoe City, CA, USA, 9–12 July 1995. [Google Scholar]
  33. Jang, E.; Gu, S.; Poole, B. Categorical reparameterization with Gumbel-Softmax. arXiv 2017, arXiv:1611.01144. [Google Scholar]
  34. Ho, T.K. The random subspace method for constructing decision forests. IEEE Trans. Pattern Anal. Mach. Intell. 1998, 20, 832–844. [Google Scholar]
  35. Delen, D.; Kuzey, C.; Uyar, A. Measuring firm performance using financial ratios: A decision tree approach. Expert Syst. Appl. 2013, 40, 3970–3983. [Google Scholar] [CrossRef]
  36. Saltelli, A. Making best use of model evaluations to compute sensitivity indices. Comput. Phys. Commun. 2002, 145, 280–297. [Google Scholar] [CrossRef]
  37. Tsamardinos, I.; Greasidou, E.; Borboudakis, G. Bootstrapping the out-of-sample predictions for efficient and accurate cross-validation. Mach. Learn. 2018, 12, 1895–1922. [Google Scholar] [CrossRef] [PubMed]
  38. Rother, B. The Determinants of Currency Crises a Political-Economy Approach; Palgrave Macmillan: London, UK, 2009. [Google Scholar]
  39. Laeven, L.; Valencia, F. Systemic Banking Crises Revisited; IMF Working Paper; WP/18/206; International Monetary Fund Publications: Washington, DC, USA, 2018. [Google Scholar]
  40. Boonman, T.M.; Jacobs, J.P.A.M.; Kuper, G.H.; Romero, A. Early Warning Systems for Currency Crises with Real-Time Data. Open Econ. Rev. 2019, 30, 813–835. [Google Scholar] [CrossRef]
  41. Karimi, M.; Voia, M.C. Empirics of currency crises: A duration analysis approach. Rev. Financ. Econ. 2019, 37, 428–449. [Google Scholar] [CrossRef]
  42. Xu, L.; Kinkyo, T.; Hamori, S. Predicting Currency Crises: A Novel Approach Combining Random Forests and Wavelet Transform. J. Risk Financ. Manag. 2018, 11, 86. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Number of currency crises in the world (1970–2017).
Figure 1. Number of currency crises in the world (1970–2017).
Applsci 09 05227 g001
Figure 2. Flowchart of the research.
Figure 2. Flowchart of the research.
Applsci 09 05227 g002
Figure 3. Accuracy rates for the training, validation, and testing data.
Figure 3. Accuracy rates for the training, validation, and testing data.
Applsci 09 05227 g003
Figure 4. Accuracy of the testing data for 500 iterations.
Figure 4. Accuracy of the testing data for 500 iterations.
Applsci 09 05227 g004
Figure 5. The ROC curves of the estimated models.
Figure 5. The ROC curves of the estimated models.
Applsci 09 05227 g005
Figure 6. The RMSE scores of the test data for 500 iterations.
Figure 6. The RMSE scores of the test data for 500 iterations.
Applsci 09 05227 g006
Figure 7. Sensitivity analysis.
Figure 7. Sensitivity analysis.
Applsci 09 05227 g007
Table 1. Independent variables.
Table 1. Independent variables.
CategoryCodeDefinitionExpected Sign 1
Debt ExposureTotal Debtgross external debt as % of GDP+
Short-Term Debtgross short-term external debt as % of GDP+
Real Interest Ratelending interest rate adjusted for inflation +
External SectorForeign Exchange Reservestotal reserves (without gold) as % of GDP
Trade Opennessratio of exports plus imports to GDP+/−
Importsimports of goods and services at current prices in USD+/−
Exportsexports of goods and services at current prices in USD
Current Accountcurrent account balance as % of GDP
Portfolio Investmentsportfolio investment net at current USD
FDInet FDI inflows as % of GDP
Domestic Macroeconomic FactorsReal GDPannual real GDP at current USD
Real GDP Growthannual growth of real GDP
Inflationrate of change in CPI+
M2 Multiplier Growthannual growth of M2+
M2/Reservesratio of M2 to foreign exchange reserves+
REER Overalldeviation of real effective exchange rate from 5 year rolling mean
Government Spendinggeneral government final spending as % of GDP+/−
Fixed Capital Formationgross fixed capital formation at current USD
Unemploymentunemployment total as % of total labor force+
Contagionevent of a currency crisis in any country of the same region (t − 1)+
Soft Peg 2exchange rate regime applied to currency to keep its value stable against a reserve currency+
Peg 2exchange rate regime in which a currency’s value is fixed against either the value of another country’s currency+
Banking SectorDomestic Creditratio of domestic credit to GDP+/−
Lending Interest Ratethe bank rate meets the short- and medium-term financing needs
Deposit Interest Raterate paid by banks for demand, time, or savings deposits
Political FactorsPolitycombined polity score (autocracy score minus democracy score)+/−
Durableregime durability (control variable of Polity)+
Persistpolity persistence (control variable of Polity)+
SFIstate fragility index+
Left Governmentleft-leaning government+
Electionlegislative/executive election+
Turnoverannual turnover of veto players+
Yearsyears in the office of chief executive’s party+
Economic Effectivenesseffectiveness of economic policy measured by GDP per capita
1 The expected relationship of the independent variable according to its influence to increase or decrease the probability of suffering a currency crisis. 2 It is denoted with 1 when the country applies this exchange rate regime for the year under consideration and 0 otherwise.
Table 2. Descriptive statistics.
Table 2. Descriptive statistics.
VariablesDependent Variable
01
MeanSD 2MeanSD 2
Total Debt57.21912.56563.81416.204
Short-Term Debt10.3817.05313.7257.824
Real Interest Rate5.7632.4227.4162.942
Foreign Exchange Reserves9.6088.64217.52213.458
Trade Openness61.5177.87456.1747.273
Imports 151,856344.56516,418245.637
Exports 153,783387.63216,976265.484
Current Account−2.5781.206−2.5331.384
Portfolio Investments 1−2.123362.859−114,665154.350
FDI1.9591.3624.0192.548
Real GDP 11,950,09078,250.93369,5914527.409
Real GDP Growth4.1571.5940.7051.062
Inflation18.4957.45237.8209.781
M2 Multiplier Growth0.1250.1260.2720.151
M2/Reserves485.46324.572502.84826.287
REER Overall112.77221.78385.25918.523
Government Spending15.5899.74724.17111.083
Fixed Capital Formation 156,025276.57417,199127.496
Unemployment9.3657.84214.04611.578
Contagion0.1380.0350.1920.370
Soft Peg0.1640.0420.2490.076
Peg0.0890.0170.1350.051
Domestic Credit52.76817.47873.72119.779
Lending Interest Rate34.04816.67522.46314.347
Deposit Interest Rate37.61718.42842.84323.362
Polity−1.0000.426−5.0000.618
Durable24.0002.16511.0001.482
Persist17.0002.4789.0001.247
SFI5.0001.82212.0002.151
Left Government0.4120.2370.5740.428
Election0.0960.0570.1260.084
Turnover5.5901.5735.4601.522
Years7.6932.5822.9422.165
Economic Effectiveness2.0001.5621.3001.257
1 Variables expressed in millions of USD. 2 Standard deviation.
Table 3. Comparison of accuracy ratios of deep neural decision trees (DNDTs) with other methodologies.
Table 3. Comparison of accuracy ratios of deep neural decision trees (DNDTs) with other methodologies.
ModelDatasetLogitMultilayer PerceptronSupport Vector MachinesAdaBoostDNDT
Africa and Middle EastTraining91.5294.4493.3895.2599.17
Validation90.8493.9192.5794.5798.85
Testing90.2593.6292.1894.1198.24
Latin AmericaTraining91.1694.1293.0495.0898.42
Validation90.7293.3792.6894.2197.79
Testing90.2092.8591.9593.3696.90
South and East AsiaTraining91.6495.0693.4796.1799.68
Validation91.0394.5293.0295.6499.03
Testing90.6294.1392.6195.1998.54
EuropeTraining92.1995.4393.8196.86100.00
Validation91.5895.1093.2296.4299.61
Testing90.8894.4692.9395.7399.07
GlobalTraining91.5994.8493.3395.9599.16
Validation90.9494.2792.6595.3498.87
Testing90.3793.7691.8394.2898.43
Table 4. The root mean square error (RMSE) scores of estimated models.
Table 4. The root mean square error (RMSE) scores of estimated models.
ModelRMSE
TrainingValidationTesting
Africa and Middle East0.130.150.19
Latin America0.210.250.24
South and East Asia0.120.160.18
Europe0.090.120.14
Global0.180.210.23

Share and Cite

MDPI and ACS Style

Alaminos, D.; Becerra-Vicario, R.; Fernández-Gámez, M.Á.; Cisneros Ruiz, A.J. Currency Crises Prediction Using Deep Neural Decision Trees. Appl. Sci. 2019, 9, 5227. https://doi.org/10.3390/app9235227

AMA Style

Alaminos D, Becerra-Vicario R, Fernández-Gámez MÁ, Cisneros Ruiz AJ. Currency Crises Prediction Using Deep Neural Decision Trees. Applied Sciences. 2019; 9(23):5227. https://doi.org/10.3390/app9235227

Chicago/Turabian Style

Alaminos, David, Rafael Becerra-Vicario, Manuel Á. Fernández-Gámez, and Ana J. Cisneros Ruiz. 2019. "Currency Crises Prediction Using Deep Neural Decision Trees" Applied Sciences 9, no. 23: 5227. https://doi.org/10.3390/app9235227

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop