# Forecasting CDS Term Structure Based on Nelson–Siegel Model and Machine Learning

Authors: Won Joong Kim; Gunho Jung; Sun-Yong Choi
Journal: Complexity
 (2020)

---

## Abstract

In this study, we analyze the term structure of credit default swaps (CDSs) and predict future term structures using the Nelson–Siegel model, recurrent neural network (RNN), support vector regression (SVR), long short-term memory (LSTM), and group method of data handling (GMDH) using CDS term structure data from 2008 to 2019. Furthermore, we evaluate the change in the forecasting performance of the models through a subperiod analysis. According to the empirical results, we confirm that the Nelson–Siegel model can be used to predict not only the interest rate term structure but also the CDS term structure. Additionally, we demonstrate that machine-learning models, namely, SVR, RNN, LSTM, and GMDH, outperform the model-driven methods (in this case, the Nelson–Siegel model). Among the machine learning approaches, GMDH demonstrates the best performance in forecasting the CDS term structure. According to the subperiod analysis, the performance of all models was inconsistent with the data period. All the models were less predictable in highly volatile data periods than in less volatile periods. This study will enable traders and policymakers to invest efficiently and make policy decisions based on the current and future risk factors of a company or country.


---

## Body

## 1. Introduction

A credit default swap (CDS) is a credit derivative based on credit risk, similar to a bond. The prices of both CDSs and bonds change depending on the risk of the reference entity. If the reference entity has a higher risk, then the CDS spread is set higher. To manage credit risk, we can use a CDS contract. The CDS seller (protection seller) insures the protection buyer’s risk in the event of a credit default, such as bankruptcy of the reference entity, debt repudiation, or, in the case of a sovereign bond, a moratorium. There are two ways for a protection seller to compensate the protection buyer’s loss. The first is to buy the underlying asset at face value; the second is to pay the difference between the remaining value and the face value. In this way, the protection buyer can hedge his or her credit risk and give the CDS spread to the protection seller.A CDS spread is an insurance fee that a protection buyer pays to the protection seller, often quarterly. Its value is determined by factors such as the probability of credit default and recovery rate. The recovery rate is the percentage of the bond value that the reference entity offers to the protection buyer when a credit default happens. Therefore, if the recovery rate is high, the CDS spread will be low. The CDS spread will be high if the default rate is high, which indicates a high probability of credit default. Because the CDS spread indicates the bankruptcy risk of institutions or countries, it is an important economic index that is being actively traded. According to the Bank for International Settlements, the total outstanding notional amount of CDS contracts was $7809 billion in the first half of 2019.To date, numerous studies have been conducted on the prediction of financial asset values. For example, Li and Tam [1] forecasted stock price movements of different volatilities using a recurrent neural network (RNN) and support vector machine (SVM). Chen et al. [2] predicted the movement of the Chinese stock market using a long short-term memory- (LSTM-) based model. Gao et al. [3] also used LSTM to predict stock prices. However, few studies have been conducted on forecasting the CDS term structure. Shaw et al. [4] used the Nelson–Siegel model to make 1-, 5-, and 10-day forecasts of the CDS curve and compared its efficiency with that of the random-walk method. They showed that, although the 1-day forecast was not very effective, the accuracy of the 5- and 10-day forecasts outperformed those of the random-walk model. Avino and Nneji [5] predicted daily quotes of iTraxx Europe CDS indices using linear and nonlinear forecasting models, such as autoregressive (AR) and Markov switching AR models. They found that the AR model often outperforms Markov switching models, but Markov switching models offer a good in-sample fit for iTraxx index data. Sensoy et al. [6] used permutation entropy to test the weak-form efficiency of CDS markets in some countries. They found that CDS markets could be efficient during crisis periods, which implies that the impact of a crisis on CDS market efficiency is limited, and Asian markets outperformed the other tested markets in terms of efficiency. In addition, they showed a negative linear correlation between a country’s CDS efficiency and daily CDS levels. Neftci et al. [7] asserted that CDS markets provide unique information on default probability. They showed that the information provided by a CDS regarding the default risk of a sovereign bond is more accurate than the information from a bond spread provided by the corresponding treasury using a stochastic differential equation based on the Markov process. Duyvesteyn and Martens [8] used the structural model for a sovereign bond from Gray et al. [9] to predict how exchange rate returns and volatility changes affect market CDS spread movements. The model results, such as default probability and spreads, were strongly correlated with CDS spreads. Their results also rejected their hypothesis that changes in sovereign credit spreads are correlated to changes in sovereign market spreads.As mentioned above, several studies have attempted to predict various financial market indices with machine-learning methods; however, research on CDS term structure is limited. CDS term structure reflects the conditions for monetary policy and companies’ future risk expectations. CDS spread can be classified into two types. The first one is sovereign CDS, which has a country as its reference entity. Sovereign CDS spreads reflect the creditworthiness of a country. That is, the sovereign CDS spread can be considered as a measure of the sovereign credit risk [10]. Furthermore, the sovereign CDS spreads contain some components that are attributed to global risk, according to Pan and Singleton [11] and Longstaff et al. [12]. Studies on sovereign CDS include Pan and Singleton [11], Longstaff et al. [12], Blommestein et al. [10], Galariotis et al. [13], Srivastava et al. [14], Ho [15], and Augustin [16]. The other type of CDS is written with respect to one single reference entity, the so-called single-name CDS. In addition, CDS sector indices are based on the most liquid 5-year term, are equally weighted, and reflect an average midspread calculation of the given index’s constituents. However, single-name CDS spreads are much less liquid than indices [17–19]. In several studies, the creditworthiness of individual industries was investigated using CDS sector data [19–22].The CDS term structure is important because it integrates the future risk expectations of both markets and companies by offering CDS spreads over time. Thus, we can confirm various types of information from the CDS term structure, such as firm leverage and volatility, as shown by Han and Zhou [23]. Furthermore, understanding the implications of the term structure also provides us with a method of extracting this information and predicting the effect of financial events and risk on it. Despite the large number of studies on CDS, studies that attempt to forecast its term structure remain few.In this study, we analyze the CDS term structure, particularly sovereign CDS, forecast it using machine-learning models, and identify the most suitable model for predicting CDS term structure. We consider model-driven and data-driven methods: the Nelson–Siegel model, RNN, SVR, LSTM, and GMDH. The Nelson–Siegel model, as a model-driven method, was devised to fit the yield term structure; however, in this study, it was fitted to the CDS term structure to extract the term structure parameters and forecast the CDS term structure with the AR(1) model. RNN, SVR, LSTM, and GMDH are machine-learning models that specialize in predicting time-series data. RNN memorizes previous information and uses it to predict future information. LSTM is basically the same as RNN; however, it memorizes only significant information based on some calculations. SVR is derived from the structural risk minimization principle [24] and has been used for prediction in many fields [25–27]. Among the machine-learning methods, a GMDH network is a system identification method that has been used in various fields of engineering to model and forecast the nature of unknown or complex systems based on a given set of multi-input-single-output data pairs [28–30].Machine learning is widely used in various fields to analyze data and forecast future flow. For example, Yan and Ouyang [31] compared the efficiency of the LSTM model in predicting financial time-series data with that of other machine-learning models, such as SVM and K-nearest neighbor. Baek and Kim [32], Yan and Ouyang [31], Cao et al. [33], and Fischer and Krauss [34] also analyzed and forecasted financial data using machine learning. Machine learning is widely used in medical research. Thottakkara et al. [35], Motka et al. [36], Boyko et al. [37], and Tighe et al. [38] studied and predicted various illnesses and clinical data with machine-learning models. Many studies have also been performed to predict weather conditions using machine learning. Choi et al. [39], Haupt and Kosovic [40], Rhee and Im [41], and James et al. [42] conducted research on forecasting weather conditions. Ma et al. [43] and Li et al. [44] used a convolutional neural network (CNN) to predict a transportation network. Furthermore, GMDH has been widely used for time-series prediction [45–47]. As in these studies, we will apply machine-learning methods to forecast the CDS term structure and identify the most efficient method. There are not many studies on financial data using machine-learning methods compared to other areas, and to the best of our knowledge, this work is the first to present a forecasting model for CDS data. Therefore, although there are many prediction methods, we especially focus on methods which are generally used in the prediction of time-series data, such as LSTM, RNN, SVR, and GMDH.Methodologically, we adopt Nelson–Siegel as a model-driven method and RNN, LSTM, SVR, and GDMH as data-driven methods to predict the CDS term structure for the period (2008–2019). We optimize the data-driven models using a grid search algorithm with the Python technological stack. Furthermore, these tests are explored using subperiod analyses to investigate changes in the model performances over the experimental period. Specifically, we split the entire sample period into two subperiods: January 2008–December 2011 (subperiod 1) and January 2012–December 2019 (subperiod 2), because subperiod 1 contains financial market turbulence due to the global financial crisis and European debt crisis. Through this subperiod analysis, we investigate the change in the forecasting performance of all methods in both high-variance and relatively low-variance data. This kind of subperiod analysis is common in other studies [48–51].In time-series forecasting, sequence models, either RNN, LSTM, or a combination of both, are frequently used owing to considerations of time. The sequence model recognizes time as an order and can check how it changes according to the order; therefore, it can be applied to data, such as weather and finance. According to Siami-Namini and Namin [52] and McNally et al. [53], neural network (NN) models, such as RNN and LSTM, outperformed conventional algorithms, as measured by their autoregressive integrated moving averages (ARIMAs), when using financial data or bitcoin prices. McNally et al. [53] also evaluated the performance of LSTM using volatile Bitcoin data, and Cortez et al. [54] used data from the Republic of Guatemala to predict emergency events. Furthermore, LSTM is known to be better than RNN because it is modified to correct the disadvantages of RNN; however, it appears to depend on the dataset. For example, Samarawickrama and Fernando [55] demonstrated that LSTM exhibited higher accuracy than RNN when predicting stock prices. However, Selvin et al. [56] also compared RNN with LSTM in forecasting stock prices and found that RNN outperformed LSTM. Therefore, in this study, we used both RNN and LSTM to confirm whether LSTM outperforms RNN when forecasting CDS spreads. Ultimately, the motivation for conducting this study is to compare the CDS forecasting performance between the Nelson-Siegel model and the RNN, LSTM, SVR, and GDMH models, to determine the difference between model-driven and data-driven methods.This paper is organized as follows: in the next section, we review our dataset and present a statistical summary of the CDS term structure; we describe our methods: Nelson–Siegel, RNN, SVR, LSTM, and GMDH, and we explain hyperparameter optimization and its application to the CDS term structure;Section 3 presents our forecasting results on CDS term structure with various error estimates and demonstrates the performance of each model; and Section 4 provides a summary and concluding remarks.


## 2. Data Description and Methods

### 2.1. Data Description

The CDS spread can be classified into several categories. The classification method usually depends on the frame of the credit event. The full restructuring clause is the standard term. Under this condition, any restructuring event could be a credit event. The modified restructuring clause limits the scope of opportunistic behavior by sellers when restructuring agreements do not result in a loss. While restructuring agreements are still considered as credit events, the clause limits the deliverable obligations to those with a maturity of less than 30 months after the termination date of the CDS contract. Under the modified contract option, any restructuring event, except the restructuring of bilateral loans, could be a credit event. Additionally, the modified-modified restructuring term is introduced because modified restructuring has been too severe in its limitation of deliverable obligations. Under this term, the remaining maturity of deliverable assets must be less than 60 months for restructured obligations and 30 months for all other obligations. Under the no restructuring contract option, all restructuring events are excluded under the contract as “trigger events.”For this type of CDS, we will use a full restructuring sovereign CDS spread dataset because other datasets are unavailable for long periods. Sovereign CDS spread reflects the market participants’ perceptions of a country’s credit ratings. Our data cover the period from October 2008 to October 2019 and maturities of six months and 1, 2, 3, 4, 5, 7, 10, 20, and 30 years. All data were sourced from Datastream and correspond to the daily closing price of the CDS spread. The term structure of the CDS spread normally shows upward sloping curves, as seen in Figure1. Furthermore, CDS spreads seem to be lower as they get closer to the current date with no exceptions. Table 1 provides summary statistics of the CDS data. We can also verify that spreads with longer maturities have higher prices in terms of both mean and percentile. It is interesting to note that the standard deviation is also higher when the maturity is longer, which implies that the market predictions are highly unstable for longer periods.Figure 1
CDS term structure from 2008 to 2019.Table 1
Summary statistics for the historical CDS term structure.
IndexMeanStd. dev.1st per.10th per.25th per.Median75th per.90th per.99th per.CDS6M12.0819.99514.7456.2639.12213.68822.9858CDS1Y12.3059.71824.846.549.71514.15823.3957.43CDS2Y14.11710.1264.026.217.511.40616.4923.5462CDS3Y16.08310.8385.27.299.06313.3519.4826.5768CDS4Y19.03811.5576.298.5711.3316.00523.0430.74373CDS5Y22.15412.357.9110.3813.8819.1627.78335.56178CDS7Y26.71511.81911.9514.9518.823.5732.49940.73178CDS10Y31.0211.81314.1217.69523.79027.96336.78344.77480CDS20Y33.90311.98617.8318.7724.3334.0139.59747.95280CDS30Y34.70912.21416.78819.0424.15935.48540.49349.26580per.: percentile.


### 2.2. Nelson–Siegel Model

Nelson and Siegel [57] proposed a parsimonious model, and it is widely used to predict the interest rate term structure. The formula is as follows:(1)ftτ=β1t+β2t1−eλtτλtτ+β3t1−eλtτλtτ−e−λtτ,where λt is the time-decay parameter; τ is the maturity; and β1t, β2t, and β3t are the three Nelson–Siegel parameters. β1t is the long-term component of the yield curve as it does not decay to 0 and remains constant for all maturities. β2t is the short-term factor, which starts at 1 but quickly decays to 0. Finally, β3t starts at 0 and increases before decaying back to 0; hence, it is medium term, which creates a hump in the yield curve.The Nelson–Siegel model is a simple but effective method for modeling a term structure, and various studies have used the model to predict the yield curve or other term structures. For example, Shaw et al. [4] forecasted CDS using the Nelson–Siegel model to fit the CDS curve. Guo et al. [58] used the Nelson–Siegel model to model the term structure of implied volatility. GrØnborg and Lunde [59] used it to model the term structure of future oil contracts and forecast the prices of these contracts, while West [60] determined the future price of agricultural commodities. In particular, the CDS term structure has a strong relationship with the interest rate term structure. For example, Chen et al. [61] found that interest rate factors not only affected credit-spread movements but also forecasted future credit risk dynamics. They claimed that the different frequency components of interest rate movements affected the CDS term structure in various industrial sectors and credit rating classes. Specifically, worsening credit conditions tend to lead to future easing of monetary policy, leading to lower current forward interest rate curves. On the contrary, positive shocks to the interest rate narrow the credit spread at long maturities. Tsuruta [62] tried to decompose the yield and CDS term structure into risk and nonrisk structures and found that credit risk components have a negative relationship to the local equity market.In this study, we attempted to fit the CDS curve to the Nelson–Siegel model by estimating the time-decay parameterλt and Nelson–Siegel parameters β1t, β2t, and β3t. We can estimate Nelson–Siegel parameters using various models, such as autoregressive-moving-average (ARMA) and ARIMA, and select the most accurate model. For example, Shaw et al. [4] used the AR(1) process to estimate β1t, β2t, and β3t. Here, we used the AR(1) process to estimate Nelson–Siegel parameters and time-decay parameters. The error measures mean squared error (MSE), root MSE (RMSE), mean percentage error (MPE), mean absolute percentage error (MAPE), and mean absolute error (MAE) to compare the efficiency of this method with that of other methods, such as RNN or LSTM.


### 2.3. SVR

SVR is a field of machine-learning models derived from SVM. SVM is an algorithm that returns a hyperplane that separates the training samples into two labels, positive and negative. We refer to the distance between the closest point and the hyperplane as the “margin,” and the goal of SVM is to identify the hyperplane that maximizes the margin. There are two types of margin. The first type is a hard margin, which is for linearly separable datasets, meaning that every point does not violate its label. In other words, all the points can be classified into their labels with a hyperplane. The second one is a soft margin, which is for nonseparable cases. In this case, some points in the dataset, called “outliers,” are incorrectly classified. There are two ways to select a soft margin hyperplane. On the one hand, we can make the margin larger and take more errors (outliers). This is usually used for datasets that have only a small number of outliers. On the other hand, we can choose a hyperplane that has a small margin and minimize the empirical errors. This is useful for datasets with dense point distributions, where it is difficult to separate the data explicitly.Additionally, the kernel trick can be used for linearly nonseparable datasets. Kernel represents a function that maps origin data points to a higher dimensional dataset that is separable. The reason it is called the “kernel trick” is that, although the dimension of the dataset is increased, the cost of the algorithm does not increase much.SVM originated from the statistical learning theory introduced by Vapnik and Chervonenkis. The characteristic idea of SVM is to minimize the structural risk, while artificial neural networks (ANNs) minimize the empirical risk. Furthermore, SVM theoretically demonstrates better forecasting than articular neural networks, according to Gunn et al. [63] and Haykin [64].SVR is derived from SVM. It is a nonlinear kernel-based approach, and the main idea is to identify a function whose deviation from the actual data is located within the predetermined scale. SVR is applied to a given datasetxi,yii=1n, where xi is the input vector, yi is the output, and n is the total number of data points. The following formulation was introduced by Pérez-Cruz et al. [65]. SVR assumes that the function is a nonlinear function of the form fx=wTϕx+b, where w and b are the weight and constant, respectively. ϕx denotes a mapping function in the feature space. Then, weight vector w and the constant b are estimated by minimizing the following optimization problem:(2)minw,b,ζi,ζi∗12w2+C∑i=1nζi+ζi∗,(3)subject toyi−wTϕxi+b≤ϵ+ζi,(4)wTϕxi+b−yi≤ϵ+ζi∗,ζi,ζi∗≥0,where C>0 is the prespecified value and ζi and ζi∗ are slack variables indicating the upper and lower constraints, respectively. Setting ζi=0andζi∗=0, equations (3) and (4) become the ϵ-loss function introduced by Vapnik. C is the regularization parameter, and ϕ⋅ is a nonlinear transformation to a higher dimensional space, also known as feature space.Using Lagrange multipliers and the Karush–Kuhn–Tucker condition, the dual problem for the optimization problem (2)–(4) can be obtained:(5)maximize:Ld=ϵ∑i=1nαi+αi∗−∑i=1n∑j=1nαi−αi∗αj−αj∗ϕTxiϕxi,subject to∑i=1nαi−αi∗=0,0≤αi,αi∗≤C.To solve the above problem, we do not identify the nonlinear functionϕ⋅. The solution can be obtained as(6)fx=∑i=1nαi−αi∗Kx,xi+b,where Kx,xi is called the kernel function, defined as Kxi,xj=ϕxi⋅ϕxj. Any kernel function satisfying Mercer’s condition can be used as the kernel function (see Mohri et al. [66]).The selection of the kernel has a significant impact on its forecasting performance. It is a common practice to estimate a range of potential settings and use cross-validation over the training set to determine the best one. In this research, we use three kernel functions: polynomial, Gaussian, and Sigmoid, as presented in Table2.Table 2
Summary of kernels.
Types of kernelKernelKu,vPolynomial kernelu⋅vdGaussian kernelexp−u−v2/2σ2Sigmoid kerneltanhηu⋅v+νCao and Tay [67] provided a sensitivity of SVMs to the parameters C and ϵ. C and ϵ play an important role in the performance of SVR. Therefore, it is necessary to choose these parameters properly.


### 2.4. RNN

An ANN is a classification or prediction process that imitates human neurons. The output of a simple ANN model is generated by multiplying weights assigned to input data. After comparing the output data and the real values to be predicted, we create new weights adjusted according to the error. The step in which weights are multiplied by the input data is called forward propagation, and the step in which the error is calculated and weights are adjusted is called backpropagation. The final goal of the ANN model is to determine the weights that minimize the error between the predicted and target values.A CNN is a machine-learning method that uses a neural network algorithm. It consists of convolution layers, pooling layers, and neural network layers. A convolution layer uses a “filter” to analyze data, typically vectorized image data. The filter analyses small sections while moving over the entire dataset, and each section expresses a “feature” of the data with pooling layers.An RNN is another representative neural network model that has a special hidden layer. While a simple neural network has a backpropagation algorithm and adjusts its weights to reduce prediction errors, the RNN has a hidden layer that is modified by the hidden layer of the previous state. Each time the algorithm operates, the RNN hidden layer affects the next hidden layer of the algorithm. Because of its characteristics, RNN is an optimized method to analyze and predict nonlinear time-series data, such as stock prices. It is an algorithm operating in sequence with input and output data. It can return a single output from one or more input data and return more than one output from one or more input data. One of its characteristics is that it returns the output in every hidden time-step layer and simultaneously sends it as input data to the next layer; we demonstrate the simplified structure in Figure2. RNN has a memory cell in the hidden layer, which returns the output through various activation functions, such as the sigmoid and softmax functions. The memory cell memorizes the output from the previous time-step and uses it as input data recurrently. For instance, at a specific time t, the output of the previous time-step t−1 and input of time-step t are used as input data, and the output is among the input data of the next time-step t+1.Figure 2
RNN cell.The greatest difference between RNN and CNN or multilayer perceptron (MLP) is that CNN and MLP do not consider previous state data in later steps, but RNN considers both the output of the previous state and the input of the present state. Furthermore, as it is optimized to deal with sequential data, it is used in text, audio, and visual data processing.However, RNN has a vanishing gradient problem in long backpropagation processes. The algorithm of an RNN is based on gradient descent and modifies its weights in each time-step after one forward propagation process. Weights are modified with error differentials so that these rapidly converge to zero with repetitive backpropagation—this is called the vanishing gradient problem. To solve this problem in long-term time-series data, LSTM is widely used.


### 2.5. LSTM

To solve the vanishing gradient problem of RNN, Hochreiter and Schmidhuber [68] proposed LSTM, while Gers and Schmidhuber [69] added a forget gate to improve it. RNN considers all previous time-step memories, whereas LSTM chooses only the necessary memories to convey to the next time-step, using an algorithm in a special cell called the LSTM cell. Each of the cells has a forget gate, input gate, output gate, and long short-term memory (ct, ht) that pass these cells, as shown in Figure 3.Figure 3
LSTM cell.Input dataxt are deleted, filtered, and added to the long-term memory in the forget gate. The forget gate generally uses a sigmoid function as an activation function that transposes input data and short-term memory into numbers ranging from zero to one. This implies that if the output of the forget gate is close to zero, then most of the information will not pass through; if the output is close to one, then most of the information will pass to the next cell. Next, the input gates decide which data from input xt and short-term memory must be added after substitution to gt and it.gt generates new candidate vectors that could be added to the present cell state, and it decides the amount of the information that gt generated to save. it uses the sigmoid function in the same way as the forget gate with the same meaning, i.e., if the value of it is close to one, then most of gt will pass through, and if it is close to zero, then most gt would not be taken in this cell. ct is computed with the input gate value and forget gate value. By multiplying ft with ct−1, the amount of information from the previous time-step cell that will be memorized is determined. Finally, the output gate decides which data will be the output yt of each cell, considering the memory term and ot.The processes performed by each gate are expressed as follows:Input activation:at=tanhWa⋅xt+Ua⋅outt−1+baInput gate:it=σWi⋅xt+Ui⋅outt−1+biForget gate:ft=σWf⋅xt+Uf⋅outt−1+bfOutput gate:ot=σWo⋅xt+Uo⋅outt−1+boW and U are the weights of x and out, respectively. For example, Wi is the weight of input data x to input gate i.To develop an LSTM model, we must assign the initial values ofct and ht. As mentioned by Zimmermann et al. [70], we set both initial memory term values as zero. LSTM is broadly applied to forecast time-series data; however, owing to its complexity, Chung et al. [71] designed a simpler model called a gated recurrent unit (GRU) while adopting the advantages of LSTM. GRU consists of a reset gate, which decides how to add new input data to the previous cell memory, and an update gate, which decides the amount of memory of the previous cell to save. However, as our dataset is not very large, we used the LSTM model and compared its performance in forecasting the CDS term structure with RNN.


### 2.6. GMDH

GMDH is a machine-learning method based on the principle of heuristic self-organizing, proposed by Ivakhnenko [72]. The advantage of GMDH is that various considerations, including the number of layers, neurons in hidden layers, and optimal model structure, are determined automatically. In other words, we can apply GMDH to model complex systems without a priori knowledge of the systems.Suppose that there is a set ofn variables consisting of x1,x2,…,xn and one y variable. The GMDH algorithm represents a model as a set of neurons in which different pairs in each layer are connected via quadratic polynomials, and they generate new neurons in the next layer [28, 73]. Figure 4 shows the simplified structure. The formal identification problem of the GMDH algorithm is to identify a function f^ that can be used to forecast the output y^ for a given input vector X=x1,x2,…,xn as close as possible to its actual output y instead of actual function f. Therefore, we can describe the M observations of multi-input and single output data pairs as follows:(7)yi=fxi1,xi2,…,xin,i=1,2,…,M.We train a GMDH network to predict the outputy^ for any given input vector X=xi1,xi2,…,xin, which is given as(8)y^i=f^xi1,xi2,…,xin,i=1,2,…,M.Now, the GMDH network is determined by minimizing the squared sum of differences between sample outputs and model predictions, that is,(9)min∑i=1Mf^xi1,xi2,…,xin−yi2.The general connection between input and output variables can be expressed by a series of Volterra functions:(10)y=w0+∑i=1naixi+∑i=1n∑j=1nwijxixj+∑i=1n∑j=1n∑k=1nwijkxixjxk+,…,where X=x1,x2,…,xn is the input variable vector and A=w1,w2,…,wn is the weight vector. Equation (10) is known as the Kolmogorov–Gabor polynomial [28, 45, 72, 74, 75].In this study, we use the second-order polynomial function of two variables, which is written as(11)y^=Gxi,xj=w0+w1xi+w2xj+w3xixj+w4xi2+w5xj2.The main objective of the GMDH network is to build the general mathematical relation between the inputs and output variables given in equation (10). The weights ai in equation (11) are estimated using regression techniques so that the difference between actual output (y) and the calculated output (yi) is minimized, described as(12)e=∑i=1ny^i−yi⟶min.These parameters can be obtained from multiple regression using the least squares method, and we can compute them by solving some matrix equations. Refer to [28, 29, 46, 76] for a detailed description of the parameter estimation process. The GMDH network can be associated with various algorithms, such as the genetic algorithm [77, 78], singular value decomposition [28], and backpropagation [29, 46, 73, 79–81]. We also improved the GMDH network using backpropagation.Figure 4
GMDH cell.


### 2.7. Hyperparameter Optimization

Hyperparameter optimization refers to the problem of determining the optimal values of hyperparameters that must be set up in advance to perform training and that can complete the generalized performance of the training model to the highest level. In the deep-learning model, for example, the learning rate, batch size, etc. can be regarded as hyperparameters, and in some cases, they can be added as targets for exploration as hyperparameters that determine the structure of the deep-learning model, such as the number of layers and the convolution filter size. Hyperparameter optimization typically includes manual search, grid search, and random search.Manual search is a way for users to set hyperparameters individually and compare performances according to their intuition. After selecting the candidate hyperparameter values and performing training using them, the performance results measured against the verification dataset are recorded, and this process is repeated several times to select the hyperparameter values that demonstrate the highest performance. This is the most intuitive method; however, it has some problems. First, it is relatively difficult to ensure that the optimal hyperparameter value to be determined is actually optimal because the process of determining the optimal hyperparameter is influenced by the user’s selections. Second, the problem becomes more complicated when attempting to search for several types of hyperparameters at once. Because there are some types of hyperparameters that have mutually affecting relationships with others, it is difficult to apply an existing intuition to each single hyperparameter.Grid search is a method of selecting candidate hyperparameter values within a specific section to be searched at regular intervals, recording the performance results measured for each of them, and selecting the hyperparameter values that demonstrated the highest performance (see Hsu et al. [82]). The user determines the search target, length of the section, interval, etc., but more uniform and global search is possible than in the previous manual search. On the contrary, the more the hyperparameters to be searched that are set at one time, the longer the overall search time, and it increases exponentially.Random search (see Bergstra and Bengio [83]) is similar to grid search but differs in that the candidate hyperparameter values are selected through random sampling. This method can reduce the number of unnecessary repetitions and simultaneously search for values located between predetermined intervals so that the optimal hyperparameter value can be determined more quickly. Random search has the disadvantage that unexpected results can be obtained by testing various combinations other than the values set by the user.The grid search and random search algorithms are illustrated in Figure5. In this study, we use the grid search algorithm because it is the simplest and is most widely used for determining optimal hyperparameters [84]. Although a random search can perform much better than grid search for high-dimensional problems, according to Hutter et al. [85], our data are simple time-series data, and the candidate parameter set is limited; thus, we use the grid search algorithm [86, 87]. The Python technological stack was used for experiments. We implemented the machine-learning algorithms and grid search via “Keras,” “TensorFlow,” and “GmdhPy.”Figure 5
Comparison between (a) grid search and (b) random search.
(a)(b)


## 2.1. Data Description

The CDS spread can be classified into several categories. The classification method usually depends on the frame of the credit event. The full restructuring clause is the standard term. Under this condition, any restructuring event could be a credit event. The modified restructuring clause limits the scope of opportunistic behavior by sellers when restructuring agreements do not result in a loss. While restructuring agreements are still considered as credit events, the clause limits the deliverable obligations to those with a maturity of less than 30 months after the termination date of the CDS contract. Under the modified contract option, any restructuring event, except the restructuring of bilateral loans, could be a credit event. Additionally, the modified-modified restructuring term is introduced because modified restructuring has been too severe in its limitation of deliverable obligations. Under this term, the remaining maturity of deliverable assets must be less than 60 months for restructured obligations and 30 months for all other obligations. Under the no restructuring contract option, all restructuring events are excluded under the contract as “trigger events.”For this type of CDS, we will use a full restructuring sovereign CDS spread dataset because other datasets are unavailable for long periods. Sovereign CDS spread reflects the market participants’ perceptions of a country’s credit ratings. Our data cover the period from October 2008 to October 2019 and maturities of six months and 1, 2, 3, 4, 5, 7, 10, 20, and 30 years. All data were sourced from Datastream and correspond to the daily closing price of the CDS spread. The term structure of the CDS spread normally shows upward sloping curves, as seen in Figure1. Furthermore, CDS spreads seem to be lower as they get closer to the current date with no exceptions. Table 1 provides summary statistics of the CDS data. We can also verify that spreads with longer maturities have higher prices in terms of both mean and percentile. It is interesting to note that the standard deviation is also higher when the maturity is longer, which implies that the market predictions are highly unstable for longer periods.Figure 1
CDS term structure from 2008 to 2019.Table 1
Summary statistics for the historical CDS term structure.
IndexMeanStd. dev.1st per.10th per.25th per.Median75th per.90th per.99th per.CDS6M12.0819.99514.7456.2639.12213.68822.9858CDS1Y12.3059.71824.846.549.71514.15823.3957.43CDS2Y14.11710.1264.026.217.511.40616.4923.5462CDS3Y16.08310.8385.27.299.06313.3519.4826.5768CDS4Y19.03811.5576.298.5711.3316.00523.0430.74373CDS5Y22.15412.357.9110.3813.8819.1627.78335.56178CDS7Y26.71511.81911.9514.9518.823.5732.49940.73178CDS10Y31.0211.81314.1217.69523.79027.96336.78344.77480CDS20Y33.90311.98617.8318.7724.3334.0139.59747.95280CDS30Y34.70912.21416.78819.0424.15935.48540.49349.26580per.: percentile.


## 2.2. Nelson–Siegel Model

Nelson and Siegel [57] proposed a parsimonious model, and it is widely used to predict the interest rate term structure. The formula is as follows:(1)ftτ=β1t+β2t1−eλtτλtτ+β3t1−eλtτλtτ−e−λtτ,where λt is the time-decay parameter; τ is the maturity; and β1t, β2t, and β3t are the three Nelson–Siegel parameters. β1t is the long-term component of the yield curve as it does not decay to 0 and remains constant for all maturities. β2t is the short-term factor, which starts at 1 but quickly decays to 0. Finally, β3t starts at 0 and increases before decaying back to 0; hence, it is medium term, which creates a hump in the yield curve.The Nelson–Siegel model is a simple but effective method for modeling a term structure, and various studies have used the model to predict the yield curve or other term structures. For example, Shaw et al. [4] forecasted CDS using the Nelson–Siegel model to fit the CDS curve. Guo et al. [58] used the Nelson–Siegel model to model the term structure of implied volatility. GrØnborg and Lunde [59] used it to model the term structure of future oil contracts and forecast the prices of these contracts, while West [60] determined the future price of agricultural commodities. In particular, the CDS term structure has a strong relationship with the interest rate term structure. For example, Chen et al. [61] found that interest rate factors not only affected credit-spread movements but also forecasted future credit risk dynamics. They claimed that the different frequency components of interest rate movements affected the CDS term structure in various industrial sectors and credit rating classes. Specifically, worsening credit conditions tend to lead to future easing of monetary policy, leading to lower current forward interest rate curves. On the contrary, positive shocks to the interest rate narrow the credit spread at long maturities. Tsuruta [62] tried to decompose the yield and CDS term structure into risk and nonrisk structures and found that credit risk components have a negative relationship to the local equity market.In this study, we attempted to fit the CDS curve to the Nelson–Siegel model by estimating the time-decay parameterλt and Nelson–Siegel parameters β1t, β2t, and β3t. We can estimate Nelson–Siegel parameters using various models, such as autoregressive-moving-average (ARMA) and ARIMA, and select the most accurate model. For example, Shaw et al. [4] used the AR(1) process to estimate β1t, β2t, and β3t. Here, we used the AR(1) process to estimate Nelson–Siegel parameters and time-decay parameters. The error measures mean squared error (MSE), root MSE (RMSE), mean percentage error (MPE), mean absolute percentage error (MAPE), and mean absolute error (MAE) to compare the efficiency of this method with that of other methods, such as RNN or LSTM.


## 2.3. SVR

SVR is a field of machine-learning models derived from SVM. SVM is an algorithm that returns a hyperplane that separates the training samples into two labels, positive and negative. We refer to the distance between the closest point and the hyperplane as the “margin,” and the goal of SVM is to identify the hyperplane that maximizes the margin. There are two types of margin. The first type is a hard margin, which is for linearly separable datasets, meaning that every point does not violate its label. In other words, all the points can be classified into their labels with a hyperplane. The second one is a soft margin, which is for nonseparable cases. In this case, some points in the dataset, called “outliers,” are incorrectly classified. There are two ways to select a soft margin hyperplane. On the one hand, we can make the margin larger and take more errors (outliers). This is usually used for datasets that have only a small number of outliers. On the other hand, we can choose a hyperplane that has a small margin and minimize the empirical errors. This is useful for datasets with dense point distributions, where it is difficult to separate the data explicitly.Additionally, the kernel trick can be used for linearly nonseparable datasets. Kernel represents a function that maps origin data points to a higher dimensional dataset that is separable. The reason it is called the “kernel trick” is that, although the dimension of the dataset is increased, the cost of the algorithm does not increase much.SVM originated from the statistical learning theory introduced by Vapnik and Chervonenkis. The characteristic idea of SVM is to minimize the structural risk, while artificial neural networks (ANNs) minimize the empirical risk. Furthermore, SVM theoretically demonstrates better forecasting than articular neural networks, according to Gunn et al. [63] and Haykin [64].SVR is derived from SVM. It is a nonlinear kernel-based approach, and the main idea is to identify a function whose deviation from the actual data is located within the predetermined scale. SVR is applied to a given datasetxi,yii=1n, where xi is the input vector, yi is the output, and n is the total number of data points. The following formulation was introduced by Pérez-Cruz et al. [65]. SVR assumes that the function is a nonlinear function of the form fx=wTϕx+b, where w and b are the weight and constant, respectively. ϕx denotes a mapping function in the feature space. Then, weight vector w and the constant b are estimated by minimizing the following optimization problem:(2)minw,b,ζi,ζi∗12w2+C∑i=1nζi+ζi∗,(3)subject toyi−wTϕxi+b≤ϵ+ζi,(4)wTϕxi+b−yi≤ϵ+ζi∗,ζi,ζi∗≥0,where C>0 is the prespecified value and ζi and ζi∗ are slack variables indicating the upper and lower constraints, respectively. Setting ζi=0andζi∗=0, equations (3) and (4) become the ϵ-loss function introduced by Vapnik. C is the regularization parameter, and ϕ⋅ is a nonlinear transformation to a higher dimensional space, also known as feature space.Using Lagrange multipliers and the Karush–Kuhn–Tucker condition, the dual problem for the optimization problem (2)–(4) can be obtained:(5)maximize:Ld=ϵ∑i=1nαi+αi∗−∑i=1n∑j=1nαi−αi∗αj−αj∗ϕTxiϕxi,subject to∑i=1nαi−αi∗=0,0≤αi,αi∗≤C.To solve the above problem, we do not identify the nonlinear functionϕ⋅. The solution can be obtained as(6)fx=∑i=1nαi−αi∗Kx,xi+b,where Kx,xi is called the kernel function, defined as Kxi,xj=ϕxi⋅ϕxj. Any kernel function satisfying Mercer’s condition can be used as the kernel function (see Mohri et al. [66]).The selection of the kernel has a significant impact on its forecasting performance. It is a common practice to estimate a range of potential settings and use cross-validation over the training set to determine the best one. In this research, we use three kernel functions: polynomial, Gaussian, and Sigmoid, as presented in Table2.Table 2
Summary of kernels.
Types of kernelKernelKu,vPolynomial kernelu⋅vdGaussian kernelexp−u−v2/2σ2Sigmoid kerneltanhηu⋅v+νCao and Tay [67] provided a sensitivity of SVMs to the parameters C and ϵ. C and ϵ play an important role in the performance of SVR. Therefore, it is necessary to choose these parameters properly.


## 2.4. RNN

An ANN is a classification or prediction process that imitates human neurons. The output of a simple ANN model is generated by multiplying weights assigned to input data. After comparing the output data and the real values to be predicted, we create new weights adjusted according to the error. The step in which weights are multiplied by the input data is called forward propagation, and the step in which the error is calculated and weights are adjusted is called backpropagation. The final goal of the ANN model is to determine the weights that minimize the error between the predicted and target values.A CNN is a machine-learning method that uses a neural network algorithm. It consists of convolution layers, pooling layers, and neural network layers. A convolution layer uses a “filter” to analyze data, typically vectorized image data. The filter analyses small sections while moving over the entire dataset, and each section expresses a “feature” of the data with pooling layers.An RNN is another representative neural network model that has a special hidden layer. While a simple neural network has a backpropagation algorithm and adjusts its weights to reduce prediction errors, the RNN has a hidden layer that is modified by the hidden layer of the previous state. Each time the algorithm operates, the RNN hidden layer affects the next hidden layer of the algorithm. Because of its characteristics, RNN is an optimized method to analyze and predict nonlinear time-series data, such as stock prices. It is an algorithm operating in sequence with input and output data. It can return a single output from one or more input data and return more than one output from one or more input data. One of its characteristics is that it returns the output in every hidden time-step layer and simultaneously sends it as input data to the next layer; we demonstrate the simplified structure in Figure2. RNN has a memory cell in the hidden layer, which returns the output through various activation functions, such as the sigmoid and softmax functions. The memory cell memorizes the output from the previous time-step and uses it as input data recurrently. For instance, at a specific time t, the output of the previous time-step t−1 and input of time-step t are used as input data, and the output is among the input data of the next time-step t+1.Figure 2
RNN cell.The greatest difference between RNN and CNN or multilayer perceptron (MLP) is that CNN and MLP do not consider previous state data in later steps, but RNN considers both the output of the previous state and the input of the present state. Furthermore, as it is optimized to deal with sequential data, it is used in text, audio, and visual data processing.However, RNN has a vanishing gradient problem in long backpropagation processes. The algorithm of an RNN is based on gradient descent and modifies its weights in each time-step after one forward propagation process. Weights are modified with error differentials so that these rapidly converge to zero with repetitive backpropagation—this is called the vanishing gradient problem. To solve this problem in long-term time-series data, LSTM is widely used.


## 2.5. LSTM

To solve the vanishing gradient problem of RNN, Hochreiter and Schmidhuber [68] proposed LSTM, while Gers and Schmidhuber [69] added a forget gate to improve it. RNN considers all previous time-step memories, whereas LSTM chooses only the necessary memories to convey to the next time-step, using an algorithm in a special cell called the LSTM cell. Each of the cells has a forget gate, input gate, output gate, and long short-term memory (ct, ht) that pass these cells, as shown in Figure 3.Figure 3
LSTM cell.Input dataxt are deleted, filtered, and added to the long-term memory in the forget gate. The forget gate generally uses a sigmoid function as an activation function that transposes input data and short-term memory into numbers ranging from zero to one. This implies that if the output of the forget gate is close to zero, then most of the information will not pass through; if the output is close to one, then most of the information will pass to the next cell. Next, the input gates decide which data from input xt and short-term memory must be added after substitution to gt and it.gt generates new candidate vectors that could be added to the present cell state, and it decides the amount of the information that gt generated to save. it uses the sigmoid function in the same way as the forget gate with the same meaning, i.e., if the value of it is close to one, then most of gt will pass through, and if it is close to zero, then most gt would not be taken in this cell. ct is computed with the input gate value and forget gate value. By multiplying ft with ct−1, the amount of information from the previous time-step cell that will be memorized is determined. Finally, the output gate decides which data will be the output yt of each cell, considering the memory term and ot.The processes performed by each gate are expressed as follows:Input activation:at=tanhWa⋅xt+Ua⋅outt−1+baInput gate:it=σWi⋅xt+Ui⋅outt−1+biForget gate:ft=σWf⋅xt+Uf⋅outt−1+bfOutput gate:ot=σWo⋅xt+Uo⋅outt−1+boW and U are the weights of x and out, respectively. For example, Wi is the weight of input data x to input gate i.To develop an LSTM model, we must assign the initial values ofct and ht. As mentioned by Zimmermann et al. [70], we set both initial memory term values as zero. LSTM is broadly applied to forecast time-series data; however, owing to its complexity, Chung et al. [71] designed a simpler model called a gated recurrent unit (GRU) while adopting the advantages of LSTM. GRU consists of a reset gate, which decides how to add new input data to the previous cell memory, and an update gate, which decides the amount of memory of the previous cell to save. However, as our dataset is not very large, we used the LSTM model and compared its performance in forecasting the CDS term structure with RNN.


## 2.6. GMDH

GMDH is a machine-learning method based on the principle of heuristic self-organizing, proposed by Ivakhnenko [72]. The advantage of GMDH is that various considerations, including the number of layers, neurons in hidden layers, and optimal model structure, are determined automatically. In other words, we can apply GMDH to model complex systems without a priori knowledge of the systems.Suppose that there is a set ofn variables consisting of x1,x2,…,xn and one y variable. The GMDH algorithm represents a model as a set of neurons in which different pairs in each layer are connected via quadratic polynomials, and they generate new neurons in the next layer [28, 73]. Figure 4 shows the simplified structure. The formal identification problem of the GMDH algorithm is to identify a function f^ that can be used to forecast the output y^ for a given input vector X=x1,x2,…,xn as close as possible to its actual output y instead of actual function f. Therefore, we can describe the M observations of multi-input and single output data pairs as follows:(7)yi=fxi1,xi2,…,xin,i=1,2,…,M.We train a GMDH network to predict the outputy^ for any given input vector X=xi1,xi2,…,xin, which is given as(8)y^i=f^xi1,xi2,…,xin,i=1,2,…,M.Now, the GMDH network is determined by minimizing the squared sum of differences between sample outputs and model predictions, that is,(9)min∑i=1Mf^xi1,xi2,…,xin−yi2.The general connection between input and output variables can be expressed by a series of Volterra functions:(10)y=w0+∑i=1naixi+∑i=1n∑j=1nwijxixj+∑i=1n∑j=1n∑k=1nwijkxixjxk+,…,where X=x1,x2,…,xn is the input variable vector and A=w1,w2,…,wn is the weight vector. Equation (10) is known as the Kolmogorov–Gabor polynomial [28, 45, 72, 74, 75].In this study, we use the second-order polynomial function of two variables, which is written as(11)y^=Gxi,xj=w0+w1xi+w2xj+w3xixj+w4xi2+w5xj2.The main objective of the GMDH network is to build the general mathematical relation between the inputs and output variables given in equation (10). The weights ai in equation (11) are estimated using regression techniques so that the difference between actual output (y) and the calculated output (yi) is minimized, described as(12)e=∑i=1ny^i−yi⟶min.These parameters can be obtained from multiple regression using the least squares method, and we can compute them by solving some matrix equations. Refer to [28, 29, 46, 76] for a detailed description of the parameter estimation process. The GMDH network can be associated with various algorithms, such as the genetic algorithm [77, 78], singular value decomposition [28], and backpropagation [29, 46, 73, 79–81]. We also improved the GMDH network using backpropagation.Figure 4
GMDH cell.


## 2.7. Hyperparameter Optimization

Hyperparameter optimization refers to the problem of determining the optimal values of hyperparameters that must be set up in advance to perform training and that can complete the generalized performance of the training model to the highest level. In the deep-learning model, for example, the learning rate, batch size, etc. can be regarded as hyperparameters, and in some cases, they can be added as targets for exploration as hyperparameters that determine the structure of the deep-learning model, such as the number of layers and the convolution filter size. Hyperparameter optimization typically includes manual search, grid search, and random search.Manual search is a way for users to set hyperparameters individually and compare performances according to their intuition. After selecting the candidate hyperparameter values and performing training using them, the performance results measured against the verification dataset are recorded, and this process is repeated several times to select the hyperparameter values that demonstrate the highest performance. This is the most intuitive method; however, it has some problems. First, it is relatively difficult to ensure that the optimal hyperparameter value to be determined is actually optimal because the process of determining the optimal hyperparameter is influenced by the user’s selections. Second, the problem becomes more complicated when attempting to search for several types of hyperparameters at once. Because there are some types of hyperparameters that have mutually affecting relationships with others, it is difficult to apply an existing intuition to each single hyperparameter.Grid search is a method of selecting candidate hyperparameter values within a specific section to be searched at regular intervals, recording the performance results measured for each of them, and selecting the hyperparameter values that demonstrated the highest performance (see Hsu et al. [82]). The user determines the search target, length of the section, interval, etc., but more uniform and global search is possible than in the previous manual search. On the contrary, the more the hyperparameters to be searched that are set at one time, the longer the overall search time, and it increases exponentially.Random search (see Bergstra and Bengio [83]) is similar to grid search but differs in that the candidate hyperparameter values are selected through random sampling. This method can reduce the number of unnecessary repetitions and simultaneously search for values located between predetermined intervals so that the optimal hyperparameter value can be determined more quickly. Random search has the disadvantage that unexpected results can be obtained by testing various combinations other than the values set by the user.The grid search and random search algorithms are illustrated in Figure5. In this study, we use the grid search algorithm because it is the simplest and is most widely used for determining optimal hyperparameters [84]. Although a random search can perform much better than grid search for high-dimensional problems, according to Hutter et al. [85], our data are simple time-series data, and the candidate parameter set is limited; thus, we use the grid search algorithm [86, 87]. The Python technological stack was used for experiments. We implemented the machine-learning algorithms and grid search via “Keras,” “TensorFlow,” and “GmdhPy.”Figure 5
Comparison between (a) grid search and (b) random search.
(a)(b)


## 3. Empirical Results

We used 2886 daily time-series data points on CDS term structure from October 2008 to October 2019. Because international financial markets from 2008 to 2011 were unstable, we divided these data into two subperiods, and we measured the forecasting performance of the five methods we used in both high-variance and relatively low-variance data. The first training dataset is from 1st October 2008 to 22nd January 2019 (full period), the second one is from 1st October 2008 to 9th September 9th 2011 (subperiod 1), and the third one is from 2nd January 2012 to 22nd January 2019 (subperiod 2). We selected our test dataset as the last 200 days (from 23rd January 2019 to 29th October 2019, test dataset 1) for each maturity in the full period, the subperiod 2, and last 80 days (from 12th September 2011 to 30th December 2011, test dataset 2) for the subperiod 1. There is a gap between subperiod 1 and subperiod 2 because of the test dataset 2 for subperiod 1 training set. These all cases are summarized in Table3. Summary statistics for the test dataset are provided in Tables 4 and 5. Test dataset 2 has higher standard deviations than test dataset 1. Through this subperiod analysis, we compared the prediction power of the models in a relatively volatile period (subperiod 2) and a less volatile period (subperiod 1). We used grid search to optimize the parameters in RNN, LSTM, SVR, and GMDH and calculated the RMSE, MSE, MAPE, MPE, and MAE to compare the performance of these five models. Figures 6–11 show the performance of the Nelson–Siegel, RNN, LSTM, SVR, and GMDH models with the test datasets for each maturity.Table 3
Descriptions of the training and test datasets.
CaseTraining setTest datasetCase 1Full period (2008/10/01–2019/01/22)Test dataset 1 (2019/01/23–2019/10/29)Case 2Subperiod 1 (2008/10/01–2011/09/09)Test dataset 2 (2011/09/12–2011/12/30)Case 3Subperiod 2 (2012/01/02–2019/01/22)Test dataset 1 (2019/01/23–2019/10/29)Table 4
Summary statistics for test dataset 1 for the full period and subperiod 2 training sets.
CDS6MCDS1YCDS2YCDS3YCDS4YCDS5YCDS7YCDS10YCDS20YCDS30YMean5.185.075.426.327.529.2513.2215.9318.3918.76Std. dev.1.841.851.921.861.781.561.211.521.431.89Table 5
Summary statistics for test dataset 2 for the subperiod 1 training set.
CDS6MCDS1YCDS2YCDS3YCDS4YCDS5YCDS7YCDS10YCDS20YCDS30YMean13.9914.4419.7425.5530.8335.8340.1044.7648.1749.23Std. dev.3.774.023.853.733.794.444.984.633.423.20Figure 6
Predictions of each model and target CDS term structure from six months to five years maturity for test dataset 1 with the full period training set (case 1).
(a)(b)(c)(d)(e)(f)Figure 7
Predictions of each model and target CDS term structure from seven years to 30 years maturity for test dataset 1 with the full period training set (case 1).
(a)(b)(c)(d)Figure 8
Predictions of each model and target CDS term structure from six months to five years maturity for test dataset 2 with the subperiod 1 training set (case 2).
(a)(b)(c)(d)(e)(f)Figure 9
Predictions of each model and target CDS term structure from seven years to 30 years maturity for test dataset 2 with the subperiod 1 training set (case 2).
(a)(b)(c)(d)Figure 10
Predictions of each model and target CDS term structure from six months to five years maturity for test dataset 1 with the subperiod 2 training set (case 3).
(a)(b)(c)(d)(e)(f)Figure 11
Predictions of each model and target CDS term structure from seven years to 30 years maturity for test dataset 1 with the subperiod 2 training set (case 3).
(a)(b)(c)(d)Our main findings can be summarized as follows: first, as shown in Figures6–11, every model provides accurate predictions of CDS term structure. Figures 12–14 also show that machine-learning methods have similar accuracy and outperformed the Nelson–Siegel with AR(1) model. This proves that machine-learning models can be applied to forecasting CDS time-series data and that the Nelson–Siegel model fits both the interest rate term structure and CDS term structure. Furthermore, GMDH, SVR, and RNN have very similar accuracies in all periods and maturities. Second, comparing the Nelson–Siegel model with the four machine-learning methods in predictive power, the Nelson–Siegel model shows the poorest performance for all test sets. That is, machine-learning algorithms are more effective in predicting CDS spread than the Nelson–Siegel model, based on interest rate term structures, which play an important role in determining CDS spread levels. Third, among the machine-learning methods, GMDH presents the best prediction results. The error of the GMDH was found to be the lowest among the five methods, as shown in Tables 6–8. In addition, we expected LSTM to outperform RNN, but the RNN model slightly outperformed the LSTM model. However, this result remains debatable, as mentioned in Introduction. Performance comparisons between machine-learning algorithms are finding different conclusions in different studies [55, 56, 88–91]. Fourth, the periods with higher standard deviations are generally harder to predict accurately, as seen in Tables 7 and 8. Additionally, the maturities with higher standard deviations are generally harder to predict accurately, as seen in Figures 12–14. The changes in the standard deviation and in the forecasting error are similar for most error measures except MAPE and MPE, as shown in Figure 13.Figure 12
Error of each method for all maturities from Table6 and standard deviations for all maturities (case 1): (a) RMSE (full period training set); (b) MSE (full period training set); (c) MAPE (full period training set); (d) MPE (full period training set); (e) MAE (full period training set); (f) test dataset 1.
(a)(b)(c)(d)(e)(f)Figure 13
Error of each method for all maturities from Table7 and standard deviations for all maturities (case 2): (a) RMSE (subperiod 1 training set); (b) MSE (subperiod 1 training set); (c) MAPE (subperiod 1 training set); (d) MPE (subperiod 1 training set); (e) MAE (subperiod 1 training set); (f) test dataset 2.
(a)(b)(c)(d)(e)(f)Figure 14
Error of each method for all maturities from Table8 and standard deviations for all maturities (case 3): (a) RMSE (subperiod 2 training set); (b) MSE (subperiod 2 training set); (c) MAPE (subperiod 2 training set); (d) MPE (subperiod 2 training set); (e) MAE (subperiod 2 training set); (f) test dataset 1.
(a)(b)(c)(d)(e)(f)Table 6
Error statistics of each method for all maturities for test dataset 1 with the full period training set (case 1).
TypeMethod6M1Y2Y3Y4Y5Y7Y10Y20Y30YAverageRMSEN-S2.332.062.543.073.302.881.391.471.971.922.29RNN1.701.711.831.761.661.450.951.101.101.641.49LSTM2.091.892.312.711.911.280.871.101.081.701.69SVR1.751.781.871.811.721.490.991.191.151.701.55GMDH1.631.671.731.681.591.350.901.081.081.611.43MSEN-S5.414.226.459.4510.888.321.942.173.863.685.64RNN2.882.933.343.092.772.090.901.211.212.712.31LSTM4.383.585.337.333.681.630.761.221.172.893.20SVR3.083.173.503.272.972.220.991.411.312.892.48GMDH2.672.802.982.812.531.820.811.161.162.602.13MAPE (%)N-S37.3032.4746.2448.0843.0929.507.896.828.956.5126.69RNN12.5612.5912.389.658.076.183.403.502.814.337.55LSTM15.9411.4031.7230.7714.625.983.563.643.753.8912.53SVR12.1812.8911.939.788.506.343.473.813.093.677.57GMDH11.8812.2811.039.637.965.903.483.443.064.117.28MPE (%)N-S−19.03−29.26−43.62−45.40−40.38−26.86−3.79−0.13−2.76−1.55−21.28RNN−1.91−4.32−1.39−2.44−1.49−0.77−0.410.13−0.77−2.26−1.56LSTM3.57−2.54−6.23−0.682.901.160.43−0.42−0.87−1.22−0.39SVR−5.53−6.23−5.29−3.94−3.43−2.04−0.99−1.720.08−0.90−3.00GMDH−1.05−2.94−2.38−0.15−0.37−0.020.470.190.540.98−0.47MAEN-S1.761.392.262.843.082.671.071.101.671.271.91RNN0.700.670.750.690.680.620.460.560.520.820.65LSTM1.080.741.221.631.110.610.480.570.690.750.89SVR0.670.670.700.690.700.630.470.600.580.710.64GMDH0.680.660.680.700.680.600.480.560.580.810.64N-S: Nelson–Siegel.Table 7
Error statistics of each method for all maturities for test dataset 2 with the subperiod 1 training set (case 2).
TypeMethod6M1Y2Y3Y4Y5Y7Y10Y20Y30YAverageRMSEN-S3.754.104.114.004.295.275.294.954.033.714.35RNN2.784.253.713.483.994.925.635.183.693.204.08LSTM3.894.203.713.503.574.565.645.193.683.364.13SVR4.044.393.773.464.025.105.855.373.633.304.29GMDH3.924.183.633.303.784.705.445.003.623.364.09MSEN-S14.0316.8016.9016.0018.3627.8227.9924.5116.2513.7519.24RNN7.7418.0713.7812.1315.9024.2031.6926.8613.5910.2717.42LSTM15.1017.6513.7412.2412.7420.8231.7726.9313.5311.2717.58SVR16.3319.3014.2211.9516.1625.9834.2628.8613.1810.8719.11GMDH15.3617.4313.1910.8814.3022.1129.6225.0313.0711.3217.23MAPE (%)N-S28.1320.8313.9311.4212.0813.4711.509.206.086.8313.35RNN19.3628.1416.3611.6911.1611.6811.629.716.265.1913.11LSTM26.7526.7916.3611.7910.4110.5911.619.826.325.5113.60SVR27.3228.5216.4011.4811.1412.0712.2710.116.195.3614.09GMDH26.4426.5815.6510.8310.4811.1611.489.446.165.4613.37MPE (%)N-S−14.076.806.030.59−3.99−7.69−3.05−0.413.37−4.72−1.72RNN−13.08−8.39−4.84−3.65−3.37−2.35−1.26−1.28−0.740.27−3.87LSTM−6.75−4.96−5.07−3.58−4.29−1.35−1.20−1.85−1.26−0.71−3.10SVR−7.37−8.40−4.46−3.08−2.58−2.49−2.40−1.82−0.71−0.49−3.38GMDH−5.89−6.42−4.03−2.44−2.42−2.49−2.38−1.75−0.60−0.36−2.88MAEN-S3.183.303.073.043.624.464.524.163.093.153.56RNN2.283.583.022.843.344.134.684.342.992.543.37LSTM3.333.573.012.863.113.764.684.363.002.663.43SVR3.413.673.052.813.394.274.884.502.962.603.55GMDH3.323.472.932.673.183.924.544.192.952.653.38Table 8
Error statistics of each method for all maturities for test dataset 1 with the subperiod 2 training set (case 3).
TypeMethod6M1Y2Y3Y4Y5Y7Y10Y20Y30YAverageRMSEN-S2.502.182.573.063.262.831.391.541.961.942.32RNN1.691.721.781.711.611.400.931.131.051.701.47LSTM2.111.742.072.001.591.461.061.101.041.321.55SVR1.761.781.841.771.691.480.971.141.091.681.52GMDH1.451.581.631.651.571.240.841.001.041.561.36MSEN-S6.244.756.609.3610.628.001.932.373.833.755.74RNN2.862.963.182.942.591.950.871.281.102.882.26LSTM4.443.024.293.992.542.131.131.211.081.742.56SVR3.113.183.413.142.842.190.951.311.202.842.42GMDH2.112.512.642.732.471.550.711.001.092.421.92MAPE (%)N-S30.7722.0631.0431.7629.3622.117.477.499.086.2219.74RNN13.6013.4612.2310.257.846.143.294.042.965.457.93LSTM19.3412.8029.6315.977.256.695.654.033.233.4210.80SVR12.3213.0511.739.498.056.283.683.392.843.977.48GMDH10.8810.809.699.117.945.253.223.342.693.606.65MPE (%)N-S4.4017.0427.2128.2725.9818.841.88−1.950.03−1.3912.03RNN1.00−1.82−1.040.59−1.36−0.15−0.751.240.473.230.14LSTM−0.68−3.77−16.357.06−0.69−0.962.42−0.660.54−1.07−1.42SVR−5.49−6.74−5.55−3.33−2.07−0.92−1.52−0.66−0.28−1.56−2.81GMDH1.14−4.17−3.01−3.82−3.24−0.730.34−1.66−0.290.19−1.53MAEN-S1.961.482.292.823.042.601.051.151.691.171.93RNN0.770.720.740.740.660.620.450.660.561.090.70LSTM1.010.730.951.190.640.690.750.620.600.680.79SVR0.670.670.690.680.680.630.490.540.530.760.63GMDH0.640.600.610.660.660.530.440.520.500.710.59


## 4. Summary and Concluding Remarks

The purpose of this study is to compare the prediction of CDS term structure between the Nelson–Siegel, RNN, LSTM, SVR, and GMDH models. We determined the most suitable model to predict time-series data, especially the CDS term structure. The CDS spread is a default risk index for a country or company; hence, this study is useful because it not only offers the best time-series forecasting model but also predicts future risk.Existing studies on the prediction of CDS term structure and other risk indicators using machine-learning models remain few; most focus on stock price prediction. This study is significant because it demonstrated that various machine-learning models can be applied to other time-series data, and further research on various time-series data using machine-learning models is expected. This study also confirmed that data-driven methods, such as RNN, LSTM, SVR, and GMDH, outperform the model-driven Nelson–Siegel method, which is usually used in analyzing the CDS term structure. The performance of model-driven methods could decline if the data have a significant number of outliers because it is dependent on the assumption that the dataset can be formalized on a specific formula. In our dataset, the presence of outliers made it difficult to make predictions with model-driven methods. On the contrary, data-driven methods were not affected by outliers (see Solomatine et al. [92]), as these consider only datasets that include outliers. As most data available today have many outliers, it is not surprising that data-driven methods outperform model-driven ones.Some studies show that linear models such as AR are better than ANNs [93–95] for forecasting time series. However, CDS series data are not persistent and volatile, as shown in Figure 1, so Nelson–Siegel based on the AR process performs more poorly than the machine-learning methods. In other words, because of the nonlinearity, machine-learning techniques can be successfully used for modeling and forecasting time series [96–100].Based on the empirical findings given inSection 3, we have three implications. The first is that the data-driven method is more effective in predictive power than the theoretical model consisting of theoretical variables that influence a financial asset’s price. Of course, the data-driven method has a much larger number of parameters than the model-driven method and a much slower implementation speed. However, it is acceptable to use a machine-learning algorithm without the need for prior knowledge, such as interest rate period structure, to predict CDS term structure more accurately. Second, we need to improve the existing Nelson–Siegel model. We showed that the machine-learning models outperform the Nelson–Siegel model for all three cases, which implies both that the machine-learning methodologies excel at this task and that there is a factor in the CDS term structure that the Nelson–Siegel model does not reflect. Nelson–Siegel still has room for improvement in its performance, especially in forecasting applications. Third, the performance of all models was inconsistent depending on the data period. In the highly volatile data period (subperiod 1), all models were less predictable than in the less volatile data period (subperiod 2). In both approaches, the model performance is not stable when the data are highly volatile. Figure 1 shows that the CDS term structure from 2012 to 2019 seems regular but has some unpredictable points related to the financial turbulence from 2008 to 2011. This unusual volatility is one of the things that reduced the forecasting performance of all models. Therefore, it is necessary to consider a new approach that can achieve solid forecasting performance regardless of the volatility of the data.Our findings can help investors and policymakers analyze the risk of companies or countries. The CDS spread is an index that represents the probability of credit default; thus, this study offers a measure to predict future risk. For instance, Zghal et al. [101] showed that CDS can function as a strong hedging mechanism against European stock market fluctuations, and Ratner and Chiu [19] confirmed the hedging and safe-haven characteristics of CDS against stock risks in the U.S. Researchers can also apply machine-learning models to forecast financial risk time-series data.Future studies should apply this same experiment to datasets other than CDS data for comparing the forecasting performance of model-driven and data-driven methods, such as the implied volatility surface. The implied volatility surface is a fundamental concept for pricing various financial derivatives. Therefore, for a long time, many researchers have been working on it, and various models have been developed [102–106]. Because it is a key part of the evaluation of financial derivatives, comparisons of performance between existing volatility models and data-driven models in predicting implied volatility should draw attention from academics and practitioners. GMDH showed the best predictive performance for the CDS term structure used in this study. It is now necessary to ensure that GMDH performs best for other term structures as well, such as for volatility term structures and yield curves, or other CDS contracts, for example, corporate CDS and CDS index. As a possible future study, extended Nelson–Siegel models can be used, such as regime-switching [107] and the Nelson–Siegel–Svensson model [108], to forecast CDS term structure. Optimized through grid search for machine-learning algorithms, we expect to increase the forecasting power of the Nelson–Siegel model using extended models rather than by optimizing parameters for the Nelson–Siegel model.



---

*Source: 2518283-2020-07-14.xml*