|
From: philippe h. <pha...@ma...> - 2024-12-06 14:35:29
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">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.<div><br id="lineBreakAtBeginningOfSignature"><div dir="ltr">Regards<div><br></div><div>Philippe Hatstadt</div><div>+1-203-252-0408</div><div><br></div></div><div dir="ltr"><br><blockquote type="cite">On Dec 6, 2024, at 7:08 AM, Luigi Ballabio <lui...@gm...> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hello Philippe,<div> 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.</div><div><br></div><div>Hope this helps,</div><div> Luigi</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 2, 2024 at 4:15 PM Philippe Hatstadt via QuantLib-users <<a href="mailto:qua...@li...">qua...@li...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div>Is there a way to fix one or more parameters when calibrating NS from the python API?<br></div><div>Specifically, I would like to fix the exponential decay lambda parameter.<br></div><div><br></div><div>After building instrument helpers, I use this call:<br></div><div>ql.FittedBondDiscountCurve(*params, ql.NelsonSiegelFitting(),, accuracy, numIter, guess, simplex_lambda)<br></div><div><br></div><div>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.<br></div><div><br></div><div>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?</div><div><br></div><div><br></div><div><br></div><div style="white-space:pre-wrap">Best regards Philippe Hatstadt 203-252-0408 <a href="https://www.linkedin.com/in/philippe-hatstadt/" rel="noopener noreferrer" target="_blank">https://www.linkedin.com/in/philippe-hatstadt/</a><br></div><div><br></div></div><div><br></div></div>_______________________________________________<br> QuantLib-users mailing list<br> <a href="mailto:Qua...@li..." target="_blank">Qua...@li...</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/quantlib-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/quantlib-users</a><br> </blockquote></div> </div></blockquote></div></body></html> |