|
From: Francois B. <ig...@gm...> - 2018-07-30 11:02:29
|
Hi,
I notice this code:
inline Rate IborIndex::forecastFixing(const Date& d1,
const Date& d2,
Time t) const {
QL_REQUIRE(!termStructure_.empty(),
"null term structure set to this instance of " <<
name());
DiscountFactor disc1 = termStructure_->discount(d1);
DiscountFactor disc2 = termStructure_->discount(d2);
return (disc1/disc2 - 1.0) / t;
}
The last line looks odd to me. disc1/disc would return a non-continuously
compounded return. Dividing by t is the approach to annualise continuous
returns. So the 2 are not consistent.
I would have expected:
return std::pow(disc1 / disc2, 1 / t) - 1.0;
On the other hand, if I make that change, many tests fail, so I'm by no
means confident about my assertion above.
regards
Francois Botha
|