|
From: Luigi B. <lui...@gm...> - 2022-03-14 09:02:22
|
Hi Mike,
your new code is correct.
Regards,
Luigi
On Mon, Mar 14, 2022 at 12:39 AM Mike DelMedico <mik...@gm...>
wrote:
> Hi everyone,
>
> I just recently upgraded from 1.19 to 1.25 and noticed that the
> constructor I had been using was depreciated then removed. I just want to
> make sure I'm using the replacement constructor correctly as intended, if
> anyone has a moment to comment.
>
> Old way:
>
> curveDiscount = ql.PiecewiseLogCubicDiscount(valuationDate,
> rateHelpers,
> dayCounter,
> jumpQuotes,
> jumpDates,
> accuracy)
>
> New way:
>
> curveDiscount = ql.PiecewiseLogCubicDiscount(valuationDate,
> rateHelpers,
> dayCounter,
> jumpQuotes,
> jumpDates,
> ql.MonotonicLogCubic(),
> ql.IterativeBootstrap(accuracy, None, None))
>
> From what I can tell the accuracy should now be passed via the iterative
> bootstrap and the min/max can remain null via passing None. I was a little
> confused though because the file here
> <https://github.com/lballabio/QuantLib-SWIG/blob/4afcbcfc10775b5750f5931ed4488df78dfdd329/SWIG/piecewiseyieldcurve.i#L84>
> still has accuracy as a separate parameter. I'm using 3.9 Python in case
> that matters at all.
>
> I also tried using ql.YieldTermStructure() constructor, but I get a 'no
> constructor defined' error so I guess that is not supported via SWIG at
> this time.
>
> Thanks,
> Mike
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|