|
From: Luigi B. <lui...@gm...> - 2021-10-13 07:18:55
|
Hi David,
currently Python only exports the long-form constructor (see
https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/fittedbondcurve.i#L85).
As you say, you can pass the default parameters — a large number for
maxCutoffTime is ok.
Luigi
On Mon, Oct 11, 2021 at 11:58 PM <da...@el...> wrote:
> Hi,
>
> The C++ documentation here (QuantLib: ExponentialSplinesFitting Class
> Reference (rkapl123.github.io)
> <https://rkapl123.github.io/QLAnnotatedSource/d9/d6c/class_quant_lib_1_1_exponential_splines_fitting.html>)
> has a constructor:
>
> ExponentialSplinesFitting(bool constrainAtZero, Size numCoeffs, Real
> fixedKappa, const Array & weights = Array() )
>
> If I try to get away in Python with just passing these parameters, I get
> the error:
>
> Wrong number or type of arguments for overloaded function
> 'new_ExponentialSplinesFitting'.
>
> Possible C/C++ prototypes are:
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const
> &,Array const &,Real,Real,Size,Real)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const
> &,Array const &,Real,Real,Size)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const
> &,Array const &,Real,Real)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const
> &,Array const &,Real)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const
> &,Array const &)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const
> &)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting(bool)
>
> ExponentialSplinesFitting::ExponentialSplinesFitting()
>
> Ie none of these match.
>
>
>
> Using QuantLib 1.23 on Python.
>
>
>
> I am afraid I am not very knowledgeable about how the C++/Python
> conversion works: I can pass the default parameters to the long-form
> constructor, except I am not sure how to specify QL_MAX_REAL in Python
> (using a large number like 1000000 seems to work …)
>
>
>
> Grateful for any advice!
>
> Thanks
>
> David Sansom
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|