|
From: Luigi B. <lui...@gm...> - 2023-04-27 15:42:51
|
For a fixed-rate bullet bond, I'd try building the coupons manually, as in
(pseudo-code, not tested, take with a grain of salt):
Leg coupons;
coupons.push_back(ext::make_shared<FixedRateCoupon>(date[0], 100, ...));
for (each other coupon) {
const auto& last = coupons.back();
coupons.push_back(ext::make_shared<FixedRateCoupon>(date[1],
last->nominal() + last->amount(), ...)
}
once you have all of them, you can pass them to the proper Bond constructor:
auto bond = ext::make_shared<Bond>(settlementDays, calendar, issueDate,
coupons);
Due to the increasing notionals, the constructor will add negative payments
at each coupon date that represent adding amount to the notional and will
cancel out the coupon payments.
Let me know if this works for you.
Luigi
On Mon, Apr 17, 2023 at 5:20 PM Dagur Gunnarsson <da...@ko...> wrote:
> Hello,
>
> Is there any way to define a BulletLoan, Bond in QuantLib such that the
> coupon payments add to the notional each period?
>
> First the notional is 100.0
> then 103.5 .etc. until maturity.
>
> -Dagur
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|