diff options
| -rw-r--r-- | pyisda/legs.pyx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pyisda/legs.pyx b/pyisda/legs.pyx index 838ef7a..06b9680 100644 --- a/pyisda/legs.pyx +++ b/pyisda/legs.pyx @@ -95,15 +95,17 @@ cdef class FeeLeg: Default 'ACT/360' protect_start : bool, optional if True, protection starts at beginning of day. Default to True. + stub : string, one of 'f/s', 'b/s', 'f/l', 'b/l', optional + Default 'f/s' """ def __cinit__(self, start_date, end_date, bint pay_accrued_on_default, double notional, double coupon_rate, str payment_dcc='ACT/360', - bint protect_start=True): + bint protect_start=True, str stub="f/s"): cdef TStubMethod stub_type - if JpmcdsStringToStubMethod(b"f/s", &stub_type) != 0: - raise ValueError("can't convert stub") + if JpmcdsStringToStubMethod(stub, &stub_type) != 0: + raise ValueError(f"can't convert stub {stub}") self._thisptr = JpmcdsCdsFeeLegMake(pydate_to_TDate(start_date), pydate_to_TDate(end_date), |
