Project 8: Credit Default Swap Returns¶
Project Overview¶
This project aims to replicate the Credit Default Swap (CDS) columns from the dataset used in He, Kelly, and Manela (2017), following the methodology described in Palhares (2013).
The goal is to construct and validate CDS returns using WRDS data (Markit, Compustat, CRSP) and perform analysis on both historical and updated CDS return series.
Key Steps¶
Pull All Daily CDS Data
- We connect to WRDS, query the Markit CDS tables for each year, and fetch the 5‐year CDS spreads (bid, ask, par, or composite).
- We merge duplicate quotes on the same day by taking an average or using the composite mid.
Compute a Daily Mid Spread
- We unify bid/ask to a single “midspread” each trading day.
- Ensure spreads are consistently in basis points (bps) or decimals.
Calculate Daily Short‐CDS Returns
- For each ticker (or redcode) and each day, apply the formula:
$$ CDS^{ret}_t = \frac{CDS_t}{250}+ \Delta CDS_t \times RD_t. $$
$$ RD_t = \frac{1}{4} \sum_{j=1}^{4M} e^{-\lambda j/4} - e^{-\left(\lambda + j\delta\right)/4}, $$
- Aggregate Daily to Monthly
- We group each entity’s daily returns by calendar month and compound: $R = \prod (1 + r_{\text{daily}}) - 1$
- The result is a single monthly short‐CDS return for each name.