Next Article in Journal
Enhancing Fraud Detection Performance: The Interplay of Red Flag Awareness, Self-Efficacy, and Professional Skepticism
Previous Article in Journal
Labor Supply as a Buffer: The Implication of Credit Constraints in the US
Previous Article in Special Issue
Professional Forecasters vs. Shallow Neural Network Ensembles: Assessing Inflation Prediction Accuracy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Forecasting Sovereign Credit Risk Amidst a Political Crisis: A Machine Learning and Deep Learning Approach

Laboratory of Probability and Statistics, Faculty of Business and Economic Sciences, University of Sfax, Sfax 3029, Tunisia
J. Risk Financial Manag. 2025, 18(6), 300; https://doi.org/10.3390/jrfm18060300
Submission received: 19 March 2025 / Revised: 17 May 2025 / Accepted: 26 May 2025 / Published: 1 June 2025
(This article belongs to the Special Issue Forecasting and Time Series Analysis)

Abstract

:
The purpose of this paper is to forecast the sovereign credit risk for Egypt, Morocco, and Saudi Arabia during political crises. Our approach uses machine learning models (Linear Regression, Ridge Regression, Lasso Regression, XGBoost, and Kernel Ridge) and deep learning models (RNN, LSTM, BiLSTM, and GRU) to predict CDS-based implied default probabilities. We compare the predictive accuracy of the tested models with the results showing that Linear Regression outperforms all other techniques, while deep learning architectures, such as RNN and GRU, demonstrate a competitive performance. To validate the sovereign credit risk prediction, we use the forecasted implied default probability from the Linear Regression model to determine the corresponding forecasted implied rating according to the Thomson Reuters StarMine Sovereign Risk model. The results reveal significant differences in the perceived creditworthiness of Egypt, Morocco, and Saudi Arabia, reflecting each country’s economic fundamentals and their ability to manage global shocks, particularly those related to the Russo-Ukrainian war. Specifically, Egypt is perceived as the most vulnerable, Morocco occupies an intermediate position, and Saudi Arabia is seen as having a low credit risk. This study provides valuable managerial insights by enhancing tools for the sovereign credit risk analysis, offering reliable decision-making in volatile global markets. The alignment between forecasted ratings and default probabilities underscores the practical relevance of the results, guiding stakeholders in effectively managing credit risks amidst economic uncertainty.

1. Introduction

The accurate prediction of sovereign credit risk is crucial for investors, policymakers, and financial institutions. Sovereign credit risk reflects the likelihood that a country will default on its debt obligations, which can have significant economic and financial repercussions both domestically and internationally. This issue is particularly pressing in the MENA region, where the sustained growth of external debt triggered doubts regarding the ability of governments to fulfill their repayment commitments. According to World Bank statistics, the external debt in the region escalated from USD 182 billion in 2009 to USD 417 billion in 2021, further underscoring the sovereign credit risk. Credit risk can be assessed using economic indicators and market data (J. Hull et al., 2004; Longstaff et al., 2011; Paret & Gilles, 2015; Rodríguez et al., 2019). More recently, scholars have extended the analysis of credit risk by incorporating emerging non-traditional factors, such as climate risk, in the corporate context, highlighting the need for multidimensional risk assessment models (Shahrour et al., 2024). Events such as the 2011 political unrest in many Arab countries, the COVID-19 pandemic, and the war in Ukraine have prompted researchers to reconsider the relevance and reliability of traditional approaches to credit rating, risk assessment, and forecasting (Piccolo & Shapiro, 2022). Ratings provided by agencies cannot often adapt to rapidly changing geopolitical and financial environments. In fact, despite the COVID-19 pandemic and the ongoing war in Ukraine, the ratings have remained relatively stable. In response to these challenges, researchers have increasingly turned to implied ratings to gauge credit risk. In this context, Blair (2013), Vieira and George (2016), Abid et al. (2020), and Abid and Abid (2023, 2024) have shown that implied ratings capture information more effectively than those issued directly by credit rating agencies. For this, in this work, to forecast the sovereign credit risk, we based our research on the implied rating obtained from the implied market default probability and the classification established by the Thomson Reuters StarMine Sovereign Risk model. So, the default probability calculated from the sovereign credit default swap (CDS) with the J. C. Hull (2014) model is used as a risk measure. This choice is explained by the fact that practitioners and theorists strongly advocate the utilization of the CDS as the most efficacious instrument for assessing a country’s creditworthiness, offering timely and accurate signals of changing credit risk conditions (Romanyuk, 2021; Abid et al., 2020; Abid & Abid, 2023, 2024). The CDS, being a derivative product with its underlying asset being a loan extended by the contract purchaser to a reference country, promptly responds to fluctuations in the credit risk of that country. This study seeks to enhance sovereign credit risk forecasting tools in a period of global crises focusing on three key MENA countries: Egypt, Saudi Arabia, and Morocco. These countries were chosen due to the availability of dynamic CDS data and their varying levels of economic development, making them ideal candidates for exploring advanced risk prediction models. Egypt, marked by political turmoil and economic difficulties after the 2011 revolution, highlights the effects of political instability on credit risk. Saudi Arabia, benefiting from a robust economy fueled by hydrocarbons and considerable fiscal reserves, exemplifies how countries rich in resources manage credit risk. Meanwhile, Morocco, characterized by its political stability and ongoing economic reforms, highlights the role of stable governance and strategic policies in shaping credit risk. Analyzing these three countries allows us to understand how varying levels of social welfare, development, and political stability affect sovereign credit risk in the MENA region. The complexity and unpredictability of credit risk dynamics due to geopolitical and health crises require sophisticated approaches capable of capturing complex scenarios, hence the need for the use of artificial intelligence (AI) approaches that are able to capture intricate relationships and non-linear patterns among historical values making them well suited for volatile markets like those in emerging economies (Abid & Suissi, 2024). By leveraging AI, this research aims to provide a more robust and dynamic approach to predicting sovereign credit risk, thereby offering valuable insights for investors and policymakers. Specifically, we employ AI models to predict the market-implied default probability and rating, based on the Thomson Reuters StarMine Sovereign Risk model and the CDS-based Hull model for default probability estimation. Motivated by the need for more accurate and timely risk assessment tools, this research explores the application of AI models in predicting the sovereign credit risk for Egypt, Morocco, and Saudi Arabia. The goal is to demonstrate the potential of AI to enhance the predictive accuracy of sovereign credit risk models, thereby offering valuable insights for investors and policymakers in these countries. This paper enhances the existing literature by proposing artificial intelligence models suitable for predicting the sovereign credit risk for selected MENA countries during periods of global instability. This forward-looking approach gives investors an advantage in terms of risk management, identifying investment opportunities, and optimizing their portfolios (Naifar, 2020). In fact, by anticipating future movements in the sovereign implied probability of default and rating, investors can make informed decisions that align with the expected market dynamics. The inclusion of this forecast adds valuable predictive insights that assist investors, improving their overall performance. In addition, the prediction of sovereign credit risk allows policymakers to craft more informed and forward-looking policies, mitigate financial risks, and enhance the stability and growth of their economies.
The remainder of this paper is organized as follows: Section 2 reviews the existing literature, Section 3 describes the data and methodology, Section 4 analyzes the empirical findings, and Section 5 provides the conclusion.

2. Literature Review

In sovereign credit risk management, accurately forecasting the level of credit risk is crucial. This paper proposes the use of artificial intelligence models to predict this risk by forecasting the CDS-implied probability of default and the corresponding credit rating. Forecasting can generally be approached in two ways: univariate forecasting, which relies solely on the historical values of the dependent variable (in our case, the market implied default probability) and multivariate forecasting, which includes additional exogenous variables. In the univariate forecasting problem, the future value of y is predicted using only its past values. Let us note that the input features x consist of lagged values of y , such that x = y t 1 , y t 2 , ,   y t n , and the target is y t , the value forecasted at time t . This approach assumes that the temporal dynamics of y are sufficient for accurate predictions, as selected in our study, which relies on the use of past values of the implied default probability. In contrast, multivariate forecasting involves using multiple variables to predict yt. In this case, X includes lagged values of y and lagged values of other relevant variables x 1 , x 2 , , x k . That is, x = y t 1 , x t 1 1 , x t 2 2 , , x t 1 k , and the model learns the relationships between these independent variables and the target variable y t . Several studies have adopted the univariate approach, including Lima (2021), Vukovic et al. (2022), and Abid and Suissi (2024), who modeled and forecasted CDS spreads based solely on their past values. Conversely, other studies such as Cipollini and Missaglia (2008) and Moscatelli et al. (2020) have opted for multivariate forecasting frameworks, integrating various macroeconomic and financial indicators to predict credit risk dynamics. In our work, we restricted the scope to the univariate approach based on the implied probability of default due, on the one hand, to the limited availability of long-term historical data for variables across all countries in our sample. On the other hand, the probability of default used in our paper is not a simple transformation of past values. It is derived from the J. C. Hull (2014) model, which incorporates key variables, such as the CDS spread, recovery rate, maturity, and interest rate, ensuring that the default probability reflects current market conditions and forward-looking risk assessments. This model is widely acknowledged for its robustness in transforming market quotes into reliable credit risk estimates. So, this probability is a robust and global credit risk measure that captures investors’ aggregated perceptions of sovereign risk, including political, economic, and financial factors (Jarrow et al., 1997; J. C. Hull, 2014; Neftci et al., 2005; Zhu, 2006; Rodríguez et al., 2019; Abid et al., 2020; Abid & Abid, 2023, 2024; Abid & Suissi, 2024). In addition, the utilization of the CDS can be justified by the strong correlation between the CDS spread and credit risk, as fluctuations in the quantity and price of this sovereign default insurance are also closely linked to sovereign credit risk. In fact, the CDS provides a more accurate reflection of information compared to economic data and proves to be effective in forecasting credit risk. Notably, the default probability inferred from the spread of the CDS is considered more realistic than the probability of default derived from other market data (Dwyer et al., 2012; Flannery et al., 2009; International Monetary Fund, 2013; Jacobs et al., 2016; Augustin et al., 2022). Although, the CDS spread is widely recognized as a reliable indicator of credit risk and has been used to predict credit risk in the study of Abid and Suissi (2024). Therefore, in this study, to forecast sovereign credit risk, we have opted to use the default probability derived from the CDS using the J. C. Hull (2014) model. Then, the predicted default probability is applied to determine the implied rating for each country under study, based on the classification established by the Thomson Reuters StarMine Sovereign Risk model, as utilized in Abid and Abid (2024). The rationale for using an implied rating model stems from research by Flannery et al. (2009), which demonstrated that agency ratings did not adequately capture rising risks during the financial crisis, staying unchanged despite clear signs of financial instability. Similarly, Hilscher and Wilson (2017) observed that, while agency ratings are related to systematic risk, they are not ideal for forecasting default probability. Additionally, Annaert et al. (2000) argued that agency ratings assume consistent credit spreads within each rating category, a view that frequently diverges from actual market conditions. Other studies, like those by Blair (2013), have shown that implied ratings, in contrast, tend to more accurately reflect the real-time credit risk. Hung et al. (2017) and Abid et al. (2020) confirmed that agencies tend to delay rating adjustments, contributing to information asymmetry. In light of these findings, this paper utilizes implied ratings derived from the CDS and the Thomson Reuters StarMine Sovereign Risk model to assess and predict the sovereign credit risk for selected MENA countries, offering a more responsive and accurate reflection of market-implied risk.
Unlike the work of Abid and Abid (2024), which focused solely on measuring credit risk by calculating the implied default probability and assigning the corresponding implied rating for Egypt, Morocco, and Saudi Arabia in a period of global crises, this study extends the approach by aiming to predict the future credit risk of the same countries. Predicting the CDS-implied default probability entails forecasting future values based on historical data and key factors that drive credit risk (Mao et al., 2023). This can be accomplished by employing either statistical methods or AI approaches. Traditional statistical models include the Auto-Regressive Integrated Moving Average (ARIMA) (Apergis, 2015; J. Li et al., 2021; Kiarie et al., 2022; Shaw et al., 2014; Avino & Nneji, 2014), quantile regression (Naifar, 2020), and Markov switching auto-regression (Avino & Nneji, 2014; Vukovic et al., 2022), which are capable of identifying temporal patterns and dependencies in historical default probability data for forecasting. On the other hand, AI models have gained significant traction due to their ability to capture intricate relationships and non-linear patterns in data, offering a superior performance. Siami-Namini and Namin (2018) and McNally et al. (2018) found that AI models, including LSTM and RNNs, outperformed traditional algorithms, as measured by their ARIMAs, when applied to financial data or bitcoin price predictions. In recent years, both machine learning and deep learning models have seen an increased application in financial time series forecasting, further highlighting their potential. For example, Chen et al. (2015) used a Long Short-Term Memory (LSTM) model to predict the movement of the Chinese stock market, while Z. Li and Tam (2017) employed a Recurrent Neural Network (RNN) and support vector machine (SVM) to forecast stock price movements with varying volatilities. Gao et al. (2017) also used LSTM to predict stock prices. Lima (2021) demonstrated the effectiveness of deep learning techniques (Gated Recurrent Unit (GRU), LSTM, RNN, and Multilayer Perceptron Model (MLP)) in predicting sovereign CDS spreads. Vukovic et al. (2022) demonstrated the effectiveness of the Markov switching autoregression (MSA) model in predicting the corporate CDS spread compared to support vector machines (SVMs), the Group Method of Data Handling (GMDH), and LSTM. Abid and Suissi (2024) showed the performance of the GRNN model in predicting the sovereign CDS. McNally et al. (2018) assessed the performance of LSTM using volatile Bitcoin data, while Cortez et al. (2018) applied it to predict emergency events in the Republic of Guatemala. Although LSTM is designed to address the limitations of RNNs and is generally regarded as superior, its performance often depends on the dataset. For instance, Samarawickrama and Fernando (2017) demonstrated that LSTM outperformed RNNs in stock price predictions. However, a study by Selvin et al. (2017) compared both models for the same task and concluded that the RNN was more effective.
As previously noted, numerous studies have used AI models to predict various financial market data. Similarly, we applied machine learning and deep learning models to predict the implied default probability and rating based on the CDS. There is a limited body of research on credit risk forecasting using AI techniques, and to the best of our knowledge, our study is the first to propose forecasting models for the implied default probability and implied rating data. Therefore, although there are many prediction methods, we especially focus on methods that are generally used in the prediction of time series data, such as Linear Regression, Ridge Regression, Lasso Regression, XGBoost, and Kernel Ridge for machine learning models and LSTM, BiLSTM, GRU, and RNN for deep learning models.

3. Data Description

To forecast sovereign credit risk, we used the daily default probability measured based on one-year maturity CDS spreads using J. C. Hull’s (2014) model. Data are provided for three MENA countries: Egypt, Saudi Arabia, and Morocco. The selection of these countries was driven by the availability of CDS data and their representativeness of varying economic and political contexts within the region. Egypt, marked by significant political and economic instability since the 2011 revolution, contrasts with Saudi Arabia, a hydrocarbon-rich country with a strong fiscal capacity. Morocco offers a third case with relative political stability and a history of economic reforms. This diversity allows for testing sovereign risk models under different structural conditions. The dataset was sourced from the DataStream database spanning from 15 February 2011 to 6 September 2022, with a total of 3016 daily observations for each country. This period was selected to capture key global and regional events—such as the Arab Spring, the COVID-19 pandemic, and the Russia–Ukraine conflict that significantly influenced sovereign risk dynamics. In addition to default probabilities, the analysis incorporates sovereign credit ratings for validation purposes and when available, macroeconomic indicators to contextualize the results. Figure 1 illustrates the evolution of the CDS-based implied default probability for Saudi Arabia, Morocco, and Egypt. Overall, time series graphs seem to evolve in a dissimilar fashion, despite all graphs displaying cyclical swings. One might show cyclical fluctuations of all time series and volatility clustering behavior. During the study period, Egypt kept the highest sovereign credit risk with notable surges aligned with a phase of political unrest triggered by the 2011 revolution and lasting for several years thereafter. The heightened credit risk observed in 2020 underscores the repercussions of the COVID-19 pandemic. Nevertheless, Egypt was able to mitigate the crisis by adopting a macroeconomic adjustment program under the guidance of the IMF. This effort helped stabilize the country’s economic and financial conditions, leading to a rapid reduction in insolvency risk in 2021. The Russia–Ukraine war intensified risks and fueled concerns regarding Egypt’s economic stability, including factors such as reduced tourism revenues and rising wheat and oil prices. Consequently, we observed a significant increase in the probability of default in 2022.
In contrast to Egypt, the political unrest in Morocco in 2011 did not lead to long-term adverse consequences. This accounts for a slight increase in the credit risk of this country during this period. In addition, the stable level of credit risk in 2021 indicates that Morocco managed to mitigate the economic impact of the COVID-19 pandemic effectively. Despite the challenges posed by the health crisis, the government’s fiscal policies and support measures appear to have successfully maintained financial stability, preventing a significant increase in sovereign risk or insolvency concerns. In 2022, the implied default probability shows a slight increase, primarily driven by threats to the country’s food security due to climate risks and the conflict in Ukraine. Despite these challenges, Morocco continues to attract foreign investment, with revenues being used to reduce the budget deficit. This has allowed the country to enhance crisis management, reinforce economic resilience, and reduce credit risk. As a result, Morocco’s implied default probability demonstrates a sensitivity to crises, fluctuating both upwards and downwards, but within a more controlled range compared to Egypt.
Saudi Arabia exhibits the lowest credit risk among the studied countries, reflecting its strong political, economic, and financial stability. Its solvency has demonstrated resilience despite global shocks, including the COVID-19 pandemic in 2020 and the Russia–Ukraine conflict in 2022. However, during the health crisis, there was a slight increase in Saudi Arabia’s default probability, largely due to the suspension of religious tourism (Hajj and Umrah), a significant contributor to the national economy. Similarly, in 2016, a slight uptick in default probability was observed, which can be attributed in part to escalating geopolitical tensions with Iran, which not only strained Saudi Arabia’s financial resources but also heightened regional risk perceptions. These conflicts necessitated increased defense spending and redirected financial resources away from domestic economic initiatives, affecting overall stability. Nonetheless, Saudi Arabia’s substantial oil revenues have provided critical insulation, allowing it to maintain a robust financial position and withstand external shocks more effectively than many other nations.
The descriptive statistics from Table 1 reveal notable insights into the daily implied default probability. Saudi Arabia exhibits the lowest mean value (0.00688), indicating that the country’s credit risk, compared to the other two, is relatively stable. The small standard deviation (0.00599) suggests low volatility, implying that the credit risk does not fluctuate dramatically. The narrow range between the minimum (0.000061) and maximum (0.0392) also supports this, reflecting an overall stability in credit risk. Morocco’s mean value (0.01738) is higher than Saudi Arabia’s, indicating a higher sovereign credit risk on average. The standard deviation (0.00885) is also higher, signaling an increased volatility in credit risk levels. While Morocco’s minimum value (0.00208) is relatively low, its maximum (0.0472) is slightly higher than Saudi Arabia’s, suggesting that while the risk fluctuates more, the range is still somewhat contained. Egypt has the highest mean value (0.06017), reflecting a greater sovereign credit risk compared to Saudi Arabia and Morocco. The much larger standard deviation (0.03207) indicates that the risk fluctuates significantly. This is further confirmed by Egypt’s wide range, from a minimum of 0.0223 to a maximum of 0.28196, suggesting substantial instability and increased exposure to sovereign credit risk in comparison to the other two countries. Among the three countries, Saudi Arabia displays the most stable and lowest credit risk, while Egypt shows the highest risk and greatest volatility. Morocco falls between the two, with moderate risk and volatility.
The rejection of the null hypothesis of normality through the Jarque–Bera test and the stationary nature of the series as indicated by the Augmented Dickey–Fuller (ADF) test highlights the non-normal and non-random characteristics of the data. Artificial intelligence techniques excel at handling such non-stationary data by utilizing their capacity to model intricate temporal patterns without the need for strict assumptions of normality or stationarity (Robinson et al., 2010; Wang et al., 2018; Meng et al., 2019; Ao & Fayek, 2023; Bai et al., 2024). These methods are particularly effective in capturing the dynamic behaviors of time series data that exhibit non-stationary trends.
Figure 2 presents a heatmap illustrating the unconditional correlation of the implied default probability among the selected countries—Egypt, Morocco, and Saudi Arabia—over the period from 15 February 2011 to 6 September 2022. Each cell displays the credit risk correlation coefficient between a pair of countries, with the colors representing the strength of the correlation, ranging from low (dark purple) to high (light pink). The goal of this heatmap is to evaluate the dependency of the evolution of the default probability of these countries to check if there is a dependency due to political crises. We observe a consistent pattern of positive correlations between all pairs of countries, with correlation strengths varying. The correlation between the credit risk of Egypt and Saudi Arabia is relatively weak at 0.2, while the Egypt–Morocco pair shows a stronger correlation of 0.57. Additionally, the correlation between Saudi Arabia and Morocco stands at 0.37, indicating a moderate but noticeable relationship in their sovereign risk dynamics.

4. Methodology

In recent years, different approaches have been applied to increase the accuracy of individual models, leveraging errors to fine-tune predictions and integrating models to produce superior results. For this, in this paper, as the first step, several machine learning and deep learning models were used to predict the sovereign credit risk based on the historical implied default probabilities for Egypt, Saudi Arabia, and Morocco. These probabilities were calculated using J. C. Hull’s (2014) model, based on the one-year CDS spread obtained from the DataStream database, covering the period from 15 February 2011 to 6 September 2022. The machine learning models employed include Linear Regression, Ridge Regression, Lasso Regression, XGBoost, and Kernel Ridge, which were chosen for their capacity to capture diverse patterns in the data and offer a balance between simplicity and predictive power. In addition, deep learning models, such as Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, Bidirectional Long Short-Term Memory (BiLSTM) networks, and Gated Recurrent Units (GRUs), were selected for their capability to identify intricate patterns in time series data and handle long-term dependencies. All algorithms were trained and tested with a test size of 30%. The machine learning algorithms were used without manually tuning their hyperparameters. For the deep learning architectures, we summarize the parameters used in Table 2.
All algorithms tested take as an input a feature vector of the last eight past values of the probability of default.
By integrating these approaches, this study aims to enhance the credit risk prediction for the selected countries. So, in the second step, we compare and check the forecasting accuracy of the implemented models. Finally, the forecasted implied default probability is used in the third step to determine the forecasted credit rating based on the classification established by the Thomson Reuters StarMine Sovereign Risk model. The complete adopted methodology is summarized in Figure 3.

4.1. Step 1: Implied Default Probability Forecasting

In the first stage, the history of the implied default probability of Egypt, Morocco, and Saudi Arabia, for the period from 15 February 2011 to 6 September 2022, is used to predict sovereign credit. For this, machine learning and deep learning models are used.

4.1.1. Machine Learning Models

Linear Regression serves as a foundational model for predicting credit risk, establishing a baseline by fitting a linear relationship between the features and the target variable (implied default probability). It operates under the assumption that changes in the target variable can be explained by a weighted sum of the input features. Although it may struggle with non-linear relationships, it provides a benchmark against which more sophisticated models can be assessed. Ridge Regression and Lasso Regression, which we utilized as regularized versions of Linear Regression, aim to improve the model performance and reduce overfitting by adding penalties to the coefficients. Ridge Regression uses an L2 penalty (the sum of squared coefficients) to shrink the coefficients, making it less sensitive to multicollinearity and more suitable for datasets with many correlated features. In contrast, Lasso Regression employs an L1 penalty (the sum of absolute values of coefficients), which can reduce some coefficients to zero, effectively performing feature selection and making the model sparser. This is particularly advantageous when some predictors are not informative for forecasting credit risk (Zhou et al., 2020; Khan et al., 2022; Masi, 2024; Kamath et al., 2024). Furthermore, we employed Kernel Ridge Regression, which extends Ridge Regression by utilizing the kernel trick to map input features into a higher-dimensional space, allowing the identification of non-linear relationships in the data. By fitting a linear model in this new space, even if the original data are non-linear, by employing widely used kernel functions, such as the RBF and polynomials, Kernel Ridge Regression effectively models complex patterns within time series data (R. Zhang et al., 2023). Additionally, XGBoost, an advanced ensemble learning algorithm, was used due to its capability to build a series of decision trees in sequence, where each new tree focuses on correcting the errors made by the ones before it. It operates under a gradient-boosting framework that optimizes the loss function iteratively while incorporating regularization terms to prevent overfitting (Gogineni et al., 2024; L. Zhang & Jánošík, 2024). XGBoost’s ability to handle various data types and efficiently manage missing values makes it well suited for financial time series forecasting, where data may exhibit irregular patterns or volatility. Moreover, the model’s built-in feature importance metrics offer valuable insights into the variables most relevant to predicting credit risk.

4.1.2. Deep Learning Models

The RNN model is a neural network type that incorporates information from previous states into the current predictions. Unlike standard neural networks, RNNs have a special hidden layer that uses outputs from previous time steps to improve future forecasts. This makes them particularly effective for analyzing non-linear time series data, such as stock prices. However, traditional RNNs face the vanishing gradient problem, which hinders their capacity to retain information across long sequences. To address this issue, LSTM networks were developed, specifically the vanishing gradient problem. They have a memory cell that allows them to retain information over long periods while deciding which information to keep or forget using specific “gates”: the forget gate, the input gate, and the output gate. LSTM networks are extensively employed in time series predictions, natural language processing, and speech recognition applications. In this study, LSTMs were applied to predict the implied default probability using historical sovereign credit risk data. Furthermore, we employed BiLSTM networks to gain a more comprehensive view of the temporal patterns of the implied default probability by capturing both past and future information. Indeed, they are a variant of LSTMs that process data sequences in both directions: from past to future (left-to-right) and from future to past (right-to-left). BiLSTMs are particularly useful when it is crucial to understand the overall context of the sequence for making accurate predictions. Finally, another variant of RNNs is used, the GRU model, which is designed to simplify the structure of LSTMs while maintaining a high performance. Unlike LSTM, the GRU architecture merges the input and forget gates into a unified “update gate” and introduces a “reset gate” to regulate the information flow between hidden states. GRUs are simpler than LSTMs and require fewer computations, making them more efficient for certain time series forecasting tasks.
In this research, the performances of Linear Regression, Ridge Regression, Lasso Regression, Kernel Ridge, XGBoost, RNN, LSTM, BiLSTM, and GRU models were compared to evaluate their effectiveness in predicting sovereign credit risk using historical data. The findings will offer meaningful insights into how effectively these machine learning and deep learning models can capture complex dynamics of credit risk and deliver accurate forecasts.

4.2. Step 2: Performance Criteria

To evaluate how well the models predict sovereign credit risk during the crisis period, the actual and predicted values on the test set are compared. The assessment relies on several performance metrics, including the Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE). Such criteria are given as follows:
R M S E = 1 N i = 1 N x i x i 2
M A E = 1 N i = 1 N x i x i
M A P E = 1 N i = 1 N x i x i x i × 100
where N is the test set samples number, x i refers to the real value of the ith forecasting point, and x i is the corresponding predicted value.

4.3. Step 3: Sovereign Credit Rating Forecasting

Upon analyzing and contrasting the predictive performance of the employed models for sovereign credit risk, we proceeded to the third step, where the annual average of the implied default probabilities, as forecasted by the best-performing model, was used to determine the forecasted credit rating for the countries under study. This process followed the classification framework established by the Thomson Reuters StarMine Sovereign Risk model, which evaluates the likelihood of a sovereign default based on a combination of macroeconomic indicators, market data, and political risk factors. This comprehensive methodology provides a detailed assessment of sovereign risk, allowing for the assignment of credit ratings. Table 3 presents the rating categories along with their corresponding default probability ranges.

5. Results and Discussion

5.1. Implied Default Probability Forecasting Results

Based on this exhaustive experimental study between machine and deep learning algorithms—as evidenced by the results presented in Table 4, Table 5 and Table 6, which highlight the performance of the used models—we notice that Linear Regression ranks at the top of the list of all tested techniques on the provided dataset issued from our study. Concerning the deep learning architectures, Recurrent Neural Networks (RNNs) and Gated Recurrent Networks (GRUs) are competitive, respectively, for Egypt, Morocco, and Saudi Arabia. These architectures have proven their robustness to capture temporal dependencies between default probabilities during the period from February 2011 to September 2022. Despite the non-linear representation of LSTM and BiLSTM architectures, they fail in predicting the default probability, which can be explained by the small dataset which contains around 3k observations split into 70% for training and 30% for testing. In fact, the CDS-based implied default probability computing transforms the problem from non-linear to linear space. A complex machine learning algorithm is not required to predict future default probabilities.
A simple linear representation is sufficient for predicting sovereign credit risk. In addition, the Linear Regression outperforms all ML and DL algorithms and can be justified by the fact that the lag vector of eight keeps the forecasting problem in a low-dimensional space. The deep learning models rank at the top of the list of ML algorithms where a huge amount of data is present, as confirmed by Shahrour and Dekmak (2023). The most important interpretation of our results consists of the correct forecasting of peaks and valleys for each country using Linear Regression and other simple deep learning architectures (RNN and GRU), as shown in Figure 4, Figure 5 and Figure 6.
Given that x t represents the predicted implied default probability at the time t , and x t i , for i = 1 , , 8 , denotes the one-day lag of the implied default probability at different past days, the developed Linear Regression equations for Egypt, Morocco, and Saudi Arabia are given by Equations (4), (5), and (6), respectively.
S a u d i   A r a b i a :   x t    = 0.0001 0.10128   x t 1 + 0.06152   x t 2 + 0.01613 x t 3 + 0.10987 x t 4 0.1256   x t 5    + 0.0188   x t 6 + 0.13968 x t 7 + 0.87009   x t 8
M o r o c c o   :   x t = 0.0001 0.0510 x t 1 + 0.01165   x t 2 + 0.00279   x t 3 + 0.03783 x t 4 0.03360   x t 5 + 0.04928 x t 6 +   0.07505   x t 7 + 0.90300   x t 8
E g y p t   :   x t + 1 = 0.0003 0.01842   x t 1 0.01480   x t 2 0.01892   x t 3 0.00651   x t 4 + 0.07082   x t 5 0.15999   x t 6 0.03047   x t 7 + 1.13604   x t 8
The equations demonstrate that the probability of default is more correlated with the last three previous values than the older status. The equations illustrate the highest coefficient for these last values. According to these equations, the descriptive statistics of the predicted implied default probabilities for Egypt, Morocco, and Saudi Arabia from 7 September 2022 to 6 September 2023, presented in Table 7, offer insights into the relative credit risks of these countries during this period.
Egypt had the highest and most volatile default probability, with an average of 9.76%, reflecting a higher perceived credit risk and economic uncertainty. Morocco, on the other hand, had a low and stable default probability of around 1.61%, indicating a steady and low credit risk. Saudi Arabia exhibited the lowest implied default probability, averaging 0.53%, with minimal variation, suggesting a strong and stable credit profile. Overall, these results demonstrate that Saudi Arabia is perceived as the least risky, while Egypt faces higher, more fluctuating risks.

5.2. Implied Rating Forecasting Results

Based on the average implied default probability and following the classification set by the Thomson Reuters StarMine Sovereign Risk model, the forecasted implied ratings, for a horizon of one year, are shown in Table 8.
The forecasted implied ratings for 2023 reveal significant differences in the perceived creditworthiness of Egypt, Morocco, and Saudi Arabia. These results reflect the economic fundamentals of each country as well as their ability to manage the impacts of global shocks, particularly those related to the Russo-Ukrainian war. Egypt, with an implied rating of B, is perceived as the most vulnerable among the three countries. This rating indicates a high credit risk, driven by an economic situation marked by a large public debt, rampant inflation, and a heavy reliance on food imports (Badr & El khadrawi, 2016; Boumahdi, 2022; Oldenburg et al., 2022). The Russo-Ukrainian war exacerbated these vulnerabilities, as Egypt, a major importer of Russian and Ukrainian wheat, was severely affected by the surge in commodity prices. These pressures worsened the trade and fiscal deficits while eroding investor confidence. Morocco, with an implied rating of BBB, occupies an intermediate position. This rating indicates a moderate level of credit risk and a sufficient capacity to fulfill financial obligations, although the country remains vulnerable to external shocks. The war had a negative impact, primarily due to rising energy and fertilizer costs. However, Morocco managed to mitigate these effects through its exports, particularly of phosphates, and its relatively stable economic management (Thornary et al., 2022a). Its favorable geopolitical position and efforts to diversify its economy explain the more optimistic market perception of its credit risk. Saudi Arabia, with an implied rating of A, enjoys a perception of a low credit risk. This rating is underpinned by strong economic fundamentals, such as small public debt, substantial foreign reserves, and high oil revenues (Thornary et al., 2022b). Unlike Egypt and Morocco, Saudi Arabia benefited from the indirect effects of the Russo-Ukrainian war. The surge in oil prices bolstered its fiscal and trade surpluses, allowing the country to strengthen its financial position while continuing its economic diversification projects under Vision 2030 (Barry, 2022). The results obtained in this study are consistent with those of Abid and Abid (2024), who estimated the transition matrix of the implied ratings to forecast the credit risk of these countries. Their findings suggest that Egypt has a 68% probability of being in the B rating category, Morocco has a 45.8% probability of being in the BBB category, and Saudi Arabia has a 43% probability of being rated as an A. These probabilities align closely with our predicted implied ratings and default probabilities, further reinforcing the reliability of the results. The close match indicates that the forecasted ratings and the implied default probabilities provide a coherent picture of the credit risks in these countries, confirming that Egypt faces the highest credit risk, followed by Morocco, with Saudi Arabia remaining the most stable.

6. Conclusions and Managerial Implications

Forecasting the sovereign credit risk of selected MENA countries, representing varying levels of economic development and social welfare, during exogenous shocks related to the political crises is the main objective of this article. The sovereign default probabilities measured from the sovereign CDS spread, which indicates a relevant and robust measure of credit risk, is predicted to measure future risk by applying machine learning and deep learning models. The results emphasize the predictive accuracy and interpretability of simple models, such as Linear Regression which outperforms all tested models, and highlight the competitive performance of the Recurrent Neural Network (RNN) and Gated Recurrent Unit (GRU) architectures. These approaches captured temporal dependencies and successfully forecasted peaks and valleys in implied default probabilities, while more complex architectures, such as LSTM and BiLSTM, underperformed due to the limited dataset size and the problem’s linear characteristics.
The daily forecasted CDS-based implied default probabilities over a future year, predicted by the Linear Regression model, are subsequently used to forecast the rating categories of each country, based on the classification established by the Thomson Reuters StarMine Sovereign Risk model. The forecasted implied ratings for 2023 align with the predicted implied default probabilities, reinforcing the robustness of the results’ overall credit risk assessment for each country. Egypt’s B rating, Morocco’s BBB, and Saudi Arabia’s A reflect their respective credit risks and economic fundamentals. These ratings also corroborate previous findings by Abid and Abid (2024), providing a further validation of the methodology employed. Notably, these forecasts highlight the differentiated impact of the Russo-Ukrainian war on the economies of these three countries. Egypt, heavily exposed to food and financial shocks, emerged weakened. Morocco, despite challenges related to energy imports, demonstrated a relative resilience thanks to its diversification and economic stability. Saudi Arabia, on the other hand, capitalized on the situation to reinforce its economic position, illustrating the importance of strategic resource management and economic resilience in an unstable global environment.
From a managerial perspective, this paper offers critical insights for financial institutions, policymakers, and investors. First, the success of machine learning and deep learning models in accurately predicting sovereign credit risk, especially during periods of political instability and uncertainty, underscores the effectiveness of artificial intelligence models in predicting financial data. Despite being a simple model, Linear Regression has demonstrated its ability to provide reliable predictions even in a volatile and high-risk environment. These models can process complex data and uncover trends that may otherwise go unnoticed. For practitioners, this underscores the significance of choosing the appropriate level of model sophistication based on data characteristics and problem requirements. Second, the results provide actionable implications for policymakers in each country. For Egypt, the findings call for structural reforms to reduce economic vulnerabilities, manage debt levels, and stabilize inflation. Morocco’s performance underscores the value of diversification and trade stability, encouraging continued investment in these areas. Saudi Arabia’s low credit risk highlights the importance of strategic resource management and fiscal discipline, serving as a model for other oil-dependent economies. Finally, the methodology employed in this study demonstrates the value of integrating predictive analytics into sovereign risk assessment frameworks. By combining traditional financial models with advanced machine learning and deep learning techniques, this approach provides a comprehensive and data-driven basis for decision-making in volatile global markets. In conclusion, this study not only advances the tools for sovereign credit risk analysis but also provides practical guidance for stakeholders navigating an increasingly uncertain global economic environment. The alignment between forecasted ratings, default probabilities, and prior studies underscores the reliability and relevance of the results, offering a robust foundation for managing sovereign credit risk in diverse contexts. However, one of the limitations of this study lies in the underperformance of non-linear architectures, such as LSTM and BiLSTM, in predicting default probabilities. This shortcoming can be attributed to the relatively small size of the dataset, which restricted the ability of these complex models to fully exploit their non-linear representation capabilities.
To address this limitation, future research could focus on expanding the dataset by incorporating additional periods or countries, enabling a more comprehensive evaluation of these advanced architectures. Furthermore, exploring hybrid models that blend the simplicity of linear methods with the sophistication of non-linear approaches could provide valuable insights for improving the accuracy of sovereign credit risk predictions. Together, these efforts could further solidify the methodological and practical contributions of the sovereign credit risk analysis in increasingly volatile global markets.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are available from the sources cited.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Abid, A., & Abid, F. (2023). A methodology to estimate the optimal debt ratio when asset returns, and default probability follow stochastic processes. Journal of Industrial & Management Optimization, 19(10), 1. [Google Scholar]
  2. Abid, A., & Abid, F. (2024). Sovereign credit risk in Saudi Arabia, Morocco and Egypt. Journal of Risk and Financial Management, 17(7), 283. [Google Scholar] [CrossRef]
  3. Abid, A., Abid, F., & Kaffel, B. (2020). CDS-based implied probability of default estimation. The Journal of Risk Finance, 21(4), 399–422. [Google Scholar] [CrossRef]
  4. Abid, A., & Suissi, N. (2024). Sovereign CDS spread and term structure forecasting based on neural network. Global Business Review. [Google Scholar] [CrossRef]
  5. Annaert, J., De Ceuster, M., & De Jonghe, F. (2000). Modelling European credit spreads. Deloitte & Touche. [Google Scholar]
  6. Ao, S. I., & Fayek, H. (2023). Continual deep learning for time series modeling. Sensors, 23(16), 7167. [Google Scholar] [CrossRef]
  7. Apergis, N. (2015). Forecasting Credit Default Swaps (CDSs) spreads with newswire messages: Evidence from European countries under financial distress. Economics Letters, 136, 92–94. [Google Scholar] [CrossRef]
  8. Augustin, P., Sokolovski, V., Subrahmanyam, M. G., & Tomio, D. (2022). How sovereign is sovereign credit risk? Global prices, local quantities. Journal of Monetary Economics, 131, 92–111. [Google Scholar] [CrossRef]
  9. Avino, D., & Nneji, O. (2014). Are CDS spreads predictable? An analysis of linear and non-linear forecasting models. International Review of Financial Analysis, 34, 262–274. [Google Scholar] [CrossRef]
  10. Badr, O. M., & El khadrawi, A. F. (2016). Macroeconomic variables, government effectiveness and sovereign credit rating: A case of Egypt. Applied Economics and Finance, 3(4), 29–36. [Google Scholar] [CrossRef]
  11. Bai, M., Zhou, Z., Li, J., Chen, Y., Liu, J., Zhao, X., & Yu, D. (2024). Deep graph gated recurrent unit network-based spatial–temporal multi-task learning for intelligent information fusion of multiple sites with application in short-term spatial–temporal probabilistic forecast of photovoltaic power. Expert Systems with Applications, 240, 122072. [Google Scholar] [CrossRef]
  12. Barry, I. (2022). Arabie saoudite-situation économique et financière en 2022. Ambassade de France en Arabie Saudite—Service économique de Riyad. Available online: https://www.tresor.economie.gouv.fr/Pays/SA (accessed on 20 May 2025).
  13. Blair, D. (2013). Counterparty credit risk. In Financial derivatives. Working Paper. John Wiley & Sons, Inc. [Google Scholar] [CrossRef]
  14. Boumahdi, M. A. (2022). Fiche pays Egypte. Ministère de l’Economie des Finances et de la Souvraineté Industrielle et Numérique, Service Economique du Caire, Direction Générale du Trésort. [Google Scholar]
  15. Chen, K., Zhou, Y., & Dai, F. (2015, October 29–November 1). A LSTM-based method for stock returns prediction: A case study of China stock market. 2015 IEEE International Conference on Big Data (Big Data) (pp. 2823–2824), Santa Clara, CA, USA. [Google Scholar]
  16. Cipollini, A., & Missaglia, G. (2008). Forecasting industry sector default rates through dynamic factor models. Journal of Risk Model Validation, 2(3), 59–79. [Google Scholar] [CrossRef]
  17. Cortez, B., Carrera, B., Kim, Y. J., & Jung, J. Y. (2018). An architecture for emergency event prediction using LSTM recurrent neural networks. Expert Systems with Applications, 97, 315–324. [Google Scholar] [CrossRef]
  18. Dwyer, D., Zan, L., Shisheng, Q., Heather, R., & Jing, Z. (2012). CDS-implied EDF TM credit measures and fair-value spreads. In Basel III credit rating systems: An applied guide to quantitative and qualitative models (pp. 257–301). Palgrave Macmillan. [Google Scholar] [CrossRef]
  19. Flannery, M. J., Houston, J. F., & Partnoy, F. (2009). Credit default swap spreads as viable substitutes for credit ratings. University of Pennsylvania Law Review, 158, 2085. [Google Scholar]
  20. Gao, T., Chai, Y., & Liu, Y. (2017, November 20–22). Applying long short term memory neural networks for predicting stock closing price. 2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS) (pp. 575–578), Beijing, China. [Google Scholar]
  21. Gogineni, A., Panday, I. K., Kumar, P., & Paswan, R. K. (2024). Predicting compressive strength of concrete with fly ash and admixture using XGBoost: A comparative study of machine learning algorithms. Asian Journal of Civil Engineering, 25(1), 685–698. [Google Scholar] [CrossRef]
  22. Hilscher, J., & Wilson, M. (2017). Credit ratings and credit risk: Is one measure enough? Management Science, 63(10), 3414–3437. [Google Scholar] [CrossRef]
  23. Hull, J., Predescu, M., & White, A. (2004). The relationship between credit default swap spreads, bond yields, and credit rating announcements. Journal of Banking & Finance, 28(11), 2789–2811. [Google Scholar]
  24. Hull, J. C. (2014). Options, futures, and other derivatives. Pearson. [Google Scholar]
  25. Hung, C. H. D., Banerjee, A., & Meng, Q. (2017). Corporate financing and anticipated credit rating changes. Review of Quantitative Finance and Accounting, 48, 893–915. [Google Scholar] [CrossRef]
  26. International Monetary Fund. (2013). Chapter 2: A new look at the role of sovereign credit default swaps. In Global financial stability report (pp. 57–92). IMF. [Google Scholar]
  27. Jacobs, M., Jr., Karagozoglu, A. K., & Layish, D. N. (2016). Credit risk signals in CDS market vs agency ratings. The Journal of Risk Finance, 17(2), 194–217. [Google Scholar] [CrossRef]
  28. Jarrow, R. A., Lando, D., & Turnbull, S. M. (1997). A Markov model for the term structure of credit risk spreads. The Review of Financial Studies, 10(2), 481–523. [Google Scholar] [CrossRef]
  29. Kamath, M. V., Prashanth, S., Kumar, M., & Tantri, A. (2024). Machine-learning-algorithm to predict the high-performance concrete compressive strength using multiple data. Journal of Engineering, Design and Technology, 22(2), 532–560. [Google Scholar] [CrossRef]
  30. Khan, M. A., Khan, R., Algarni, F., Kumar, I., Choudhary, A., & Srivastava, A. (2022). Performance evaluation of regression models for COVID-19: A statistical and predictive perspective. Ain Shams Engineering Journal, 13(2), 101574. [Google Scholar] [CrossRef]
  31. Kiarie, J., Mwalili, S., & Mbogo, R. (2022). Forecasting the spread of the COVID-19 pandemic in Kenya using SEIR and ARIMA models. Infectious Disease Modelling, 7(2), 179–188. [Google Scholar] [CrossRef] [PubMed]
  32. Li, J., Hao, J., Sun, X., & Feng, Q. (2021). Forecasting China’s sovereign CDS with a decomposition reconstruction strategy. Applied Soft Computing, 105, 107291. [Google Scholar] [CrossRef]
  33. Li, Z., & Tam, V. (2017, November 27–December 1). A comparative study of a recurrent neural network and support vector machine for predicting price movements of stocks of different volatilites. 2017 IEEE Symposium Series on Computational Intelligence (SSCI) (pp. 1–8), Honolulu, HI, USA. [Google Scholar]
  34. Lima, P. A. S. B. D. (2021). Forecasting sovereign CDS returns via deep learning [Doctoral dissertation, Universidade de São Paulo]. [Google Scholar]
  35. Longstaff, F. A., Pan, J., Pedersen, L. H., & Singleton, K. J. (2011). How sovereign is sovereign credit risk? American Economic Journal: Macroeconomics, 3(2), 75–103. [Google Scholar] [CrossRef]
  36. Mao, H., Fang, P., Zheng, Y., Tian, L., Li, X., Wang, P., Peng, L., & Li, G. (2023). Continuous grip force estimation from surface electromyography using generalized regression neural network. Technology and Health Care, 31(2), 675–689. [Google Scholar] [CrossRef]
  37. Masi, F. (2024). Introduction to regression methods. In Machine learning in geomechanics 1: Overview of machine learning, unsupervised learning, regression, classification and artificial neural networks (pp. 31–92). ISTE Ltd.; John Wiley & Sons, Inc. [Google Scholar]
  38. McNally, S., Roche, J., & Caton, S. (2018, March 21–23). Predicting the price of bitcoin using machine learning. 2018 26th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP) (pp. 339–343), Cambridge, UK. [Google Scholar]
  39. Meng, Q., Wang, Y., An, J., Wang, Z., Zhang, B., & Liu, L. (2019, June 23–25). Learning non-stationary dynamic Bayesian network structure from data stream. 2019 IEEE Fourth International Conference on Data Science in Cyberspace (DSC) (pp. 128–134), Hangzhou, China. [Google Scholar]
  40. Moscatelli, M., Parlapiano, F., Narizzano, S., & Viggiano, G. (2020). Corporate default forecasting with machine learning. Expert Systems with Applications, 161, 113567. [Google Scholar] [CrossRef]
  41. Naifar, N. (2020). What explains the sovereign credit default swap spreads changes in the GCC region? Journal of Risk and Financial Management, 13(10), 245. [Google Scholar] [CrossRef]
  42. Neftci, S., Santos, A. O., & Lu, Y. (2005). Credit default swaps and financial crisis prediction (No. 114). Working Paper Series. FINRISK. [Google Scholar]
  43. Oldenburg, M., Boitiere, A., Jiquel, S., Boumahdi, M. A., & Cosson, A. (2022). La lettre economique d’Egypte (No. 134). Ambassade de France en République Arabe d’Egypte—Service économique du Caire. [Google Scholar]
  44. Paret, A. C., & Gilles, D. (2015). Sovereign default in emerging market countries: A transition model allowing for heterogeneity. Amundi Asset Management Working Paper, WP-049-2015. Amundi Asset Management. [Google Scholar]
  45. Piccolo, A., & Shapiro, J. (2022). Credit ratings and market information. The Review of Financial Studies, 35(10), 4425–4473. [Google Scholar] [CrossRef]
  46. Robinson, J. W., Hartemink, A. J., & Ghahramani, Z. (2010). Learning non-stationary dynamic bayesian networks. Journal of Machine Learning Research, 11(12), 3647–3680. [Google Scholar]
  47. Rodríguez, I. M., Dandapani, K., & Lawrence, E. R. (2019). Measuring sovereign risk: Are CDS spreads better than sovereign credit ratings? Financial Management, 48(1), 229–256. [Google Scholar] [CrossRef]
  48. Romanyuk, K. (2021). Impact of the COVID-19 pandemic on the US credit default swap market. Complexity, 2021(1), 1656448. [Google Scholar] [CrossRef]
  49. Samarawickrama, A. J. P., & Fernando, T. G. I. (2017, December 15–16). A recurrent neural network approach in predicting daily stock prices an application to the Sri Lankan stock market. 2017 IEEE International Conference on Industrial and Information Systems (ICIIS) (pp. 1–6), Peradeniya, Sri Lanka. [Google Scholar]
  50. Selvin, S., Vinayakumar, R., Gopalakrishnan, E. A., Menon, V. K., & Soman, K. P. (2017, September 13–16). Stock price prediction using LSTM, RNN and CNN-sliding window model. 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI) (pp. 1643–1647), Udupi, India. [Google Scholar]
  51. Shahrour, M. H., Arouri, M., & Rao, S. (2024). Linking climate risk to credit risk: Evidence from sectorial analysis. The Journal of Alternative Investments, 27(3), 118–135. [Google Scholar] [CrossRef]
  52. Shahrour, M. H., & Dekmak, M. (2023). Intelligent stock prediction: A neural network approach. International Journal of Financial Engineering, 10(01), 2250016. [Google Scholar] [CrossRef]
  53. Shaw, F., Murphy, F., & O’Brien, F. (2014). The forecasting efficiency of the dynamic Nelson Siegel model on credit default swaps. Research in International Business and Finance, 30, 348–368. [Google Scholar] [CrossRef]
  54. Siami-Namini, S., & Namin, A. S. (2018). Forecasting economics and financial time series: ARIMA vs. LSTM. arXiv, arXiv:1803.06386. [Google Scholar]
  55. Thornary, B., Fèvre, A. S., Meyer, A., Lequillerier, V., El Kasmi, S., Morin, L., & Laboureau, T. (2022a). Direction de l’évaluation des études et de la prospective—Fiche Maroc. BPIFRANCE. [Google Scholar]
  56. Thornary, B., Fèvre, A. S., Meyer, A., Lequillerier, V., El Kasmi, S., Morin, L., & Laboureau, T. (2022b). Direction de l’évaluation des études et de la prospective—Fiche pays Arabi Saudite. BPIFRANCE. [Google Scholar]
  57. Vieira, M., & George, B. (2016). Starmine sovereign risk model. Refinitiv, RE105787/12-19. Available online: https://solutions.refinitiv.com/StarMineNAsia-Whitepapers (accessed on 20 February 2025).
  58. Vukovic, D. B., Romanyuk, K., Ivashchenko, S., & Grigorieva, E. M. (2022). Are CDS spreads predictable during the COVID-19 pandemic? Forecasting based on SVM, GMDH, LSTM and Markov switching autoregression. Expert Systems with Applications, 194, 116553. [Google Scholar] [CrossRef]
  59. Wang, Y., Liao, W., & Chang, Y. (2018). Gated recurrent unit network-based short-term photovoltaic forecasting. Energies, 11(8), 2163. [Google Scholar] [CrossRef]
  60. Zhang, L., & Jánošík, D. (2024). Enhanced short-term load forecasting with hybrid machine learning models: CatBoost and XGBoost approaches. Expert Systems with Applications, 241, 122686. [Google Scholar] [CrossRef]
  61. Zhang, R., Li, Y., & Gui, Y. (2023). Prediction of rock blasting induced air overpressure using a self-adaptive weighted kernel ridge regression. Applied Soft Computing, 148, 110851. [Google Scholar] [CrossRef]
  62. Zhou, Q., Wang, C., & Zhang, G. (2020). A combined forecasting system based on modified multi-objective optimization and sub-model selection strategy for short-term wind speed. Applied Soft Computing, 94, 106463. [Google Scholar] [CrossRef]
  63. Zhu, H. (2006). An empirical comparison of credit spreads between the bond market and the credit default swap market. Journal of Financial Services Research, 29, 211–235. [Google Scholar] [CrossRef]
Figure 1. Time series plots of the implied default probability for Egypt, Morocco, and Saudi Arabia. Note: the x-axis represents the days from 15 February 2009 to 6 September 2022; for example, 500 corresponds to 14 January 2013, and 1000 corresponds to 15 December 2014.
Figure 1. Time series plots of the implied default probability for Egypt, Morocco, and Saudi Arabia. Note: the x-axis represents the days from 15 February 2009 to 6 September 2022; for example, 500 corresponds to 14 January 2013, and 1000 corresponds to 15 December 2014.
Jrfm 18 00300 g001
Figure 2. Heatmap of correlations between implied default probabilities of Egypt, Morocco, and Saudi Arabia over the period from 15 February 2011 to 6 September 2022.
Figure 2. Heatmap of correlations between implied default probabilities of Egypt, Morocco, and Saudi Arabia over the period from 15 February 2011 to 6 September 2022.
Jrfm 18 00300 g002
Figure 3. Methodology for forecasting sovereign credit risk.
Figure 3. Methodology for forecasting sovereign credit risk.
Jrfm 18 00300 g003
Figure 4. The test performance of Linear Regression and RNN models for Egypt’s implied default probability forecasting.
Figure 4. The test performance of Linear Regression and RNN models for Egypt’s implied default probability forecasting.
Jrfm 18 00300 g004
Figure 5. The test performance of Linear Regression and GRU models for Morocco’s implied default probability forecasting.
Figure 5. The test performance of Linear Regression and GRU models for Morocco’s implied default probability forecasting.
Jrfm 18 00300 g005
Figure 6. The test performance of Linear Regression and GRU models for Saudi Arabia’s implied default probability forecasting.
Figure 6. The test performance of Linear Regression and GRU models for Saudi Arabia’s implied default probability forecasting.
Jrfm 18 00300 g006
Table 1. Data descriptive statistics.
Table 1. Data descriptive statistics.
Saudi ArabiaMoroccoEgypt
Min0.00006190.0020880.02230
Mean0.00688160.0173850.06017
Max0.03920320.0472950.28196
Sd0.0059912410.0088527340.03207076
J-B test
(p-value)
1247.4
(<2.2 × 10−16)
164.29
(<2.2 × 10−16)
6980.9
(<2.2 × 10−16)
ADF
(p-value)
−3.9823
(0.011)
−3.7785
(0.02005)
−2.7323
(0.2683)
Table 2. Deep learning architectures.
Table 2. Deep learning architectures.
ArchitectureUnits (Numbers)Activation Function
LSTMLSTM units: 50
Output: 1 neuron
ReLU
Sigmoid
RNNRNN units: 50
Output: 1 neuron
ReLU
Sigmoid
GRUGRUs: 50
Output: 1 node
ReLU
Sigmoid
Bi-LSTMBi-LSTM units: 50 (bidirectional)
Output: 1 neuron
ReLU
Sigmoid
Table 3. Mapping of StarMine Sovereign Risk probability of defaults to letter grades.
Table 3. Mapping of StarMine Sovereign Risk probability of defaults to letter grades.
If One-Year PD (%) Is Greater ThanAnd One-Year PD (%) Is Less Than or Equal toThen Rating Is
0.000%0.123%AAA
0.123%0.332%AA
0.332%0.851%A
0.851%1.879%BBB
1.879%4.107%BB
4.107%12.052%B
12.052%20.973%CCC
20.973%100.0%CC
Source: Refinitiv/StarMine Sovereign Risk Model by StarMine Research Team. RE105787/12-19.
Table 4. Performance criteria for implied default probability forecasting for Egypt using machine learning and deep learning models.
Table 4. Performance criteria for implied default probability forecasting for Egypt using machine learning and deep learning models.
EgyptMethodsModelRMSEMAE MAPE
Machine LearningLinear Regression00.0018642.48
Ridge Regression0.010.0059379.07
Lasso Regression0.040.03099859.02
Kernel Ridge0.010.0048236.21
XGBoost0.020.0047854.72
Deep Learning RNN0.0023220.0023223.18
LSTM0.0024390.0024393.5
BiLSTM0.0030480.0030484.41
GRU0.0036980.0036987.13
Table 5. Performance criteria for implied default probability forecasting for Morocco using machine learning and deep learning models.
Table 5. Performance criteria for implied default probability forecasting for Morocco using machine learning and deep learning models.
MoroccoMethodsModelRMSEMAE MAPE
Machine LearningLinear Regression00.0002723.2
Ridge Regression0.010.0049677.54
Lasso Regression0.010.010435163.4
Kernel Ridge00.00149713.78
XGBoost00.00125428.75
Deep Learning RNN00.00100515.06
LSTM00.00111420.72
BiLSTM00.00069111.67
GRU00.0005168.7
Table 6. Performance criteria for implied default probability forecasting for Saudi Arabia using machine learning and deep learning models.
Table 6. Performance criteria for implied default probability forecasting for Saudi Arabia using machine learning and deep learning models.
Saudi ArabiaMethodsModelMAERMSEMAPE
Machine LearningLinear Regression0.25 × 10−63.56 × 10−45.66
Ridge Regression00.00278296.84
Lasso Regression0.010.004401154.83
Kernel Ridge00.00209337.94
XGBoost00.0004187.27
Deep Learning RNN0.0005340.00053415.27
LSTM0.0004570.0004578.38
BiLSTM0.0004280.0004287.77
GRU0.0004270.0004278.59
Table 7. Descriptive statistics of the predicted implied default probability for Egypt, Morocco, and Saudi Arabia from 7 September 2022 to 6 September 2023.
Table 7. Descriptive statistics of the predicted implied default probability for Egypt, Morocco, and Saudi Arabia from 7 September 2022 to 6 September 2023.
CountryMinMaxMeanSd
Egypt0.0759930.1369740.0976440.017155
Morocco0.0153970.0164420.0161320.000231
Saudi Arabia0.0033660.0062080.005390.000776
Table 8. CDS-based implied rating for Egypt, Morocco, and Saudi Arabia.
Table 8. CDS-based implied rating for Egypt, Morocco, and Saudi Arabia.
CountryEgyptMoroccoSaudi Arabia
CDS-based implied ratingBBBBA
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Abid, A. Forecasting Sovereign Credit Risk Amidst a Political Crisis: A Machine Learning and Deep Learning Approach. J. Risk Financial Manag. 2025, 18, 300. https://doi.org/10.3390/jrfm18060300

AMA Style

Abid A. Forecasting Sovereign Credit Risk Amidst a Political Crisis: A Machine Learning and Deep Learning Approach. Journal of Risk and Financial Management. 2025; 18(6):300. https://doi.org/10.3390/jrfm18060300

Chicago/Turabian Style

Abid, Amira. 2025. "Forecasting Sovereign Credit Risk Amidst a Political Crisis: A Machine Learning and Deep Learning Approach" Journal of Risk and Financial Management 18, no. 6: 300. https://doi.org/10.3390/jrfm18060300

APA Style

Abid, A. (2025). Forecasting Sovereign Credit Risk Amidst a Political Crisis: A Machine Learning and Deep Learning Approach. Journal of Risk and Financial Management, 18(6), 300. https://doi.org/10.3390/jrfm18060300

Article Metrics

Back to TopTop