|
| 1 | +from cython.operator cimport dereference as deref |
| 2 | +from libcpp cimport bool |
| 3 | +from libcpp.vector cimport vector |
| 4 | + |
| 5 | +from quantlib.handle cimport static_pointer_cast |
| 6 | +cimport quantlib.indexes._ibor_index as _ii |
| 7 | +from quantlib.indexes.ibor_index cimport IborIndex |
| 8 | +from quantlib.types cimport Natural, Integer, Real, Rate, Spread |
| 9 | +from quantlib.time.businessdayconvention cimport BusinessDayConvention, Following, Unadjusted |
| 10 | +from quantlib.time.schedule cimport Schedule |
| 11 | +from quantlib.time.daycounter cimport DayCounter |
| 12 | +from quantlib.time.date cimport Date, Period |
| 13 | +from quantlib.time.calendar cimport Calendar |
| 14 | +from quantlib.utilities.null cimport Null |
| 15 | +from . cimport _amortizingfloatingratebond as _afb |
| 16 | + |
| 17 | +cdef class AmortizingFloatingRateBond(Bond): |
| 18 | + def __init__(self, Natural settlement_days, vector[Real] notional, Schedule schedule, IborIndex index, DayCounter accrual_day_counter, |
| 19 | + BusinessDayConvention payment_convention = Following, Natural fixing_days = Null[Natural](), vector[Real] gearings = [1.0], |
| 20 | + vector[Spread] spreads = [0.0], |
| 21 | + vector[Rate] caps=[], vector[Rate] floors=[], bool in_arrears = False, Date issue_date = Date(), |
| 22 | + Period ex_coupon_period = Period(), Calendar ex_coupon_calendar=Calendar(), |
| 23 | + BusinessDayConvention ex_coupon_convention=Unadjusted, |
| 24 | + bool ex_coupon_end_of_month=False, |
| 25 | + vector[Real] redemptions=[100.0], |
| 26 | + Integer payment_lag = 0): |
| 27 | + self._thisptr.reset( |
| 28 | + new _afb.AmortizingFloatingRateBond( |
| 29 | + settlement_days, |
| 30 | + notional, schedule._thisptr, static_pointer_cast[_ii.IborIndex](index._thisptr), |
| 31 | + deref(accrual_day_counter._thisptr), payment_convention, fixing_days, gearings, |
| 32 | + spreads, caps, floors, in_arrears, deref(issue_date._thisptr), |
| 33 | + deref(ex_coupon_period._thisptr), ex_coupon_calendar._thisptr, |
| 34 | + ex_coupon_convention, ex_coupon_end_of_month, |
| 35 | + redemptions, |
| 36 | + payment_lag |
| 37 | + ) |
| 38 | + ) |
0 commit comments