Skip to content

Fix CDSOption repr using a step_in_dt attribute it doesn't have - #493

Open
wavebyrd wants to merge 1 commit into
FinancePy-Org:masterfrom
wavebyrd:fix/cds-option-repr
Open

wavebyrd wants to merge 1 commit into
FinancePy-Org:masterfrom
wavebyrd:fix/cds-option-repr

Conversation

@wavebyrd

@wavebyrd wavebyrd commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

repr() / print() of a CDSOption raises:

>>> print(CDSOption(Date(20, 3, 2014), Date(20, 6, 2019), 0.015))
AttributeError: 'CDSOption' object has no attribute 'step_in_dt'

The option only stores its expiry and the CDS maturity, so I removed the EFFECTIVE DATE line; the rest of the repr is unchanged.

Added test_cds_option_repr; it fails on master and the full unit suite passes with the fix (2081 passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant