summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyisda/curve.pyx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx
index 937c4b6..c0b571a 100644
--- a/pyisda/curve.pyx
+++ b/pyisda/curve.pyx
@@ -287,14 +287,14 @@ cdef class Curve(object):
if <Basis>curve.fBasis == Basis.CONTINUOUS:
for i in range(shape):
h2 = curve.fArray[i].fRate
- t2 = (curve.fArray[i].fDate - curve.fBaseDate)/365.
+ t2 = (curve.fArray[i].fDate - curve.fBaseDate)
data[i] = (h2 * t2 - h1 * t1) / (t2 - t1)
h1 = h2
t1 = t2
elif <Basis>curve.fBasis == Basis.ANNUAL_BASIS:
for i in range(shape):
h2 = log1p(curve.fArray[i].fRate)
- t2 = (curve.fArray[i].fDate - curve.fBaseDate)/365.
+ t2 = (curve.fArray[i].fDate - curve.fBaseDate)
data[i] = (h2 * t2 - h1 * t1) / (t2 - t1)
h1 = h2
t1 = t2