Hello, I think
inline Date InterestRateIndex::valueDate(const Date& fixingDate)
const { QL_REQUIRE(isValidFixingDate(fixingDate), fixingDate <<
" is not a valid fixing date");
return fixingCalendar().advance(fixingDate, fixingDays_, Days); } Is wrong. It does not really advance the value date of the right number of working days. For instance, if you are Friday, 1, 2 or 3 fixing days will give the same result but if you are as of Friday, O/N, T/N or S/N rates have not the same
value. Am I correct? Pierre Pierre Grison ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Pierre,
In this case, Calendar().advance() iterates only on business days as defined within the calendar. Hence, there should be no difference with the O/N, T/N, S/N period identifiers. the relevant piece of code in the calendar.cpp file is the following: Date Calendar::advance(const Date& d, Integer n, TimeUnit unit, BusinessDayConvention c, bool endOfMonth) const { QL_REQUIRE(d!=Date(), "null date"); if (n == 0) { return adjust(d,c); } else if (unit == Days) { Date d1 = d; if (n > 0) { while (n > 0) { d1++; while (isHoliday(d1)) // !!! d1++; n--; } ... Cordialement, Jean-Mathieu Vermosen ----- Mail d'origine ----- De: Grison PG Pierre (External DEXIA-US) <[hidden email]> À: [hidden email] Envoyé: Mon, 24 Nov 2014 22:53:29 +0100 (CET) Objet: [Quantlib-users] fixing date problem Hello, I think inline Date InterestRateIndex::valueDate(const Date& fixingDate) const { QL_REQUIRE(isValidFixingDate(fixingDate), fixingDate << " is not a valid fixing date"); return fixingCalendar().advance(fixingDate, fixingDays_, Days); } Is wrong. It does not really advance the value date of the right number of working days. For instance, if you are Friday, 1, 2 or 3 fixing days will give the same result but if you are as of Friday, O/N, T/N or S/N rates have not the same value. Am I correct? Pierre Pierre Grison VIE Trading & Structuring DCLNY 445 Park Ave. - 8th Floor New York, NY 10022 Tel: +1 212-705-0775 Fax: Email: [hidden email] [cid:image001.jpg@01D00807.2BF11EC0] ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |