TD2 - Credit Risk - ENPC

This exercise is based on the following S&P transition matrix: .... order to make the results reproducible, we set the seed of the random number generator before.
104KB taille 6 téléchargements 342 vues
Loïc BRIN • François CRENIN

Tutorial 2 – Statistical models

Tutorial 2

Statistical models École Nationale des Ponts et Chausées Département Ingénieurie Mathématique et Informatique – Master II Loïc BRIN • François CRENIN

Exercise 1: Term structure of default probability deduced from a Transition Matrix. This exercise is based on the following S&P transition matrix: AAA AA A BBB BB B CCC D

AAA 90,8% 0,1% 0,9% 0,0% 0,0% 0,0% 0,2% 0,0%

AA 8,3% 91,2% 2,4% 0,3% 0,1% 0,1% 0,0% 0,0%

A 0,7% 7,9% 90,0% 5,9% 0,7% 0,2% 0,2% 0,0%

BBB 0,1% 0,6% 5,4% 86,9% 7,7% 0,5% 1,3% 0,0%

BB 0,1% 0,1% 0,7% 5,3% 80,5% 6,5% 2,3% 0,0%

B 0,0% 0,1% 0,3% 1,2% 8,8% 82,7% 12,9% 0,0%

CCC 0,0% 0,0% 0,1% 0,1% 1,0% 4,1% 60,6% 0,0%

D 0,0% 0,0% 0,1% 0,2% 1,2% 5,9% 22,5% 100,0%

available here http://defaultrisk.free.fr/data/TD2_1.csv. 1. Load the database and define a function that for a given number of year (n) and a given credit rating (l ), returns a n-vector with the PD for each n years, deduced from the S&P transition matrix.

1 2

### loading the transition matrix data