# Modeling the Yield Curve of BRICS Countries: Parametric vs. Machine Learning Techniques

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Methodology

#### 2.1. The Five Factor De Rezende–Ferreira Model

- For each market we define the sets ${\mathsf{\Omega}}_{j}$ = ${\left\{{m}_{j,k}\right\}}_{k=1,\dots ,{N}_{j}}$ of maturities ${m}_{j,k}$ with $j=1,2$ and ${N}_{j}$ equal to the sets cardinality. In particular, ${m}_{1,1}$ is the lower bound of ${\mathsf{\Omega}}_{1}$ (${m}_{1,L}$) and corresponds to the first available maturity of the market, while the upper bound ${m}_{1,U}$ is, at the same time, the lower bound of ${\mathsf{\Omega}}_{2}$, that is ${m}_{1,U}={m}_{2,L}$ and it is equal to the straddling maturity between the short and medium–term period. Finally, the upper bound of ${\mathsf{\Omega}}_{2}$ (${m}_{2,U}$) is the longest observed maturity. In our study we set ${m}_{2,U}$ = 30 years, as in general there aren’t any bonds traded for longer maturities in the analyzed markets. Values in ${\mathsf{\Omega}}_{1}$ and ${\mathsf{\Omega}}_{2}$ ranges between corresponding lower/upper values by proper step sizes ${\Delta}_{1}$ and ${\Delta}_{2}$. As the step size can affect the overall performance of the procedure, we tried various step sizes in the range [0.25, 0.75] for ${\Delta}_{1}$ and [0.25, 1] for ${\Delta}_{2}$. After extensive simulations we set ${\Delta}_{1}=0.75$ and ${\Delta}_{2}=1$.
- For each maturity ${m}_{j,k}$ in the sets ${\mathsf{\Omega}}_{1}$ and ${\mathsf{\Omega}}_{2}$ we estimated the parameters ${\tau}_{1}\left(t\right)$ and ${\tau}_{2}\left(t\right)$ that maximize the medium term component:$$[{\tau}_{j}\left(t\right)(1-{e}^{-{m}_{j,k}/{\tau}_{j}\left(t\right)})/{m}_{j,k}]-{e}^{-{m}_{j,k}/{\tau}_{j}\left(t\right)}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}k=1,\dots ,{N}_{j}$$In this way we get as many curves as the number of maturities.
- For each time t in the time horizon of length T and for every maturity ${m}_{j,k},k=1,\dots ,N$, keep ${\tau}_{1}\left(t\right)$ constant and vary ${\tau}_{2}\left(t\right)$ to estimate by OLS different array sets $\widehat{\mathit{\beta}}\left(t\right)$; choose then the set ${\widehat{\mathit{\beta}}}^{*}\left(t\right)$ associated to the lowest Sum of Squared Residuals (SSR):$$SSR\left(t\right)=\sum _{k=1}^{N}{[y(t,{m}_{k})-\widehat{RF}(t,{m}_{k},\widehat{\mathit{\beta}}\left(t\right),\mathit{\tau}\left(t\right))]}^{2}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}t=1,\dots ,T$$
- Repeat Step 3 for all ${\tau}_{1}\left(t\right)$ so that there are as many sets of optimal parameters ${\widehat{\mathit{\beta}}}^{*}\left(t\right)$ as the ${\tau}_{1}$ values. Then, select the set with the lowest SSR and fit the yield curve at the desired time t:$$\begin{array}{c}\hfill {\widehat{\mathit{\tau}}}^{*}\left(t\right)=\underset{[{\tau}_{1}\left(t\right),\phantom{\rule{4pt}{0ex}}{\tau}_{2}\left(t\right)]\phantom{\rule{3.33333pt}{0ex}}\in \phantom{\rule{3.33333pt}{0ex}}({\mathsf{\Omega}}_{1}\times {\mathsf{\Omega}}_{2})}{arg\phantom{\rule{4pt}{0ex}}min}\left\{\sum _{k=1}^{N}{[y(t,{m}_{k})-\widehat{RF}(t,{m}_{k},\mathit{\tau}\left(t\right),{\widehat{\mathit{\beta}}}^{*}\left(t\right))]}^{2}\right\}\end{array}$$
- Repeat Steps 3–4 for each time t$(t=1,\dots ,T)$, to get the set of T yield curves fitting and the related time series for all the model parameters.

#### 2.2. Feed Forward Neural Networks

## 3. Empirical Analysis

#### 3.1. Data

#### 3.2. Comparison of the 5F-DRF and FFNN Models Fitting Performances

- (a) FFNNs perform better than the 5F–DRF model for in sample fitting of the yield curve of the BRICS countries.
- (b) The reason of (a) is in a better adaptability of the FFNN to both internal and external shocks.

## 4. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

BRICS | Brazil, Russia, India, China, South Africa |

ANN | Artificial Neural Network |

FFNN | Feed–Forward Neural Network |

5F-DRF | Dynamic De Rezende–Ferreira Five Factor Model |

BPA | Backpropagation Algorithm |

## References

- Bekiros, Stelios, and Christos Avdoulas. 2020. Revisiting the Dynamic Linkages of Treasury Bond Yields for the BRICS: A Forecasting Analysis. Forecasting 2: 102–29. [Google Scholar] [CrossRef]
- Caldeira, João Frois, Guilherme V. Moura, and Marcelo S. Portugal. 2010. Efficient Yield Curve Estimation and Forecasting in Brazil. Revista Economia 11: 27–51. [Google Scholar]
- Caldeira, João Frois, Rangan Gupta, Muhammad Tahir Suleman, and Hudson S. Torrent. 2020. Forecasting the Term Structure of Interest Rates of the BRICS: Evidence from a Nonparametric Functional Data Analysis. Emerging Markets Finance and Trade, 1–18. [Google Scholar] [CrossRef]
- Castello, Oleksandr, and Marina Resta. 2019. DeRezende.Ferreira: Zero Coupon Yield Curve Modelling. R Package Version 0.1.0. Genova: Department of Economics and Business Studies, University of Genova. [Google Scholar]
- Chakroun, Fatma, and Fathi Abid. 2014. A Methodology to Estimate the Interest Rate Yield Curve in Illiquid Market: The Tunisian Case. Journal of Emerging Market Finance 13: 305–33. [Google Scholar] [CrossRef]
- de Boyrie, Maria E., and Ivelina Pavlova. 2016. Dynamic interdependence of sovereign credit default swaps in BRICS and MIST countries. Applied Economics 48: 563–75. [Google Scholar] [CrossRef]
- De Rezende, Rafael Barros, and Mauro S. Ferreira. 2008. Modeling and Forecasting the Brazilian Term Structure of Interest Rates by an Extended Nelson-Siegel Class of Models: A Quantile Autoregression Approach. Resreport, Escola Brasileira de Economia e Finanças. Available online: http://bibliotecadigital.fgv.br/ocs/index.php/sbe/EBE08/paper/download/521/13 (accessed on 8 May 2021).
- De Rezende, Rafael Barros, and Mauro S. Ferreira. 2013. Modeling and Forecasting the Yield Curve by an Extended Nelson-Siegel Class of Models: A Quantile Autoregression Approach. Journal of Forecasting 32: 111–23. [Google Scholar] [CrossRef]
- Dey, Ayon. 2016. Machine Learning Algorithms: A Review. International Journal of Computer Science and Information Technologies 7: 1174–79. [Google Scholar]
- Di Franco, Giovanni, and Michele Santurro. 2020. Machine learning, artificial neural networks and social research. Quality & Quantity 55: 1007–25. [Google Scholar] [CrossRef]
- Diebold, Francis X., and Canlin Li. 2006. Forecasting the term structure of government bond yields. Journal of Econometrics 130: 337–64. [Google Scholar] [CrossRef] [Green Version]
- Diebold, Francis, and Glenn Rudenbusch. 2017. Yield Curve Modeling and Forecasts. Princeton: Princeton University Press. [Google Scholar]
- El-Shagi, Makram, and Lunan Jiang. 2019. Efficient Dynamic Yield Curve Estimation in Emerging Financial Markets. CFDS Discussion Paper Series 2019/4; Kaifeng: Center for Financial Development and Stability at Henan University. [Google Scholar]
- Filipović, Damir. 2009. Term Structure Models. Berlin: Springer. [Google Scholar]
- Hess, Markus. 2020. A pure-jump mean-reverting short rate model. Modern Stochastics: Theory and Applications 7: 113–34. [Google Scholar] [CrossRef]
- Hornik, Kurt, Maxwell Stinchcombe, and Halbert White. 1989. Multilayer feedforward networks are universal approximators. Neural Networks 2: 359–66. [Google Scholar] [CrossRef]
- Lantz, Brett. 2019. Machine Learning with R: Expert Techniques for Predictive Modeling, 3rd ed. Birmingham: Packt Publishing. [Google Scholar]
- Lopez De Prado, Marcos. 2018. Advances in Financial Machine Learning. New York: Wiley. [Google Scholar]
- Pereda, Javier. 2009. Estimacion de la Curva de Rendimiento Cupon Cero para el Perú. Technical Report, Banco Central De Reserva Del Perú. Available online: https://www.bcrp.gob.pe/docs/Publicaciones/Revista-Estudios-Economicos/17/Estudios-Economicos-17-4.pdf (accessed on 28 January 2022).
- Posthaus, Achim. 2019. Yield Curve Fitting with Artificial Intelligence: A Comparison of Standard Fitting Methods with AI Algorithms. Journal of Computational Finance 22: 1–23. [Google Scholar] [CrossRef]
- Prasanna, Krishna, and Subramaniam Sowmya. 2017. Yield curve in India and its interactions with the US bond market. International Economics and Economic Policy 14: 353–75. [Google Scholar] [CrossRef]
- Rosadi, Dedi, Yoga Aji Nugraha, and Rahmawati Kusuma Dewi. 2011. Forecasting the Indonesian Government Securities Yield Curve Using Neural Networks and Vector Autoregressive Model. Technical Report. Yogyakarta: Department of Mathematics, Gadjah Mada University. [Google Scholar]
- Rumelhart, David E., Geoffrey E. Hinton, and Ronald J. Williams. 1986. Learning representations by back-propagating errors. Nature 323: 533–36. [Google Scholar] [CrossRef]
- Salisu, Afees A., Juncal Cuñado, Kazeem Isah, and Rangan Gupta. 2021. Stock markets and exchange rate behaviour of the BRICS. Journal of Forecasting 40: 1581–95. [Google Scholar] [CrossRef]
- Saunders, Anthony, and Marcia Cornett. 2014. Financial Markets and Institutions, 6th ed. New York: The McGraw-Hill/Irwin Series in Finance, Insurance, and Real Estate. [Google Scholar]
- Stuart, Rebecca. 2020. The term structure, leading indicators, and recessions: Evidence from Switzerland, 1974–2017. Swiss Journal of Economics and Statistics 156: 1–17. [Google Scholar] [CrossRef]
- Suimon, Yoshiyuki, Hiroki Sakaji, Kiyoshi Izumi, and Hiroyasu Matsushima. 2020. Autoencoder-Based Three-Factor Model for the Yield Curve of Japanese Government Bonds and a Trading Strategy. Journal of Risk and Financial Management 13: 82. [Google Scholar] [CrossRef]
- Ullah, Wali, and Khadija Malik Bari. 2018. The Term Structure of Government Bond Yields in an Emerging Market. Romanian Journal for Economic Forecasting 21: 5–28. [Google Scholar]
- Vela, Daniel. 2013. Forecasting Latin–American Yield Curves: An Artificial Neural Network Approach. Techreport 761. Colombia: Banco de la República. [Google Scholar]
- Wahlstrom, Ranik Raaen, Florentina Paraschiv, and Michael Schurle. 2021. A Comparative Analysis of Parsimonious Yield Curve Models with Focus on the Nelson-Siegel, Svensson and Bliss Versions. Computational Economics, 1–38. [Google Scholar] [CrossRef]
- Wilamowski, Bogdan M., and David Irwin. 2011. Intelligent Systems, 2nd ed. Boca Raton: CRC Press. [Google Scholar] [CrossRef]
- Zeb, Shumaila, and Abdul Rashid. 2019. Systemic risk in financial institutions of BRICS: Measurement and identification of firm-specific determinants. Risk Management 21: 243–64. [Google Scholar] [CrossRef]

**Figure 2.**Behaviour of the daily rates for maturities 2, 7 and 15 years for China in the period 24/01/2005–30/12/2020 (

**a**), and yield curve shapes for China (

**b**) observed in t = 24/01/2005; 09/07/2007; 23/10/2014 and 30/12/2020, respectively.

**Figure 3.**Zero-Coupon yield surfaces of the BRICS countries in the monitored period. From top to bottom and from left to right, (

**a**) is associated to Brazil, (

**b**) to Russia, (

**c**) to India, (

**d**) to China, (

**e**) to South Africa.

**Figure 4.**Average observable yield curve against average yield curves generated by the 5F-DRF (red) and FFNN (blue) models in the BRICS market. From top to bottom and from left to right, (

**a**) is associated to Brazil, (

**b**) to Russia, (

**c**) to India, (

**d**) to China, (

**e**) to South Africa.

**Figure 5.**Plot of the BRICS average observable yield curves (

**a**) and a zoomed-in area (

**b**) which covers the maturity spectrum common to all the examined countries.

**Figure 6.**Average residuals generated by 5F-DRF and FFNN for Brazil (

**a**), Russia (

**b**), India (

**c**), China (

**d**), South Africa (

**e**).

**Figure 7.**Surface of daily residuals for the yield curve obtained with the 5F–DRF in the BRICS bond market of Brazil (

**a**), Russia (

**b**), India (

**c**), China (

**d**), South Africa (

**e**).

**Figure 8.**Surface of daily residuals for the yield curve obtained with the FFNN in the BRICS bond market. As the error surface is very flat, the inset shows a zoomed–in area highlighting the error fluctuations otherwise not visible at the same scale employed to visualize the error surface of the 5F–DRF. From top to bottom and from left to right, (

**a**) is associated to Brazil, (

**b**) to Russia, (

**c**) to India, (

**d**) to China, (

**e**) to South Africa.

Country | Period | N${}^{\circ}$ of Observations | Source | |
---|---|---|---|---|

Start | End | |||

Brazil | 30/09/2011 | 30/12/2020 | 2128 | TRD |

Russia | 04/01/2003 | 30/12/2020 | 4578 | CBR |

India | 14/02/2012 | 30/12/2020 | 2185 | TRD |

China | 24/01/2005 | 30/12/2020 | 3818 | TRD |

South Africa | 18/02/2011 | 30/12/2020 | 2472 | TRD |

**Table 2.**Number of layers and neurons for each BRICS country assuring the best fitting performances.

Country | Hidden Layer | Input/Output Nodes | Hidden Nodes |
---|---|---|---|

Brazil | 1 | 12 | 9 |

Russia | 1 | 12 | 13 |

India | 1 | 18 | 10 |

China | 1 | 14 | 11 |

South Africa | 1 | 16 | 12 |

Brazil | Russia | India | China | South Africa | |
---|---|---|---|---|---|

${\beta}_{0}$ | $11.8010$ | $8.7710$ | $6.0058$ | $2.5294$ | $9.4784$ |

${\beta}_{1}$ | $200.3699$ | $-0.2674$ | $-4084.0492$ | $662.6816$ | $15.8301$ |

${\beta}_{2}$ | $-203.2936$ | $-2.5483$ | $4085.0426$ | $-663.1078$ | $-19.2812$ |

${\beta}_{3}$ | $4.3508$ | $0.5273$ | $-86.0267$ | $31.5497$ | $10.0752$ |

${\beta}_{4}$ | $4.8412$ | $0.3619$ | $-81.2562$ | $37.9129$ | $20.9306$ |

${\tau}_{1}$ | $0.8246$ | $1.079$ | $1.9792$ | $2.5018$ | $2.4239$ |

${\tau}_{2}$ | $3.5799$ | $6.1704$ | $10.376$ | $11.4936$ | $9.2533$ |

**Table 4.**Main statistics for MSE and RMSE associated to 5F-DRF and FFNN models applied to the BRICS countries.

MSE | RMSE | ||||
---|---|---|---|---|---|

5F-DRF | FFNN | 5F-DRF | FFNN | ||

Brazil | Mean | $1.0511\times {10}^{-5}$ | $7.6401\times {10}^{-7}$ | $2.5536\times {10}^{-3}$ | $6.9986\times {10}^{-4}$ |

SD | $6.3678\times {10}^{-5}$ | $2.6374\times {10}^{-6}$ | $1.9980\times {10}^{-3}$ | $5.2378\times {10}^{-4}$ | |

Min | $1.4523\times {10}^{-8}$ | $7.6170\times {10}^{-9}$ | $1.2051\times {10}^{-4}$ | $8.7275\times {10}^{-5}$ | |

Max | $2.8513\times {10}^{-3}$ | $1.0155\times {10}^{-4}$ | $5.3398\times {10}^{-2}$ | $1.0077\times {10}^{-2}$ | |

Russia | Mean | $6.8143\times {10}^{-5}$ | $2.3630\times {10}^{-8}$ | $6.1318\times {10}^{-3}$ | $1.2773\times {10}^{-4}$ |

SD | $1.5740\times {10}^{-4}$ | $5.8504\times {10}^{-8}$ | $5.5273\times {10}^{-3}$ | $8.5538\times {10}^{-5}$ | |

Min | $4.5277\times {10}^{-7}$ | $6.5816\times {10}^{-10}$ | $6.7288\times {10}^{-4}$ | $2.5655\times {10}^{-5}$ | |

Max | $1.8731\times {10}^{-3}$ | $1.8621\times {10}^{-6}$ | $4.3279\times {10}^{-2}$ | $1.3646\times {10}^{-3}$ | |

India | Mean | $3.3058\times {10}^{-4}$ | $1.0865\times {10}^{-6}$ | $1.3763\times {10}^{-2}$ | $2.6338\times {10}^{-4}$ |

SD | $5.6081\times {10}^{-4}$ | $4.8029\times {10}^{-5}$ | $1.0789\times {10}^{-2}$ | $1.0087\times {10}^{-3}$ | |

Min | $5.3692\times {10}^{-7}$ | $7.1060\times {10}^{-10}$ | $7.3275\times {10}^{-4}$ | $2.6657\times {10}^{-5}$ | |

Max | $8.6687\times {10}^{-3}$ | $2.1984\times {10}^{-3}$ | $9.3106\times {10}^{-2}$ | $4.6887\times {10}^{-2}$ | |

China | Mean | $7.1533\times {10}^{-4}$ | $6.7902\times {10}^{-8}$ | $1.4338\times {10}^{-2}$ | $1.7081\times {10}^{-4}$ |

SD | $3.0070\times {10}^{-3}$ | $4.1125\times {10}^{-7}$ | $2.2551\times {10}^{-2}$ | $1.9681\times {10}^{-4}$ | |

Min | $4.5227\times {10}^{-8}$ | $2.0021\times {10}^{-10}$ | $2.1267\times {10}^{-4}$ | $1.4149\times {10}^{-5}$ | |

Max | $6.3573\times {10}^{-2}$ | $1.6570\times {10}^{-5}$ | $2.5214\times {10}^{-1}$ | $4.0706\times {10}^{-3}$ | |

S. Africa | Mean | $3.3058\times {10}^{-4}$ | $1.0865\times {10}^{-6}$ | $1.3763\times {10}^{-2}$ | $2.6338\times {10}^{-4}$ |

SD | $5.6081\times {10}^{-4}$ | $4.8029\times {10}^{-5}$ | $1.0789\times {10}^{-2}$ | $1.0087\times {10}^{-3}$ | |

Min | $5.3692\times {10}^{-7}$ | $7.1060\times {10}^{-10}$ | $7.3275\times {10}^{-4}$ | $2.6657\times {10}^{-5}$ | |

Max | $8.6687\times {10}^{-3}$ | $2.1984\times {10}^{-3}$ | $9.3106\times {10}^{-2}$ | $4.6887\times {10}^{-2}$ |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Castello, O.; Resta, M.
Modeling the Yield Curve of BRICS Countries: Parametric vs. Machine Learning Techniques. *Risks* **2022**, *10*, 36.
https://doi.org/10.3390/risks10020036

**AMA Style**

Castello O, Resta M.
Modeling the Yield Curve of BRICS Countries: Parametric vs. Machine Learning Techniques. *Risks*. 2022; 10(2):36.
https://doi.org/10.3390/risks10020036

**Chicago/Turabian Style**

Castello, Oleksandr, and Marina Resta.
2022. "Modeling the Yield Curve of BRICS Countries: Parametric vs. Machine Learning Techniques" *Risks* 10, no. 2: 36.
https://doi.org/10.3390/risks10020036