Login  Register

Re: Generate Schedule in Python with given dates

Posted by CK TUNG on May 11, 2017; 2:14am
URL: http://quantlib.414.s1.nabble.com/Generate-Schedule-in-Python-with-given-dates-tp18266p18268.html

Here is an example
https://leanpub.com/quantlibpythoncookbook/read
calendar = UnitedStates()
dates = [Date(2,1,2015), Date(2, 2,2015),
                  Date(2,3,2015), Date(1,4,2015),
                  Date(1,5,2015), Date(1,6,2015),
                  Date(1,7,2015), Date(3,8,2015),
                  Date(1,9,2015), Date(1,10,2015),
                  Date(2,11,2015), Date(1,12,2015),
                  Date(4,1,2016)]

         rolling_convention = Following 
schedule= Schedule(dates, calendar,
                              rolling_convention) 
for i, d in enumerate(schedule):
             print i+1, d

TSchulz85 <[hidden email]> 於 2017年5月11日 上午3:04 寫道:

Hi,
Is it possible to generate a QuantLib Schedule in python just with specific
defined dates?
I'm intending to just download a bond coupon schedule from bloomberg, thus
avoiding any problems with stubs.
Thanks,
Tobias



--
View this message in context: http://quantlib.10058.n7.nabble.com/Generate-Schedule-in-Python-with-given-dates-tp18266.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users