|
From: Luigi B. <lui...@gm...> - 2024-01-16 10:51:42
|
Hi,
the settlement days passed to the constructor are used to calculate a
default settlement date based on the evaluation date. Some of the methods
of the Bond class allow to override the settlement date, others don't and
will use the default.
Luigi
On Wed, Nov 29, 2023 at 8:49 PM Philippe Hatstadt via QuantLib-users <
qua...@li...> wrote:
> 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...
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|