Credit Risk Analytics

Credit Risk Analytics with Python — Survival Probabilities via Bootstrapping CDS spreads

Idea of credit risk is not new to us. Many times, during our everyday lives we are exposed to this risk. Imagine back in our college days when we lent some of our pocket money to a friend because he/she had to buy something and was falling short of funds. We used to be surely concerned if we were indeed going to receive our money back! This was the potential loss from credit risk that was bothering us! Those were good old days 😊.

Credit Risk manifests in many forms!

Most of us equate credit risk as the risk of complete default on payment by a counterparty. Whereas, this is correct, there is something more to add to this definition. In the financial market, the following points that are also analyzed by banks as a part of their credit risk analysis.

Mitigants against credit risk

In order to manage credit risk, banks and financial institutions take various measures. A few of these measures may range from:

Understanding Credit Default Swap

Credit Default Swap is a derivative product. For a CDS trade to happen, there must be a underlying product. The underlying product is generally a bond or a securitized product etc. CDS may be used for either trading or risk management.

Poisson process and hazard rates

For analysis of credit events we use a probabilistic process by the name of Poisson process. Poisson process is a discrete time process which gives the probability of default between two time intervals conditional on surviving uptil the initial time point. Mathematically, Poisson process is given as:

Formula for probability of survival

Role of survival probability (i.e. probability of survival) in pricing CDS

The survival probability is a very key quantity in calculation of cash flows and therefore the valuation of a CDS contract. By referring to the above section on Understanding Credit Default Swap, we observe that there are cash flows structures that happen depending on a condition (i.e. credit event) occurring / not-occurring. Occurrence of a credit event is related to the concept of probability of default (i.e. which is the complement of probability of survival). We call it as a complement because:

Implementation of Credit Bootstrapping algorithm

Below, we will discuss the Python code that can be used for executing the bootstrapping algorithm to determine the survival probabilities.

Survival Probabilities computed through bootstrapping credit spreads
Plot of Survival probability vs CDS maturity

Founder: FinQuest Institute; www.finquestinstitute.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store