diff --git a/financepy/products/credit/cds_option.py b/financepy/products/credit/cds_option.py index d66033a0..5ca31ab8 100644 --- a/financepy/products/credit/cds_option.py +++ b/financepy/products/credit/cds_option.py @@ -226,7 +226,6 @@ def __repr__(self): """print out details of the CDS contract and all the calculated cash flows""" s = label_to_string("OBJECT TYPE", type(self).__name__) - s += label_to_string("EFFECTIVE DATE", self.step_in_dt) s += label_to_string("EXPIRY DATE", self.expiry_dt) s += label_to_string("TERMINATION DATE", self.maturity_dt) s += label_to_string("STRIKE SPREAD", self.strike_cpn * 10000, "bp\n") diff --git a/tests/unit/test_cds_option.py b/tests/unit/test_cds_option.py index a955c1fc..7a922cf5 100644 --- a/tests/unit/test_cds_option.py +++ b/tests/unit/test_cds_option.py @@ -44,3 +44,9 @@ def test_cds_option_zero_volatility(): v0 = cds_option.value(value_dt, issuer_curve, 0.0) v1 = cds_option.value(value_dt, issuer_curve, 1e-8) assert round(v0, 6) == round(v1, 6) + + +def test_cds_option_repr(): + + cds_option = CDSOption(expiry_dt, maturity_dt, 0.015, notional) + assert "STRIKE SPREAD: 150.0bp" in repr(cds_option)