diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2023-05-31 15:15:09 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2023-05-31 15:15:09 -0400 |
| commit | 45a65c94c783fef388349a124541559fa2d9a804 (patch) | |
| tree | 9f4c8a0dcae88d81402010cd054dd60702c72643 | |
| parent | f7d9573e7a7a4a803e3559126c27a4e09affa1e1 (diff) | |
| download | pyisda-45a65c94c783fef388349a124541559fa2d9a804.tar.gz | |
no need to scale
| -rw-r--r-- | pyisda/curve.pyx | 4 |
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 |
