View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Fitting Survival Probability Models

5.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 6.54 KB File ID: #26905 Version:

Fitting Survival Probability Models


Gabo (view profile)


10 Mar 2010 (Updated )

Companion code for "Fitting Survival Probability Models" article.

| Watch this File

File Information

This is a MATLAB(R) implementation of the ideas discussed in
   Lopez-Calva, G. and K. Shea, "Fitting Survival Probability Models," WILMOTT Magazine, issue 45, pp. 16-22.

We estimate the parameters of three different survival probability models based on credit default swap (CDS) spreads. The parameters of the models are fitted using a nonlinear least-squares solver. For the standard model, a bootstrapping technique is also implemented, for comparisons. The mark-to-market (MtM) of an existing CDS contract is also calculated under the three alternative survival models. Code for a general survival model is provided, though it is not used in the main demo.

Dependencies: This demo uses functionality from the Financial Toolbox(TM), Fixed-Income Toolbox(TM) and Optimization Toolbox(TM).

Required Products Financial Toolbox
Fixed-Income Toolbox
Optimization Toolbox
MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
03 Jan 2014 Yu

Yu (view profile)

good file, well, there is a tiny mistake. When trying to price the exsiting CDS contracts, the error occurs:

Error in rpv01 (line 9)
RPVDF = LIBOR.getDiscountFactors(RPV_Dates);

All Curve Dates must be greater than or equal to Settle.

, So that, slight adjustment for the code is needed, but still very helpful....

Comment only
02 Jan 2014 Yu

Yu (view profile)

does any one have the paper Fitting Survival Probability Models and could share with me?

11 Feb 2011 Johnny

Johnny (view profile)

Very helpful in calculating hazard probability. A very nice work.

01 Sep 2016

Updated license

Contact us