|
From: Christofer B. <bog...@gm...> - 2020-09-11 21:23:21
|
Hi, I was looking at an example in - http://gouthamanbalaraman.com/blog/callable-bond-quantlib-python.html However I failed to understand how the call option schedule is constructed in below snippet? callability_schedule = ql.CallabilitySchedule() call_price = 100.0 call_date = ql.Date(15,ql.September,2016); null_calendar = ql.NullCalendar(); for i in range(0,24): callability_price = ql.CallabilityPrice( call_price, ql.CallabilityPrice.Clean) callability_schedule.append( ql.Callability(callability_price, ql.Callability.Call, call_date)) call_date = null_calendar.advance(call_date, 3, ql.Months); Why I need to run a loop as "for i in range(0,24)" to create a singleton schedule at ql.Date(15,ql.September,2016)? If I had only 2 callability schedules like ql.Date(15,ql.September,2016) & ql.Date(15,ql.October,2016) within the lifetime of the underlying Bond then how should I proceed? Your help will be very much appreciated. Thanks, |