summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2017-02-03 17:51:20 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2017-02-03 17:51:20 -0500
commit835b6434ea8301c3283b8f2febda6d2cbb5510f5 (patch)
tree79c6568226288574cae1e91c1060aba5c2e60550
parentee458862e860d87f8388c753f45f6240e45ebbc6 (diff)
downloadpyisda-835b6434ea8301c3283b8f2febda6d2cbb5510f5.tar.gz
PEP8, use bint
-rw-r--r--pyisda/curve.pyx4
-rw-r--r--pyisda/legs.pyx10
2 files changed, 7 insertions, 7 deletions
diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx
index 61b12d6..4c0a1d3 100644
--- a/pyisda/curve.pyx
+++ b/pyisda/curve.pyx
@@ -54,7 +54,7 @@ cdef class Curve(object):
def base_date(self):
return TDate_to_pydate(self._thisptr.fBaseDate)
- def __forward_zero_price(self, d2, d1 = None):
+ def __forward_zero_price(self, d2, d1=None):
""" computes the forward zero price at a given date.
Parameters
@@ -255,7 +255,7 @@ cdef class SpreadCurve(Curve):
def __init__(self, today, YieldCurve yc, start_date, step_in_date,
cash_settle_date, list end_dates,
double[:] coupon_rates, double[:] upfront_rates,
- double[:] recovery_rates, int pay_accrued_on_default = True):
+ double[:] recovery_rates, bint pay_accrued_on_default=True):
cdef TDate today_c = pydate_to_TDate(today)
cdef TDate step_in_date_c = pydate_to_TDate(step_in_date)
diff --git a/pyisda/legs.pyx b/pyisda/legs.pyx
index 5665e43..71e300c 100644
--- a/pyisda/legs.pyx
+++ b/pyisda/legs.pyx
@@ -18,7 +18,7 @@ cdef class ContingentLeg:
"""
def __cinit__(self, start_date, end_date, double notional,
- TBoolean protect_start = True):
+ bint protect_start=True):
self._thisptr = JpmcdsCdsContingentLegMake(pydate_to_TDate(start_date),
pydate_to_TDate(end_date),
@@ -84,9 +84,9 @@ cdef class FeeLeg:
protect_start : bool, optional
if True, protection starts at beginning of day. Default to True.
"""
- def __cinit__(self, start_date, end_date, TBoolean pay_accrued_on_default,
- double notional, double coupon_rate, str payment_dcc = 'ACT/360',
- TBoolean protect_start = True):
+ 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):
cdef TStubMethod stub_type
@@ -142,7 +142,7 @@ cdef class FeeLeg:
return result
def pv(self, today, step_in_date, value_date, YieldCurve yc, SpreadCurve sc,
- TBoolean pay_accrued_at_start):
+ bint pay_accrued_at_start):
"""
Present Value of FeeLeg cashflows.