|
From: Luigi B. <lui...@gm...> - 2024-12-06 15:58:35
|
You can choose the calibration method (see https://github.com/lballabio/QuantLib/blob/v1.36/ql/termstructures/yield/nonlinearfittingmethods.hpp#L99) but if none is given, it uses the Simplex method. Luigi On Fri, Dec 6, 2024 at 3:35 PM philippe hatstadt <pha...@ma...> wrote: > Thanks Luigi. Do you know what calibration method is used, as I find that > it has a hard time finding a good global calibration. Furrhermore, the > solution is unstable to minor changes in inputs if I don’t pass an initial > guess. > > Regards > > Philippe Hatstadt > +1-203-252-0408 > > > On Dec 6, 2024, at 7:08 AM, Luigi Ballabio <lui...@gm...> > wrote: > > > Hello Philippe, > no way to fix a single parameter, I'm afraid. If you have a set of > calibrated parameters and want to use them without performing the > calibration, you can pass maxEvaluations=0 to achieve that but you'll still > have to pass at least one helper in order to establish a max date. > Starting from next release, there will be another constructor available > that takes no helpers and an explicit max date and does the same. > > Hope this helps, > Luigi > > > On Mon, Dec 2, 2024 at 4:15 PM Philippe Hatstadt via QuantLib-users < > qua...@li...> wrote: > >> Is there a way to fix one or more parameters when calibrating NS from the >> python API? >> Specifically, I would like to fix the exponential decay lambda parameter. >> >> After building instrument helpers, I use this call: >> ql.FittedBondDiscountCurve(*params, ql.NelsonSiegelFitting(),, accuracy, >> numIter, guess, simplex_lambda) >> >> I looked at the c++ code, and it seems that there is a array parameter >> that represents weights, but I didn't see anything related to freezing one >> parameter. >> >> Also, I was looking for a way to just build a NS curve by passing all >> parameters, and not perform any calibration, but I didn't see one. It's >> easy to implement, but wondering as the solution might be related to my >> first question? >> >> >> >> Best regards Philippe Hatstadt 203-252-0408 >> https://www.linkedin.com/in/philippe-hatstadt/ >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |