I have the following problem bootstrapping the JPY OIS Curve. The bootstrapping itself works when havin one set of data, e.g. for the date 2017-02-09. I have all my instruments and as said bootstrapping and receiving the OIS curve. If i extend the dataset to a second date 2017-02-10 I receive all the data into my bootstrapper which makes no sense with the error message:
more than one instrument with pillar February 10th, 2017
which results to the same maturities due to data from different dates as explained above. I have somehow to loop over the fdates but I have no idea how this could work in that context.Help would be appreciated.
import QuantLib as ql import pandas as pd import matplotlib.pyplot as plt def Convert(Period): unit = if Period[-1:] == 'D': unit = ql.Days elif Period[-1:] == 'M': unit = ql.Months elif Period[-1:] == 'W': unit = ql.Weeks elif Period[-1:] == 'Y': unit = ql.Years period_object = ql.Period(int(Period[:-1]), unit) return period_object date = ql.Date(9, ql.February, 2017) ql.Settings.instance().evaluationDate = date data = pd.read_csv('C:/Data_JPY_Playing.csv').fillna('') data_selected = data[['fdate', 'ptype' ,'maturity','fixing','values']].to_records(index=False) Rate_Helper_Full_Disc =  for fdate, ptype, maturity, fixing, values in data_selected: if row['ptype'] == 'Deposit': helper_disc = ql.DepositRateHelper(ql.QuoteHandle(ql.SimpleQuote(row['values']/100)), Convert(row['maturity']), int(row['fixing']), ql.Japan(), ql.ModifiedFollowing, False, ql.Actual365Fixed()) Rate_Helper_Full_Disc.append(helper_disc) disc_curve = ql.PiecewiseCubicZero(date, Rate_Helper_Full_Disc, ql.Actual365Fixed()) disc_curve.enableExtrapolation()