Engine icon indicating copy to clipboard operation
Engine copied to clipboard

OIS coupon misleading fixingDate in cashflow report

Open noonediesalone opened this issue 5 months ago • 2 comments

Hi,

One small display issue in cashflow report for an OIS coupon. fixingDate column is shown as: Date fixingDate() const override { return fixingDates_[fixingDates_.size() - 1 - rateCutoff_]; } Assuming we have zero rateCutoff_ it essentially picks the last date in the vector, which was computed as:

    n_ = valueDates_.size() - 1;
    // ....
    // fixing dates
    fixingDates_.resize(n_);
    for (Size i = 0; i < n_; ++i)
        fixingDates_[i] = overnightIndex->fixingCalendar().advance(
            valueDates_[i], -static_cast<Integer>(FloatingRateCoupon::fixingDays()), Days, Preceding);

Further assuming zero fixingDays, should be that fixingDates_ is exactly identical to valueDates_ except for last date (which is the accrual period end). This is as expected, to split the accrual period on a daily observation schedule and to assign the fixing date at the start of the period (and that's why the last date is omitted).

But when the fixing date is dumped in the cashflow report (or some other place) it essentially takes the last observation date in the accrual period, which looks strange.

Take example 63, which in portfolio.xml has a trade id XccySwap. Change on both legs FixingDays to zero and run Input\ore_valid_ester.xml to notice in flows.csv that fixingDate is not the same as AccrualStartDate:

image

Similar, change the IsInArrears to true and it's not the same as AccrualEndDate:

image

I think expectation is that when FixingDays is zero then depending on the IsInArrears the fixingDate should be either start or end of accrual period.

Regards, Laurentiu.

noonediesalone avatar Sep 03 '24 10:09 noonediesalone