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

Failed to create a SwapRateHelper with frequency ql.Once #2061

Open
JackPai100 opened this issue Aug 19, 2024 · 1 comment
Open

Failed to create a SwapRateHelper with frequency ql.Once #2061

JackPai100 opened this issue Aug 19, 2024 · 1 comment

Comments

@JackPai100
Copy link

I'd like to create a SwapRateHelper for a swap that pays fixed leg interest at maturity. I tried ql.Once, but it gives me "unknown fixed leg default tenor" error. Some swap pays interest at maturity for tenor less than 1Y. Here is the sample code to reproduce the issue. Note, I am using MXN as a made-up example, even though MXN has a 4W frequency in realty.

import QuantLib as ql

tiie_index = ql.IborIndex('TIIE', ql.Period('4W') , 1, ql.MXNCurrency(), ql.NullCalendar(), ql.Following, False, ql.Actual360())

rate = 0.02

tenor = ql.Period('4W')

frequency = ql.Once # This will cause failure. What should I set for at-maturity type swap?

bdays_adj = ql.Following

day_count = ql.Actual360()

h = ql.SwapRateHelper(ql.QuoteHandle(ql.SimpleQuote(rate)), tenor, ql.Mexico(), frequency, bdays_adj, day_count, tiie_index)

Copy link

boring-cyborg bot commented Aug 19, 2024

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

@lballabio lballabio modified the milestone: Release 1.36 Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants