import QuantLib as ql
import pandas as pd
today = ql.Date().todaysDate()
calendar = ql.Canada()
# Load the CDOR swap rates data into a pandas DataFrame
cdor_data = pd.read_csv('cdor_swap_rates.csv')
# Convert the data into QuantLib objects
cdor_curve = ql.RelinkableYieldTermStructureHandle()
cdor_helpers = []
for i, row in cdor_data.iterrows():
tenor = ql.Period(row['Term'])
rate = row['Rate'] / 100.0
helper = ql.SwapRateHelper(rate, tenor, calendar,
ql.Annual, ql.Unadjusted,
ql.Thirty360(ql.Thirty360.BondBasis), ql.Cdor, ql.Period('1D'),
cdor_curve)
cdor_helpers.append(helper)
Hola chicos, no puedo averiguar por qué mi función SwapRateHelper no está funcionando, lanzando un TypeError: Wrong number or type of arguments for overloaded function 'new_SwapRateHelper'.