Sovereign Debt and Currency Crises Prediction Models Using Machine Learning Techniques

Sovereign debt and currencies play an increasingly influential role in the development of any country, given the need to obtain financing and establish international relations. A recurring theme in the literature on financial crises has been the prediction of sovereign debt and currency crises due to their extreme importance in international economic activity. Nevertheless, the limitations of the existing models are related to accuracy and the literature calls for more investigation on the subject and lacks geographic diversity in the samples used. This article presents new models for the prediction of sovereign debt and currency crises, using various computational techniques, which increase their precision. Also, these models present experiences with a wide global sample of the main geographical world zones, such as Africa and the Middle East, Latin America, Asia, Europe, and globally. Our models demonstrate the superiority of computational techniques concerning statistics in terms of the level of precision, which are the best methods for the sovereign debt crisis: fuzzy decision trees, AdaBoost, extreme gradient boosting, and deep learning neural decision trees, and for forecasting the currency crisis: deep learning neural decision trees, extreme gradient boosting, random forests, and deep belief network. Our research has a large and potentially significant impact on the macroeconomic policy adequacy of the countries against the risks arising from financial crises and provides instruments that make it possible to improve the balance in the finance of the countries.


Introduction
The study of crisis events in international finance has received considerable attention in the field of economics over the last two decades, especially the prediction of sovereign debt and currency crises, due to their enormous importance in economic activity. This great research effort has produced a huge range of prediction models, supported in turn by varied methodologies [1][2][3][4].
The current importance of models for predicting crisis events is increased by the last global financial crisis, which showed that even developed countries, that is, those that in theory, are in a better situation and economic stability. The globalization process and economic development have led to the emergence of greater complexity in the macroeconomic and financial environment [1]. This has created a new space for research, and the demand to build new models to forecast this event, not just at the level of a country but to explain the common characteristics of these crises for a wide geographic spectrum [4,5].
One of the paths initially taken by the literature on the prediction of international financial crisis events was the development of models built with samples made up of

Literature Review
The review carried out on the sovereign debt and currency crisis prediction literature has allowed us to obtain precise conclusions on the studies carried out to date and on where future research should be oriented. In this sense, it has been found that, on the one hand, there are studies that aim to develop a prediction model to forecast some of the two mentioned crisis events, and that facilitate classifying countries as in a state of crisis or without crisis episodes. These are by far the majority of studies. This group could also include those whose model proposes to be an "early warning" in anticipation of the event of the crisis. On the other hand, it has also been found that in the last decade, global models have emerged to predict these crises, or with samples from various regions. These models have generally looked for the determinants of crises in countries of a relatively broad geographic region.

Sovereign Debt Crises Prediction
The existing literature on sovereign debt crisis prediction has focused mainly on emerging countries [7,10,11,[24][25][26][27][28]. For their part, some studies have addressed predictions of the sovereign debt crisis in emerging and developing countries [3,29,30]. Finally, refs. [5,31] modeled public debt default to predict it both for different regions (Africa, Latin America, Asia, and Europe) and globally. Among them, Reference [26] proved that not every crisis is the same: they vary according to if the government is faced with insolvency, lack of liquidity, or diverse macroeconomic risks. Besides, they characterized the group of fundamental elements that can be linked to a so-called "risk-free" zone. This is an important classification for discussing appropriate policy options to avoid crises and respond to them promptly.
Regarding the methods used, a considerable number of researchers have applied statistical methods to predict the sovereign debt crisis, highlighting the logit model [5,10,[24][25][26]29,32]. On the other hand, the authors [3,7] develop regression models to forecast the sovereign debt crisis. For their part, [11] applies a non-parametric method based on artificial neural networks (ANN). Finally, Reference [27] develops the application of the self-organization map (SOM), a display instrument based on ANN. Among them, Reference [11] concludes that thanks to the excellent versatility of ANNs and their nonlinear relationship approximation capability, an early warning system founded on ANN can, in certain conditions, improve on more conventional techniques. Reference [27] shows that the SOM is a viable tool to monitor sovereign default indicators, facilitating the monitoring of multidimensional financial data.
On the other hand, it is also found that previous studies have determined a series of significant variables in the previous literature in the prediction of the sovereign debt crisis. For example, Reference [11] exposes as explanatory variables the growth of Gross Domestic Product (GDP), the profitability of the US Treasury bill, and the level of external debt over total reserves. Other authors have shown that the interest rate of the US Federal Reserve has an essential role to play in increasing the probability of default [3,30]. Finally, Reference [5] shows that the country's total debt, the global interest rate, and the current account in the payment balance are the main determinants of the defaults of countries at the global level.
Finally, regarding the level of precision achieved in said sovereign debt crisis prediction literature, the studies by [10,24,25,29,30] stand out with a precision range between 70% and 80%. With a higher rank level (80-90%), we find the investigations of [3,5,11,26]. These last authors proposed a new crisis variable specification that allows for the prediction of new-onset of crises, and their results were more precise in comparison with those in the existing literature. They yielded a forecast capacity of 87% for the global model.

Currency Crises Prediction
The literature that has previously covered the prediction of currency crises has been mostly for emerging economies; therefore, the evidence is poor for advanced economies. Among the research from emerging countries, we highlight those of [2,12,[33][34][35][36][37][38]. Other authors have focused on Asian countries for currency crisis prediction [39][40][41][42]. For their part, Reference [43] investigates the differences in a common set of indicators used in early alert systems for currency crises in the situation of Jordan and Egypt. Reference [44] empirically analyzes the causes of currency crises for a set of Organisation for Economic Co-operation and Development (OECD) countries.
Regarding the methods used, a considerable number of researchers have applied statistical methods to predict the currency crisis, highlighting Logit [2,12,37,38,43,45], and Probit [44,46,47]. Also, previous studies have developed computational techniques such as RNA [6,33,40,41], auto-organization map [34], support vector machine (SVM) [35], and deep neural decision trees [48]. For their part, Reference [39] used a switching model of nonlinear Markov to carry out a systemic analogy and assessment of three different causes of currency crises: contagion, fundamentals, and soft economics. Reference [34] concluded that their model based on the self-organization map (SOM) is a viable tool to predict currency crises, obtaining an accuracy of 91.6%. For their part, Reference [35] showed that the support vector machine computing technique provides reasonably accurate results and helps policymakers to identify situations in which a currency crisis may occur.
Therefore, the previous literature shows a greater predictive capacity of machine learning methodologies over statistical methodologies. But this same literature shows that the results obtained so far are not enough and that this type of methodologies can achieve a higher level of precision [8,11]. Also, it is detailed in previous works that the use of data has been very limited in time horizon and geographic space, making it a challenge to increase it for future works [4,9,13]. Finally, there is a need to test different computational methodologies in the prediction of financial crises [3,5,10,12]. This is due to the weaknesses shown by some methodologies such as SVM and ANN on the difficulty of managing large databases and the difficulty of interpretation.

Methodologies
As previously stated, to resolve the research question, we used a variety of methods in the design of the crisis prediction models. Applying different methods aims to achieve a robust model, which is tested not only through one classification technique but also by implementing all previous classification techniques that have been successful in previous literature. Specifically, multilayer perceptron, support vector machines, fuzzy decision trees, AdaBoost, extreme gradient boosting, random forests, deep belief network, and deep learning neural decision trees have been applied. The following is a summary of the methodological aspects of each of these classification techniques.

Multilayer Perceptron
The multilayer perceptron (MLP) is an RNA methodology composed of a layer of input units, an output layer and other intermediate layers also called hidden layers. These last layers have no connections with the outside. The system is designed for supervised feedback. All the layers would be connected so that the input nodes are connected with the nodes of the second layer, these in turn with those of the third layer, and so on. The methodology aims to form a correspondence between a set of initial observations at the input with the set of outputs desired for the output layer.
The work [52] develops the MLP learning scheme as its case, in which initially there is no knowledge about the underlying model of the applied data. This scheme needs to find a function that captures the learning patterns, as well as a generalization process to be able to analyze individuals not included in the learning stage [53]. It is necessary to adjust the weights considering the sample data, assuming that the information on the architecture of the network is available, where the objective is to achieve weights that minimize the learning error. Therefore, given a set of pairs of learning patterns {(x1, y1), (x2, y2) . . . (xp, yp)} and an error function ε (W, X, Y), the training stage is It composes in identifying the set of weights that minimizes the learning error E (W) [54], as it appears in (1).

Support Vector Machines
Support vector machines (SVM) have registered good results when applied to problems of a very diverse nature, where the generalization error needs to be minimized. SVM is defined as the attempt to classify a surface (σ i ) that divides positive and negative data by as large a margin as possible [55].
All possible surfaces (σ 1 , σ 2 , . . . ) in the A-dimensional space that differentiates the positive data from the negative ones in the training observations are used to find the smallest possible distance. The positive and negative data are linearly separable and therefore the decision surfaces are |A|-1-hyperplanes. Attention must be paid to the best decision surface and is identified through a small set of training data called support vectors. SVM allows the construction of non-linear classifiers, that is, the algorithm represents non-linear training data in a high-dimensional space.
In our analysis, the minimum sequential optimization (SMO) method is applied to train the SVM algorithm. The SMO technique separates quadratic programming (QP) problems to be solved in SVM by smaller QP problems.

Fuzzy Decision Trees (FDT)
This is an algorithm based on the famous C4.5 technique where a decision tree is built based on characteristics that are composed of smaller subsets, basing the decision of the formation of the decision tree on the possibility of deriving a value from the information [56]. This algorithm can collect hidden information from large data sets and produce its own rules for optimal classification [57]. Therefore, C4.5 is made up of features such as the selection of attributes as root, the possibility of producing a branch for each value, and being able to repeat the process for each branch until all branch cases have the same class. The highest gain is used for the selection of attributes as the root, as expressed in Equation (2): where S is the set of cases, A is the attributes, n represents the partition number of the attribute A, and S i represents the number of cases in the partition i-th.
The result of Entropy is computed as appears in Equation (3): where S establishes the set of cases, n identifies the number of partitions of S, and p i represents the proportion of S. The fuzzy decision trees show an initial architecture identical to the decision trees developed at the beginning. Fuzzy decision trees allow observations to be developed in different branches of a node at the same time and with different levels of satisfaction in the interval (0-1) [58,59]. Fuzzy decision trees differ from standard decision trees because they apply division criteria related to fuzzy constraints, their inference techniques are different, and the fuzzy sets representing the observations should not change. On the other hand, the stimulus of the fuzzy decision tree is composed of two factors, such as a procedure to build a fuzzy decision tree and an inference development for decision making. The fuzzy modification has achieved better results in previous studies in comparison with the C4.5 algorithm [59].

AdaBoost
AdaBoost is a meta-algorithm-based learning technique that can be applied to other types of learning algorithms to increase your ability to hit. This procedure performs a weighted sum to obtain the result from the other algorithms, called weak classifiers, with the driven classifier such as AdaBoost. This classifier adapts to the rest of the weak algorithms to hit in favor of the cases badly classified by the previous classifiers. AdaBoost has the characteristic of being sensitive to samples with noise and outliers, but, in some classification problems, it may be less sensitive than other classifiers [60].
AdaBoost develops a particular technique of training a powered classifier [61]. A Boost classifier is a classifier composed as it shows in Equation (4): where a f t represents a weak learner which takes an object x as input and returns a real value result pointing out the class of the object. The predicted object class and absolute value show a level of confidence in the classification problem through the signal from the weak classifier output. For its part, the sign T of the classifier will be positive in the case that the sample is within a positive class, and negative otherwise. Every classifier indicates an output, the hypothesis h(x i ), for each sample in the training set. In iteration t, a weak classifier has chosen f t and provides a coefficient α t , so the training error adds E t , this classifier having the mission of minimizing the level of error, as shown in Equation (5).
where F t−1 represents the driven classifier generated in the prior step of training, E(F) defines the error function, and ft(x) = α t h(x) is the weak beginner that sums to the final classifier.

Extreme Gradient Boosting (XGBoost)
XGBoost is an algorithm based on increasing the gradient and has shown superior predictive power to many computational methodologies widely used in the previous literature [58,62,63]. It is an algorithm that can be applied to supervised learning situations and is made up of sets of regression and classification trees (CART). Initially, the variable to be predicted can be defined as yi, XGBoost is defined as it appears in Equation (6).
where K represents the total number of trees, f k for the tree, kih defines a function in the functional space F, and F shows the possible set of all CARTs. For the trained and trained CART, they will try to mimic the level of residues thrown by the model in the training step. The objective function is optimized in step (t + 1) as defined in Equation (7).
where l (.) represents the loss function in the training step, y i, shows the validation value in this training step,ŷ (t) i describes the prediction value in step t, and Ω( f i ) is fixed starting the regularization defines in Equation (8).
In this Equation (8), T represents the number of leaves and w j defines the score obtained for the sheet jth. Once optimized (8), the expansive Taylor rule is applied to carry out the descent of the gradient and collect different loss functions. Significant variables are chosen during the training step as a node in the trees, eliminating non-significant variables.

Random Forests
Random forests (RF) are an ensemble method that averages the forecasts of a high number of uncorrelated decision trees [64,65]. They usually display good performance with better generalization properties than individual trees, are generally relatively robust to outliers, and need virtually no parameter turning [66]. Random forests are supported by two domain ideas: packaging to build each tree on a different starter sample of the training data and random selection of features to decorate the trees. The training algorithm is quite simple and can be described as follows: For each of the trees in the set, a sample of the training data is drawn. By growing the tree T b over Z, characteristics that are available as candidates for the division at the respective node are randomly chosen [67]. Lastly, the grown tree is added T b to the whole. During the inference, each of the trees provides a predictionĉ b (x) for the class label of the new observation x. The final random forest prediction c RF (x) is then the majority vote of the trees, that is, Inspired by [64], RF holds 100 trees, each with a maximum depth of 10 for the simulation study. The trees all use cross-entropy as the error minimization measure and m = √ p characteristics are set as the default option for the classification configuration of this algorithm.

Deep Belief Network
The Deep Belief Network (DBN) is a variant of a deep neural network made up of two upper layers joined together as an undirected bipartite associative memory, called restricted Boltzmann machines (RBM).
The lower layers form a directed graphical pattern, called the sigmoid belief network. The difference between sigmoid belief networks and DBN is found in the way the hidden layers are parameterized [68], as indicated in Equation (9).
where v represents the vector of visible units, P(h k−1 h k ) defines the conditional probability of visible units at the level k. The joint distribution at the top level, Another way to show DBN as a generative model can be pointed out in the expression (10): DBN is made up of the accumulation of RBMs. The visible layer of each RBM in this composition constitutes the hidden layer of the previous RBM. In the way that a model fits a data set, the mission is to establish a model Q(h l−1 , h) for the true posterior P(h l−1 , h). The approximations for the higher-level posterior are determined by the posterior Q(h l−1 , h), P(h l−1 , h), where the upper-level RBM gives the possibility to calculate the inference procedure [68].

Deep Neural Decision Trees
Deep Neural Decision Trees (DNDT) are composed of decision tree models computed using deep learning neural networks. In these trees, a combination of weights is assigned to DNDT, which belongs to a specific decision tree, its result being interpretable [69]. DNDT starts with a "soft clustering" function [70] to evaluate the level of residues contained in each node, which allows obtaining split decisions in DNDT. The "grouping" function is defined as using a real scalar as input x and getting an index of the "containers" that x belongs to.
In the case of having a variable x, it can be joined in n + 1 intervals. The need to generate n cut points is created, which are trainable variables within the algorithm. These cutoff points are called [β1, β2, . . . , βn] and move in an increasing monotonic fashion, hence, β1 < β2 < . . . < βn.
The function of the activation of the DNDT method starts from a neural network to make the computation, as is defined in Equation (11).
where w is a constant and its value is set as w = [1, 2, . . . , n + 1], τ > 0 is a factor temperature, and b is constructed as defined by Equation (12).
The neural network, which is defined in Equation (12), produces an encoding of the 'binning' function x. In case τ approaches 0 (which is the case most often), the vector is sampled via the straight-through (ST) method Gumbel-Softmax [71]. Considering our 'binning' function defined above, the main idea is to create the decision tree through the Kronecker product. Suppose we get an input instance x ∈ R D with D features. Interleaving each feature x d with its neural network f d (x d ), we can find all the final nodes of the decision trees, as expressed in Equation (13).
where z is now also a vector indicating the index of the leaf node where the instance arrives x. Finally, we suppose that a linear classifier at every sheet z sorts the instances that arrive there. DNDT scales well with the number of inputs because of the mini-batch training of the neural network. However, a key design drawback is that, due to the use of the Kronecker product, it is not scalable concerning the number of features. In our implementation today, we avoid this problem with large data sets by having a forest with random subspace training [65].

Sensitivity Analysis
In Machine Learning techniques, it is also necessary to analyze the impact of variables as occurs in traditional statistical techniques, after using data samples that contain a wide variety of variables. To carry out this evaluation, a sensitivity analysis must be applied. The objective of this procedure is to determine the level of significance of the independent variables over the dependent variable [72,73]. Therefore, it tries to determine those models that are made up of the most important ones, and therefore, eliminate the variables that are not significant. For a variable to be considered significant, it must have a variance greater than the mean of the rest of the variables that make up the model. The Sobol method [74] is the technique chosen to decompose the variance of the total V (Y) given by the following equations expressed in (14). where The sensitivity indices are obtained by S ij = V ij /V, where S ij denotes the effect of interaction between two factors. The Sobol decomposition makes it possible to estimate a total sensitivity index S Ti , measuring the total sensitivity effects implied by the independent variables.

Sample and Data
From the 1970-2017 period, two samples have been obtained, each used for its purpose, which has been for analyzing the forecast of a sovereign debt crisis and the prediction of a currency crisis. For this, the samples have been classified by world regions, specifically Africa and the Middle East, Latin America, Asia, Europe, and the total (global) set. The database has been obtained from macroeconomic and financial data from the main international economic institutions like the International Monetary Fund (the database called 'The World Economic Outlook') and the World Bank (the database called 'Open World Bank Data').
The dataset of the sample has been classified into three groups that are mutually exclusive, reserving 70% for training samples, 10% for validation samples, and for the test samples, the remaining 20%. Next, we selected the variables set that provided the most number of classification hits in the verification set, and we have presented results based on the average number of hits in the test set. The classification and prediction finally involve using the developed model to produce predictions for the analyzed crises.

Sovereign Debt Crises
The database used for the construction of the sovereign debt crisis prediction models consisting of a comprehensive set of information (30 crude or converted significant variables, with annual periodicity) concerning a panel (unbalanced) of 115 developed and emerging markets in the period 1970-2017. An attempt is made to replicate the sample used by Dawood, Horsewood, and Strobel (2017) as a reference work, expanding the time range and the number of countries, as well as including the attributes of the indicators on policy conditions and credit scoring. The macroeconomic variables have been obtained from the World Bank, while the credit rating indicators are derived from Fitch Ratings statistics and the political variables from the POLITY IV project, carried out by the Center for Systemic Peace (http://www.systemicpeace.org/inscrdata.html (accessed on 5 March 2020)). The sample includes the four main regions worldwide, such as Africa and the Middle East, Asia, Latin America and Europe.
The dependent variable is formed like most of the previous literature, like the work of Dawood, Horsewood, and Strobel (2017). For emerging emerging countries, the dependent variable indicates the value 1 in the event of any of the following events and zero otherwise: interest and/or capital arrears increase above 5% of the pending debt; loans obtained from the International Monetary Fund (IMF) that exceed 100% of the country's quota; the accumulated credit lent by the IMF exceeds 200% of the quota; participation in a debt restructuring or rescheduling plan involving a volume greater than 20% of the outstanding debt. For developed countries, in addition to the two related events around IMF loans, the dependent variable is identified as 1 if public debt exceeds 150% of GDP. Table 1 describes the variables used, and Table A1 in Appendix A shows the selected crisis years for each country from the database used.

Currency Crises
The database used for the construction of the currency crisis prediction models includes 32 explanatory variables from 163 developed, emerging, and developing countries in the period 1970-2017. The dependent variable is constructed from the definition of [75]: a currency crisis is a depreciation of the nominal value of the currency against the US dollar of at least 30 percent, which is at least 10 points percentage higher than the depreciation index in the previous year. The macroeconomic variables have been extracted from the World Bank Open Data (see: https://data.worldbank.org/ (accessed on 11 March 2020)) and chosen from the experiences of [6,36,76]. For their part, the political variables come from the POLITY IV project, following the factors used by [77]. Table 2 shows the set of variables used, with their definition and expected sign, and Table A2 of Appendix A details the years of crisis for the country by country in the sample. The Table A3 of Appendix A summaries the number of crises occurred in the period previously mentioned.

Results
This chapter completes the development of the empirical aspects of this research work, offering detail of the results obtained. These results are presented for the global and regional models, and for each of the crisis events considered. The results of the sensitivity analysis have been performed using the Sobol method described in Section 3.9, and those variables that have yielded a sensitivity level equal to or greater than 0.4 have been chosen as the most significant of each model.
To be more effective in demonstrating the superiority of machine learning techniques for the prediction of the crises treated in this study, a Logit analysis has been carried out (see results in Tables A4 and A5 of Appendix A). The results of the Logit models performed show an accuracy of 86.11-79.17% for training data and an accuracy range of 83.03-78.14% for testing data. As explained in the Introduction, we applied machine learning techniques to increase the precision capacity.

Results for Sovereign Debt Crises
The results of the sensitivity and precision analysis obtained in each stage according to the data subsample (training, validation, and testing) of the global model, Africa, and the Middle East, Asia, Latin America, and Europe, are shown in Tables 3 and 4, respectively. After observing the results of the sensitivity analysis, the global model shows that variables such as ORR are significant in all the applied methodologies. Another variable that shows the same dynamics is FXR, showing high levels of sensitivity. For their part, the variables that represent credit quality, such as SCFR and SBS, also have high importance according to the results obtained. If we generalize the model in the test sample, the classification level moves in the range 87. 67

Results for Currency Crises
Tables 5 and 6 detail the results of the sensitivity and precision analysis obtained in each stage according to the data subsample (training, validation, and testing) with the data related to currency crises. In the global model, the most significant variables are M2M, M2R, TRO, FDI, and REER. This shows that a considerable rise in the money supply and foreign investment flows can decide the existence of a global currency crisis. If we generalize the model in the test sample, the classification level moves in a range of 91.83-98.43%, showing that the DNDT technique reaches the highest precision (98.43% with test data). In this global model, the RMSE values ( Figure 2) are within the interval 0.35-0.23, showing that the lowest error (0.23) is obtained with FDT.
The Africa and Middle East model shows that M2M, M2R, and FDI are significant with most of the techniques used. Therefore, increases in the money supply and with it, a growth in the proportion of this supply over the country's foreign exchange reserves, and a low rate of foreign direct investment flows are the best predictors of currency crises in Europe. Regarding the precision of this model, the classification level moves in a range of 92.18-98.24%, showing that the DNDT technique obtains the best fit (precision of 98.24% with test data). Figure 2 details the RMSE values, being the DNDT technique the one with the lowest error (0. 19).
The Asian model shows that the variables FXR, TRO, M2R, and CACC show high levels of sensitivity. Therefore, a large increase in the money supply and poor balance of payments and foreign exchange reserve levels appear to be the best currency crisis predictors in Asia. The DNDT technique is the one that offers the highest precision (98.54% with test data). The error range is 0.34-0.18, again being the DNDT technique the one that obtains the lowest (Figure 2). The variables TRO, RGDP, TDEB, and M2R are significant in most of the models built in Latin America. These results indicate that a significant rise in the proportion of the money supply to reserves and a low level of economic growth and trade openness, as well as a high level of public debt, are the main factors in predicting a currency crisis. For its part, the DNDT method is the best prediction technique, with a precision of 96.90% in test data. In this Latin American model, the RMSE values presented by the methods used are located in the interval of 0.34-0.26, with the RF technique being the algorithm with the lowest error (0.26). The results of the sensitivity analysis in the European model show that the variables of M2M, DCRE, FCF, and TDEB are the ones with the greatest impact in most of the applied techniques. These results suggest that an important expansion in the growth of the money supply and high levels of the balance of payments credit and public debt are especially significant in detecting currency crises in Europe. The level of precision is in the range of 92.93-99.07%, with the DNDT technique being the one that reaches a greater success of 99.07% in the testing stage. Figure 2 also details the RMSE values, being the DNDT technique the one with the lowest error (0.14).

Discussion of Results
The results obtained for the sovereign debt crises forecast reveal a set of robust variables that are reproduced in almost all of the estimated models. Variables of the debt exposure attribute such as TDEB and IMFC mean that the increase in debt levels also causes an increased likelihood of a public debt crisis. These significant variables coincide with the results of the previous works by [3,5], which indicate the great relevance of the debt level on the probability of default. For their part, banking sector variables are significant in previous studies [5], but they have not been validated in our estimates. On the contrary, it has been more common in our models to observe greater significance in variables of the foreign sector attribute such as FXR and M2R, which imply a high accumulation of foreign currency for the payment of the debt of the public institutions of a country. This fact has not been refuted, or at least not with such significance by previous works [7,10]. There are other significant variables such as SCFR and SBS that have not been contrasted either by the prior literature. These variables reflect the fact that a downgrading of the country's credit rating and an increase in interest payments make it more difficult to access financing and pay the debt, which increases the risk of default due to difficulties in refinancing said debt [3,78]. Lastly, the most sensitive political variables, but with a weaker intensity than those mentioned above, have been: SFI (in the Latin American and Global models) which shows the state's capacity to carry out public policies, and POLI that shows the country's level of democracy. In previous literature, only POLI has been identified as significant [3].
The results on sovereign debt default show that models developing with fuzzy C4.5 (FDT) raise the ability to forecast sovereign debt crises, obtaining better ratios of both precision and other selection criteria. Most notably, the global model achieves an accuracy of 97.8%, higher than the 87.1% obtained by [5] employing logistic regression. The same work also reveals the improvement of the precision of their regional models. Along the same lines, it improves the results reported by [3], which had 87% accuracy with regression trees for emerging countries. Likewise, our methodology also improves the prediction capacity of other computational techniques such as neural networks used by [11], with which it obtained 85% accuracy for a sample of emerging countries. Reference [29] achieved 88.6% accuracy with their K-means method for a sample of emerging and developing countries. Even so, other methodologies have shown a consistent predictive capacity throughout the models built, both globally and regionally. These are the case of the AdaBoost, XGBoost, and DNDT techniques, which have shown an average prediction in testing close to 95% correct, making them interesting options to treat the prediction of a sovereign debt crisis. Regarding the level of residuals measured by RMSE, the levels obtained show that the models carried out have a high degree of fit, since the specific statistical literature indicates that those levels below unity present good goodness of fit and that those results less than 0.5 indicate particularly good goodness of fit [79,80]. Therefore, our results show a unique set of variables, in addition to achieving better precision results than the rest of the previous literature.
For their part, the results obtained in the study of currency crises also show a group of explanatory variables that is common in a large part of the estimated models. The FCF variable has been important in most of the models, showing the importance of the evolution of a country's net investment in increasing the threat of a currency crisis. This result is in contradiction to the findings of [7], in which this variable was not statistically relevant. Continuing with the domestic macroeconomic variables, the variables concerning the money supply (M2M and M2R) have shown high significance, showing that a drastic increase in the money supply hurts the price of the currency. On the other side, the INF variable is not significant, in contrast to works like those of [6,35]. Another variable such as REER has not been refuted as a significant factor either, unlike that shown in the works of [38,45]. Likewise, variables of the foreign sector attribute such as TRO and CACC are shown as more significant variables due to the importance of a country's international trade performance on price, something that refutes the results of the previous works of [2,36]. In turn, the variables of the banking sector have been relevant in previous investigations [2,6], but they have not obtained a huge significance in our estimates. Regarding the debt variables, the TDEB variable (in connection with the debt accumulation) has been largely significant, indicating that high public debt ratios decrease the currency's value. Finally, the most important political variables in our models have been: DUR and YEAR (Africa and Asia) that show the state's capacity to implement public policies, and POLI that shows the level of democracy in the country. These variables have not been pointed as significant in the prior literature [77].    The results on the case of currency crises conclude that the models built with DNDT obtain a forecasting ability close to 100% for currency crises in the regional and global models, with higher levels of accuracy than in other studies. The precision of the global model is 96.38%, but a comparison of this model is complex as it is the first model developed to predict currency crises worldwide. Other studies have obtained lower levels of precision, such as [2], with an accuracy of 84.62% based on the dynamic panel model. In the same way, we have also improved the results obtained by [6], who reached 93.8% accuracy employing neural networks for Turkey. Our methodology is also more powerful in prediction than other computational methods such as the k-nearest neighbor hybrid algorithm and vector support machines (kNN-SVM), which had an accuracy of 97% for a sample of emerging markets [36].

Conclusions
The present study developed robust global and regional models to predict international financial crises, specifically those related to sovereign debt and the price of the currency. Similarly, an attempt is made to show the superiority of computational techniques over statistics in terms of the level of precision. An attempt has been made to clarify these issues by overcoming the previous absence of definitive conclusions due to the lack of homogeneity caused by the disparity of methodologies, approaches, available databases, periods, and countries, among other issues.
The results of the study carried out have allowed us to obtain the conclusions that appear below. First, to confirm the existence of differences between the global and regional models, and that the global models can even show a precision capacity similar to the mean of the regional models. To this end, the global sovereign debt prediction models for the studied regions (Africa and the Middle East, Asia, Latin America, and Europe) have obtained an accuracy capacity of 97.80%, 100%, 96.82%, 98%, 85%, and 99.76%, respectively. For its part, this precision relationship for the models built in the study of the currency crisis shows a precision of 98.43%, 98.24%, 98.54%, 96.90%, and 99.07% for the Global sample, Africa and the Middle East, Asia, Latin America, and Europe, respectively. This shows the high level of robustness of the models built concerning previous works.
Second, about the objective that postulated that the application of computational methods could improve the level of precision shown by statistical techniques, our empirical evidence has allowed us to accept it for the analyzed crises, all based on the comparison made between levels of success for test sample data and obtained RMSE values. The best methods for the sovereign debt crisis have been FDT, AdaBoost, XGBoost, and DNDT. While for the prediction of the currency crisis, the best techniques have been DNDT, XGBoost, RF, and DBN.
Regarding the explanatory variables of sovereign debt crises, in the set of estimated models, some variables have appeared as significant continuously. They are the variables related to the exposure to the country's debt, more specifically TDEB, which shows the importance of a high level of public debt in sovereign default, and IMFC, which indicates the influence of high dependence on credit provided by the IMF as a possible cause of the increased probability of default. On the other hand, the foreign sector variables related to the amount of foreign exchange reserves accumulated by a country, such as FXR and M2R, show the importance of a high level of foreign exchange reserves with which to be able to face international debt payments. Lastly, the SCFR and SBS variables also show continued significance, showing that interest paid and credit rating are important factors when evaluating the possibility of a sovereign default.
The results of the currency crisis prediction models also show that a small group of variables are consistently significant. This is the case of the FCF variable, indicating how a low level of dynamism in net investment in the country can cause a strong drop in the currency's value. Similarly, the variables that the money supply represents, such as M2M and M2R, indicate that a rise in the money supply in the market makes the currency lose its price. Variables of the foreign sector attribute such as TRO and CACC are also presented as significant variables due to the importance of the commercial opening of a country in the price of its currency. Finally, in the case of naming the most significant political variables in a general way, the variables DUR and YEAR indicate a higher incidence of currency crises in those countries where political regimes are perpetuated, i.e., close to totalitarianism.

Implications
The above conclusions have important theoretical and practical implications. From a theoretical approach, the models developed can help provide tools for the prevision of sovereign debt and currency crises that are able to avoid international financial crises both at the regional level and as a whole (global), since a high level of robustness in these models concerning previous works. This study is a great contribution to the field of international finance, as the results presented in this work have considerable implications for further decisions, providing tools that help governments and financial markets achieve financial stability. Given the need of countries to obtain financing and establish international relations, our models can help to foresee sovereign debt and currency crises in them, avoiding financial disturbances and imbalances and reducing the possibility of damages in the financial intermediation process. All this implies an improvement in the functioning of financial markets, debt sustainability, the profitability of credit institutions, and the non-banking financial sector, such as investment funds. From a practical point of view, our sovereign debt and currency crisis prediction models can be useful to assess the reputation of a country more accurately. In a globalized world, companies always try to expand into markets outside their own, which makes it vital to enjoying a good image of the country of origin to improve the perception of the goods and services offered. A poor reputation of a country in terms of paying its debt obligations, as well as an unstable currency, can have a negative impact on companies from that country in other markets about seeking financing, suppliers, and partnerships with other companies. Therefore, a better perception of the country's financial management can improve on the one hand, its position in the financial markets, and, on the other side, the country's reputation for the benefit of its companies.

Limitations and Further Research
This investigation has certain limitations, principally the historical data available for emerging economies. As this research was conducted from a globally oriented perspective, it requires a much larger range of information compared to other studies in this field. Furthermore, future studies may delve into other types of political information to deepen their influence both on the financial crises studied and on the impact of the country's reputation. It would be convenient to relate the influence of the financial crises suffered by a country on exports or tourism, important dimensions in the country's reputation through modifications of the country strength models, as the main tools for measuring reputation. Likewise, and to increase the generalization of the results in the study of the country's reputation, further analysis could be included on the impact that the financial strength of a country has on corporate reputation, both in large companies and in those that wish to expand internationally, for instance energy companies.
Machine learning techniques show a great capacity to absorb observations, the use of large data samples being vital to obtain a high level of accuracy. Therefore, it shows a greater margin to achieve better precision ratios and a low level of error. But some of the weaknesses of these computational techniques compared to statistics is their higher computational cost to perform the analyzes, as well as greater difficulty in interpreting some methodologies. Therefore, leaving aside the superiority of machine learning methodologies demonstrated in this study and a multitude of previous works, it is necessary to find new techniques that can mitigate the weaknesses described. An interesting technique to test powerful alternatives for predicting international financial crises, such as their effect on the management of the country's reputation, would be dynamic systems. This technique has been used in different areas of management, obtaining very satisfactory results in simulations of medium and long-term scenarios [81][82][83][84].    1970  1971  1  1972  5  1973  1  1974  1975  5  1976  4  1  1977  1  1  1978  5  3  1979  3  2  1980 4 3  The sample has been divided 70% for training and 30% for testing.