Calibration of CDS.cpp

Posted by Heinze, Patrick on
URL: http://quantlib.414.s1.nabble.com/Calibration-of-CDS-cpp-tp15106.html

Hello everybody,
 
currently, I am writing my Bachelor thesis and I try to use QuantLib to generate realistic Credit Default Swaps. I am new to quantitative finance. That’s why I tried to rebuild an example which I found in “Options, Futures, and Other Derivatives” by J. Hull, using the CDS.cpp example from quantlib.org. Unfortunately, up to now, I wasn’t able to do so and I wondered if you might help me.
 
The following values were used by Hull:
  • Notional: 1 $
  • Spread: 0.012420
  • Schedule: Annual
  • Yield curve: 5% LIBOR
  • Recovery rate: 40%
  • Duration: 5 Years
 
I changed the “flatRate” to 0.05 and created “tenors” for each year (1*Years, …, 5*Years). Afterwards I changed the “schedule” from quarterly to annual and set the “DateGeneration” to Forward. Besides some further output, I did not make any other changes.
 
The resulting survival probability and discount factor are nearly as in the example from Hull. Moreover, the hazard rate values are ok. Unfortunately, the NPV, the default leg and the coupon leg are not the same as in Hull’s example. As far as I can see, that’s because of a calibration, in order to get the NPV to zero. Is there a chance to prevent this calibration being computed, so that I can see the previous NPVs’ using the spread which I provided instead of the fair spread?
 
Thank you in advance.
 
Best regards,
Patrick
 
 
 

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users