Is there any way to extract the parameters generated during the fitting of the Svensson model to a yield curve?
It seems like this can be done in C++ but the SWIG wrappers do not return the parameters or attach them to some object, as far as I can tell. If there is a way to do this in the wrapped code an explanation of how this is possible would be immensely helpful. If there is no way to currently do this but some hints about how I can extend the SWIG interface are provided I would also appreciate the guidance. Thanks, Ray |
I'm attaching a patch to add the methods (or you can retrieve the most
recent version of fittedbondcurve.i from GitHub). As it happens, it has examples of both ways to add methods. When the class is exported directly like FittingMethod, just add the method declaration; when is hidden behind a shared_ptr like FittedBondDiscountCurve, you need a combination of %export and dynamic_pointer_cast. Yes, I'll have to find some time to explain it better... Luigi On Mon, Jul 28, 2014 at 9:09 PM, randomAlpha <[hidden email]> wrote: > Is there any way to extract the parameters generated during the fitting of > the Svensson model to a yield curve? > > It seems like this can be done in C++ but the SWIG wrappers do not return > the parameters or attach them to some object, as far as I can tell. If there > is a way to do this in the wrapped code an explanation of how this is > possible would be immensely helpful. If there is no way to currently do this > but some hints about how I can extend the SWIG interface are provided I > would also appreciate the guidance. > > Thanks, > Ray > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/Svensson-Parameters-tp15663.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Infragistics Professional > Build stunning WinForms apps today! > Reboot your WinForms applications with our WinForms controls. > Build a bridge from your legacy apps to the future. > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users 0001-Export-methods-to-retrieve-parameters-from-fitted-bo.patch (1K) Download Attachment |
Luigi,
Thanks for implementing this. Very useful. |
Free forum by Nabble | Edit this page |