summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2020-06-30 20:56:36 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2020-06-30 20:56:36 -0400
commit03d2c41f8dec4ebc99ab44d28719e276d41694e4 (patch)
tree5f8298063ae8c051974a5201ceaab948b0b05231
parent9f9bb410476298f1bcd4af3405eb88c98be7b92f (diff)
downloadpyisda-03d2c41f8dec4ebc99ab44d28719e276d41694e4.tar.gz
allow to pass the fixed_rate in accrued
-rw-r--r--pyisda/credit_index.pyx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx
index 83c377e..f06d27b 100644
--- a/pyisda/credit_index.pyx
+++ b/pyisda/credit_index.pyx
@@ -378,10 +378,10 @@ cdef class CreditIndex(CurveList):
index=tickers)],
keys=['duration', 'protection_pv'])
- def accrued(self):
+ def accrued(self, double fixed_rate):
cdef double accrued
FeeLegAI(self.fee_legs[0], self.base_date + 1, &accrued)
- return accrued
+ return accrued * fixed_rate
def pv(self, step_in_date, cash_settle_date, maturity, YieldCurve yc not None,
double fixed_rate, double epsilon=0.):