Skip to content
All library documents

Using Fixed-Date Curves for Historical CDS Valuation in QuantLib

Article Quant Q&A · Author: Jeremy Taylor

Summary

The document raises a practical issue in valuing credit default swaps across many historical dates with QuantLib’s ISDA conventions. The author wants to calculate present value, points up front, or other measures for each date, using that date’s yield curve, without repeatedly changing the global evaluation date.

The question compares a single-date example with curves constructed using an explicit reference date. It reports that changing the evaluation date still changes the discount factors returned by those curve objects, and asks whether instruments and discount curves can instead retain fixed reference dates. No solution, code, or test results are included, so the document identifies a valuation and date-management problem rather than teaching a confirmed workaround. Researchers applying the question should verify QuantLib’s date and evaluation settings behavior in their own setup.

Key ideas

  • Historical CDS valuation may require applying a different yield curve to each date.
  • The author seeks present value, points-up-front, and other CDS measures across many dates.
  • An explicit curve reference date does not appear to prevent evaluation-date changes from affecting discount factors.
  • The document poses the issue but provides no resolution or empirical results.

Tags

Full text
# quantlib isda cds time-series


# quantlib isda cds time-series












I am trying to use quantlib from python to work with time series of cds quote, e.g I would like to evaluate the PV or PUF or other metrics on many different days. Each day has an associated yield curve as specified by the isda convention.

I've seen the example https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/isda-engine.py which seems great if you want to work for one point in time. However the dependency on setting evalutationDate() creates several issues when working across hundreds or thousands of historic dates.

Is there a way to make the discount curves and other instruments have a fixed reference date? There is a constructor for PiecewiseLogLinearDiscount with a specific reference date but even then the objects return different discount factors if the settings.evaluationDate is altered.

## Answer by Shabir Ali (score 0)

https://quant.stackexchange.com/a/85883

The pain here is that ISDA CDS standard-model inputs (credit spreads, ISDA discount curves, recovery) are all terminal/licensed data — QuantLib gives you the engine but not the fuel, which is why this question has sat unanswered. Two practical paths:



- Flip the direction — bond-implied curves: FINRA TRACE corporate bond prints are public and free. Bootstrap a piecewise-flat hazard-rate curve from TRACE z-spreads against a SOFR discount curve, then price ISDA-convention par CDS spreads off that hazard curve. You get a daily 1–10Y single-name curve history from public data, with the caveat that it is model-implied from bonds, never traded quotes, and thin names produce unstable knots that you should gate rather than smooth.

Disclosure: I build/run Basisline, which does exactly (2) — the methodology page documents the bootstrap, cleaning and quality-gate conventions in full, and there's a free JSON tier (`/v1/index.json`) covering 10 US single-name issuers with ~1y of daily history. Even if you end up wiring your own pipeline, the method write-up should save you the conventions archaeology.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.