Credit spread
Credit risk is one of the major problems for financial institutions. The major cause for this is credit quality, and credit spread values help to understand credit risk depending upon the credit quality. Credit spread is an important concept in institutional trading as credit spread depends upon the quality or rating of bonds. It is the difference in bond yield of two bonds with similar maturity but with different bond ratings. We are going to use the CreditMetrics
package for this, which can be installed and imported to the R workspace using the following two commands:
> install.packages('CreditMetrics') > library('CreditMetrics')
Credit spread is calculated using cm.cs()
, which has just two parameters. The first parameter is the ...
Get Learning Quantitative Finance with R now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.