|
From: Francois B. <ig...@gm...> - 2020-11-24 13:32:45
|
I'm not very familiar with the Python interface, but I do believe the original C++ Schedule class has previousDate and nextDate methods. My guess would be that they are available in Python too. regards Francois Botha On Tue, 24 Nov 2020 at 15:27, Daniel Lobo <dan...@gm...> wrote: > Hi, > > Let assume I have below parameters for some instrument - > > import QuantLib as ql > > risk_free_rate = 0.01 > day_count = ql.Actual365Fixed() > calendar = ql.UnitedStates() > calculation_date = ql.Date(1, 9, 2019) > settle_date = calendar.advance(calculation_date, 5, ql.Days) > maturity_date = calendar.advance(settle_date, 10, ql.Years) > > schedule = ql.Schedule(settle_date, maturity_date, ql.Period(6, > ql.Months), calendar, ql.ModifiedFollowing, ql.ModifiedFollowing, > ql.DateGeneration.Forward, False) > > Now let say I am given some arbitrary date > > some_date = ql.Date(7, 11, 2019) > > With this, is there any direct way to find the next pricing date from > the schedule object? > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |