Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIS coupon misleading fixingDate in cashflow report #265

Open
noonediesalone opened this issue Sep 3, 2024 · 2 comments
Open

OIS coupon misleading fixingDate in cashflow report #265

noonediesalone opened this issue Sep 3, 2024 · 2 comments

Comments

@noonediesalone
Copy link

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.

@xwzhu
Copy link

xwzhu commented Sep 3, 2024

It seems the code takes the fixing date from underlying OIS swap in your case. So either case, it would be the fixing date of the last date with interest accrued. So when OIS fixingDate is set to 0, it's the preceding business day of AccrualStartDate if interest is determined in advance, or it's the preceding business day of AccrualEndDate if in arrears.

@noonediesalone
Copy link
Author

Indeed, the daily observation dates within the interest period are correct.

However, the fixing of the interest period must coincide precisely with the start or end of the interest period, depending on whether the reset timing is in advance or arrears, provided that the fixing gap is zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants