Inconsistent business day convention for reference periods in OvernightLeg
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- fintech-quant
Research direction
Start in overnightindexedcoupon.cpp, where refStart and refEnd are adjusted with paymentAdjustment_; compare those lines with the corresponding reference-period adjustment in FixedRateLeg and FloatingLeg. Change the reference-period adjustments to use schedule_.businessDayConvention() while leaving the payment date on paymentAdjustment_. Run the overnight indexed coupon/leg tests to confirm irregular periods and accrual fractions still behave as expected.
Written by the indexing model from the issue text.
Description
In overnightindexedcoupon.cpp, the reference period start and end dates for irregular coupon periods are determined as follows:
refStart = calendar.adjust(end - schedule_.tenor(), paymentAdjustment_);
and
refEnd = calendar.adjust(start + schedule_.tenor(), paymentAdjustment_);
Both use paymentAdjustment_, which is also the business day convention used to determine the payment date:
paymentDate = paymentCalendar_.advance(end, paymentLag_, Days, paymentAdjustment_);
However, in other leg implementations, such as FixedRateLeg and FloatingLeg, the reference period dates are adjusted using schedule_.businessDayConvention() instead.
The latter approach seems more appropriate, since the reference period should follow the conventions of the underlying accrual schedule rather than those of the payment dates. Otherwise, changing the payment convention alone may unintentionally affect the reference period and, potentially, the accrual fraction.
- Dominant language
- C++
- Stars
- 7.7k
- Forks
- 2.3k
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 100
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lballabio/QuantLib
-
BiCGstab discards a converged solution when convergence lands on the last permitted iterationPossibly taken @Rahul19771 claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Solver1D tests: Probe in test-suite/solvers.cpp has the wrong derivative signPossibly taken @igitur claimed this 6 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 35/100
lballabio/QuantLib#3114 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
lballabio/QuantLib#3106 · 2 comments ·
Maintainers usually reply within 3 days
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
lballabio/QuantLib#3105 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
lballabio/QuantLib#3093 · 2 comments ·
Maintainers usually reply within 3 days
All issues in lballabio/QuantLib
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
patrick-hudson/put.gd-desktop#2044 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
uxlfoundation/oneDNN#6604 · 1 comment ·
Maintainers usually reply within 2 days