Login  Register

Quantlib Python - Issue with CallabilitySchedule with CallableFixedRateBond

Posted by Barber, Chad on Aug 15, 2016; 9:00pm
URL: http://quantlib.414.s1.nabble.com/Quantlib-Python-Issue-with-CallabilitySchedule-with-CallableFixedRateBond-tp17646.html

I am using the pre-compiled Python version of Quantlib from the following website (<a href="javascript:;" title="[4.7&nbsp;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?

 


This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users