|
From: Daniel L. <dan...@gm...> - 2020-11-24 15:38:39
|
Thanks Jack for mentioning the dir() function. I was looking for something similar for long. On Tue, 24 Nov 2020 at 19:34, Jack G <jac...@gm...> wrote: > Just to confirm, this method is exposed in python: > > [image: image.png] > > I have found a very useful tool in python is the dir() function... if you > call this on a ql class it will tell you everything that is available from > it as an option - eg. below (easier full screen of course...) > > [image: image.png] > > On Tue, Nov 24, 2020 at 9:33 PM Francois Botha <ig...@gm...> wrote: > >> 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 >>> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |