Be the first to rate this file! 4 Downloads (last 30 days) File Size: 5.47 KB File ID: #22014

CDS pricer

by Rogier Swierstra

 

06 Nov 2008 (Updated 13 Mar 2009)

This short routine calculates the mark-to-market price of a credit default swap.

| Watch this File

File Information
Description

This file has been updated as of 12 March. I believe it is now more accurate and more flexible, but it's still not the real thing. JPMorgan's source code has been made available at www.cdsmodel.com, I have not yet compared my implementation with theirs.

This program is still based on the paper by O'Kane and Turnbull (available at http://www.nuclearphynance.com/User%20Files/256/cds.pdf ). This routine prices a CDS, taking current market spreads to bootstrap survival probabilities, which imply a "risky present value". Contract details (initial spread, end date) then give the theoretical market price of the contract. The results are very similar to Bloomberg's CDSW page in simple tests.

The function requires the Financial Toolbox to manage dates, but if you are willing to sacrifice some accuracy this can easily be worked around.

Perhaps I should state that this is an analytical tool, and I am not responsible for any investment decisions made using it.

Required Products Financial Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
13 Mar 2009

* Cleaned up code.
* Function can now report "risky present value" as well as mark-to-market price.
* Accuracy improved by better management of dates.

Tag Activity for this File
Tag Applied By Date/Time
finance Rogier Swierstra 06 Nov 2008 11:19:52
analysis Cristina McIntire 10 Nov 2008 10:46:14
bloomberg Cristina McIntire 10 Nov 2008 10:46:22
bloomberg Rogier Swierstra 13 Mar 2009 13:45:23

Contact us at files@mathworks.com