You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
The text was updated successfully, but these errors were encountered: