use paymentAdjustment in the fixed leg#2649
Open
jmishin wants to merge 1 commit into
Open
Conversation
|
Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it. |
Owner
|
Thanks! May you have a look at the CLAassistant comment above? |
Author
I signed the CLA, but the problem is that my local git settings contained an email not linked to my GitHub account. It looks like the only way out is to make a new commit. Should I do it now or wait for your review to account for possible revisions? |
Owner
|
Please go ahead — the PR is simple and the tests are passing, so I don't think I'll require any changes. |
eb7e89b to
3b4d5c3
Compare
Author
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
paymentAdjustment is ignored for the fixed leg in OvernightIndexedSwap
see example below:
import QuantLib as ql
today = ql.Date(27,2,2026)
ql.Settings.instance().evaluationDate = today
value_date = ql.Russia().advance(today, 1, ql.Days)
maturiry_date = ql.NullCalendar().advance(value_date, 3, ql.Years)
schedule = ql.MakeSchedule(
effectiveDate=value_date,
terminationDate=maturiry_date,
tenor=ql.Period("3Y"),
frequency=ql.Monthly,
calendar=ql.NullCalendar(), #IMPORTANT
convention=ql.Unadjusted, #IMPORTANT
rule=ql.DateGeneration.Forward
)
swap = ql.OvernightIndexedSwap(
ql.Swap.Payer,
1_000,
schedule,
0.0,
ql.ActualActual(ql.ActualActual.ISDA),
ql.Sofr(),
0.0,
0,
ql.ModifiedFollowing, #IMPORTANT
ql.Russia(),
False,
ql.RateAveraging.Compound,
1,
0,
False
)
for c in swap.fixedLeg():
print(f"{c.date().ISO()} {ql.Russia().isBusinessDay(c.date())}")