Skip to main content

This package offers users simple tools designed for Credit Default Swap (CDS) data. Included in this package is a hazard rate bootstrapping function which implements the JP Morgan model for determining hazard rate curves, and spread calculators for both vanilla and binary CDSs. All functions linearly interpolate/extrapolate yield curve values wherever necessary.

To be included in future releases will be a function that prices Credit Default Swaptions (options on CDSs). Also, later editions of this package will offer the users options for interpolating/extrapolating yield curve values.

Bootstrapping Function: This function implements the so-called JP Morgan model. This model makes the assumptions that the interest rate process is independent of the default process and that default leg pays at the end of each accrual period. Typically, regular fee payments occur at the end of each period. To that end, this model assumes that defaults occur midway buring each payment period. And finally, this model assumes that the hazard rate is piecewise constant on the intervals that correspond to the maturities of the CDS contracts.

CDS pricing function: This function calculates the “fair” spread of a vanilla CDS, i.e. the spread that makes the value of the default/floating leg equal to the value of the payment/fixed leg. This is accomplished by using a given yield curve and given credit curve.

Binary CDS pricing function: Similar to the previous function, this one calculates the “fair” spread of a binary CDS by finding the spread that equates the value of the default/floating leg equal to the value of the payment/fixed leg. This is also accomplished using a provided yield curve and credit curve

Change Log

0.0.1 (10/08/2020)

  • First Release

0.0.2 (10/10/2020)

  • CDS spread calculator added. Some typos corrected.

0.0.3 (10/11/2020)

  • Yield curve interpolation/extrapolation component was corrected.

  • Binary CDS spread calculator added.

  • Documentation updated

Metadata

Release files for cdstools 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdstools 0.0.3
File Size Uploaded Provenance
cdstools-0.0.3.tar.gz 5.0 kB Without provenance Details

Release files / cdstools-0.0.3.tar.gz

Download URL cdstools-0.0.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c95ddb6cb5729c9247ef10ef4dfc5e662115e4b7a3e09a1f39da618d47b6974b
BLAKE2b-256 checksum
How to use checksums
830e5d4268f1be9812f0a88367863e5ca9b8223076409007e07954bbf1d25d17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.0

Security for cdstools 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page