Re: Fixed rate bond

Posted by StephenWong on
URL: http://quantlib.414.s1.nabble.com/Fixed-rate-bond-tp8450p8451.html


Dagur Gunnarsson-2 wrote
hello,

Is there a simple way to simulate a bond(fixed rate) that pays a single
coupon on the maturity day as well as the principal, in QuantLib.  I have
tried to create a Fixed rate bond that has the FirstCouponDate =
MaturityDate = FirstInstallmentDate but then I get the error *std::exception:
first date (March 10th, 2015) out of effective-termination date range
[March 10th, 2003, March 10th, 2015)*...

regards
D.G.
Looks like you can do this with a combination of a fixed rate bond with regular coupon (at least once a year), then subtract that with a series of fixed rate bonds with the same coupon but shorter duration + a series of zero coupon bonds with the same maturities as the series of fixed rate bonds except the original bond. The combination would be what you want.