|
From: Peter C. <pca...@gm...> - 2022-08-07 08:58:57
|
Hi Francois,
sounds right. As for the unit test it seems they're all set up with
eval date = 2022-03-07 and forward date = 2022-03-10, i.e. a very
short forward period. Which could be the reason why the tests don't
detect this issue?
Best
Peter
On Sun, 31 Jul 2022 at 19:16, Francois Botha <ig...@gm...> wrote:
>
> Hi all,
>
> I'm doing some fixed rate bond forward calculations and I'm trying to understand the forward value.
>
> In forward.cpp, the code is:
> Real Forward::forwardValue() const {
> calculate();
> return (underlyingSpotValue_ - underlyingIncome_ )/
> discountCurve_->discount(maturityDate_);
> }
>
> and in bondforward.cpp, the fields are set as:
> underlyingSpotValue_ = spotValue();
> underlyingIncome_ = spotIncome(incomeDiscountCurve_);
> and
> Real BondForward::spotValue() const {
> return bond_->dirtyPrice();
> }
>
> So underlyingSpotValue_ is hence the bond dirty price (per 100 nominal) and underlyingIncome_ is the value of the bond coupons, but not per 100 nominal, but rather per the actual nominal of the bond.
>
> This looks like an unintended discrepancy in notional amounts and would explain why the forward price and NPV for the bond forwards aren't close to what I expect.
>
> There are however unit tests (e.g. testFuturesPriceReplication()) that explicitly test this.
>
> Looking forward to an expert opinion here.
>
> thanks
> Francois Botha
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|