I am using the pre-compiled Python version of Quantlib from the following website (<a href="javascript:;" title="[4.7 MB] [Sep 12, 2015]">QuantLib_Python-1.6.1-cp27-none-win_amd64.whl)
http://www.lfd.uci.edu/~gohlke/pythonlibs/#quantlib
When the code below is run it returns the following error:
TypeError: in method 'new_CallableFixedRateBond', argument 9 of type 'CallabilitySchedule const &':
schedule = Schedule(Date(25,January,2010), Date(1,February,2020), Period(Semiannual), TARGET(),
ModifiedFollowing, ModifiedFollowing, DateGeneration.Backward, False)
call_dates = [ ql.Date(25,January,2016) ]
call_price = 100.0
callability_schedule = ql.CallabilitySchedule()
for call_date in call_dates:
callability_price = ql.CallabilityPrice(call_price, ql.CallabilityPrice.Clean)
callability_schedule.append(ql.Callability(callability_price, ql.Callability.Call, call_date))
bond = ql.CallableFixedRateBond(3, 100.0, schedule, [0.0565], ql.Thirty360(), ql.ModifiedFollowing, 100.0, ql.Date(25,January,2010), callability_schedule)
Does anyone know why this error is being raised?
Free forum by Nabble | Disable Popup Ads | Edit this page |