An R-based template for modelling the spot and par yield curves of a selected bond class in addition to a Python implementation of a US credit default swap (CDS) spread curve fitted using an adjusted Nelson-Siegel function.
A zero-coupon continuously compounded yield curve is fitted following the methodology presented in Svensson (1994). The parsimonious (parametric) model of spot rates is given as
the first two parameters
The R package utilized to conduct the procedure is termstrc, described in the manual (Package ‘termstrc’) and the companion paper (Zero-Coupon Yield Curve Estimation with the Package termstrc).
A zero-coupon yield curve is converted to a par curve via the package yieldcurves. The compounding convention selected is annual, mirroring the Czech government bond standard.
A US CDS spread curve fitted using the adjusted Nelson-Siegel function, proposed in Dvořák et al. (2019) and further discussed personally with Mr Dvořák himself. Assuming that the instantaneous CDS spread is equal to zero (in other words, no default risk exists), the Nelson-Siegel function becomes
since
The original paper by Svensson, presenting the methodology:
Svensson, L. E. (1994). Estimating and interpreting forward interest rates: Sweden 1992-1994. IMF Working Paper WP/94/114.
https://larseosvensson.se/files/papers/estimating-and-interpreting-forward-rates-sweden-1992-1994-IMFwp94-114.pdf
The ČNB paper on CDS spread curve:
Dvořák, M., Komárková, Z., & Kučera, A. (2019). The Czech Government Yield Curve Decomposition at the Lower Bound. Czech Journal of Economics & Finance, 69(1).
https://journal.fsv.cuni.cz/storage/1427_02_36_kucera_final_issue_1_2019_.pdf