Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

curves

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.

Spot Yield Curve

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

$$r(t)=\beta_0 +\beta_1\left(\frac{1-e^{-t/\lambda_1}}{t/\lambda_1}\right) +\beta_2\left(\frac{1-e^{-t/\lambda_1}}{t/\lambda_1}-e^{-t/\lambda_1}\right) +\beta_3\left(\frac{1-e^{-t/\lambda_2}}{t/\lambda_2}-e^{-t/\lambda_2}\right),$$

the first two parameters $β_0$, $β_1$ representing the level and the slope of the desired yield curve, $β_2$, $λ_1$ being the first curvature factor (the magnitude of the first “hump” in the curve) and its location (typically the short-to-medium maturities), respectively, and the parameters $β_3$, $λ_2$ corresponding to the second curvature factor and its location (longer maturities due to the amplified convexity effect), respectively.

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).

Par Yield Curve

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.

Credit Default Swap Spread Curve

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

$$r(t)= \beta_0\left(1-\frac{1-e^{-t/\lambda}}{t/\lambda}\right) +\beta_2\left( \frac{1-e^{-t/\lambda}}{t/\lambda} -e^{-t/\lambda} \right)$$

since $β_0$ + $β_1$ = 0.

References

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

About

R template inteded for fitting a spot yield curve (six-parameter Svensson method) and for the subsequent conversion to a par curve, leveraging packages termstrc and yieldcurves, supplemented by a Python implementation of a US CDS spread curve fitted using an adjusted Nelson-Siegel function.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages