|
From: Philippe H. <pha...@ma...> - 2023-11-29 19:46:08
|
I use Python, but this obviouslyt appleis to C++. Most/all signatures require settlementDays like this one: ql. FixedRateBond ( settlementDays , faceAmount , schedule , coupon , paymentConvention ). I do not really understand why settlement days (or settlement date) needs to be an attribute of a Bond, as the latter should be immutable. Furthermore, methods such as ql.FixedrateBond.bondYield() requires a settlement date, which is quite normal. But then what is the point of having settle days/ date as a mandatory attribute of the Bond class constructor when it is correctly required to do any type of bond math calculations? Now, let's assume I build a US Govt bond with settlementDays=1. What happens if I want to compute a forward bond price with say T+5 settlement lag. I could directly pass such settlement date to bondYield() without rebuilding the bond object with settleDays=5 instead of 1. So can you confirm that doing the above effectively overrides the settleDays lag built in the bond class?Although passing settleDays=1 to build the bond seems redundant, I suppsoe it it required, which is fine. Regards Philippe Hatstadt 203-252-0408 pha...@ma... |