|
From: Steve H. <war...@gm...> - 2023-02-13 08:43:18
|
Hi all, I’m doing some study on JointCalendar. I make two calendar and remove one holiday for each calendar respectively. Then I make a joint calendar to combine the above calendars. I use isBusinessDay to check if I can get the desired result. I find joint calendar doesn’t return the expected result as both calendars. If I am not using JointCalendar correctly? import QuantLib as ql cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact) cdr2=ql.UnitedStates(ql.UnitedStates.Settlement) date1=ql.Date(11, 2 , 2023) date2=ql.Date(12, 2 , 2023) cdr1.removeHoliday(date1) cdr2.removeHoliday(date2) cdr3=ql.JointCalendar(cdr1,cdr2) print(cdr1.isBusinessDay(date1)) =>return True print(cdr2.isBusinessDay(date2)) =>return True print(cdr3.isBusinessDay(date1)) =>return False , why ? print(cdr3.isBusinessDay(date2)) =>return Fasle , why ? Regards, Steve |