http://quantlib.414.s1.nabble.com/SwapRateHelper-Question-SWIG-Python-tp15297p15314.html
and it seems to work. Are you sure you're not picking up an old
On Wed, May 21, 2014 at 6:27 PM, Ioan F. <
> Hello,
>
> I am trying to expose a new type of the SwapRateHelper constructor (already
> existent in QuantLib) to Python.
> In the ratehelpers.i interface file, I added the following code:
>
> //ADDED
>
> *SwapRateHelperPtr(
> const Handle& rate,
> const Period &tenor,
> const Calendar &calendar,
> Frequency fixedFrequency,
> BusinessDayConvention fixedConvention,
> const DayCounter &fixedDayCount,
> const boost::shared_ptr<IborIndex> &index,
> const Handle &spread=Handle(),
> const Period &fwdStart=0 *Days,
> const Handle<YieldTermStructure>
> &discountingCurve=Handle<YieldTermStructure>()) {
> boost::shared_ptr<IborIndex> libor =
> boost::dynamic_pointer_cast<IborIndex>(index);
> return new SwapRateHelperPtr(
> new SwapRateHelper(rate, tenor, calendar,
> fixedFrequency, fixedConvention,
> fixedDayCount, libor,
> spread, fwdStart,
> discountingCurve));*
>
> //END ADDED
>
> I was able to wrap, build and install the QuantLib library (via SWIG) into
> Python, but when I try to use the SwapRateHelper in Python, I get the
> following error:
>
> *NotImplementedError: Wrong number or type of arguments for overloaded
> function 'new_SwapRateHelper'.
> Possible C/C++ prototypes are:....*
>
> The following code works:
>
> *qqq=SwapRateHelper(QuoteHandle(eurLiborSwaps[(2, Years)]),
> Period(2, Years),
> euroCalendar,
> fixedLegFrequency,
> fixedLegAdjustment,
> fixedLegDayCounter,
> EURLibor3M(),
> QuoteHandle(),
> Period(0,0))*
>
> while this one causes the problem:
>
> *qqq=SwapRateHelper(QuoteHandle(eurLiborSwaps[(2, Years)]),
> Period(2, Years),
> euroCalendar,
> fixedLegFrequency,
> fixedLegAdjustment,
> fixedLegDayCounter,
> EURLibor3M(),
> QuoteHandle(),
> Period(0,0),
> eoniaHandle)*
>
> Furthermore, please note that Python reports the type of the eoniaHandle
> variable as:
>
> *QuantLib.QuantLib.YieldTermStructureHandle*
>
> Any help or suggestions are highly appreciated.
> Since this is my first time posting, please excuse any breaking of the
> "mailing list etiquette."
>
> Thank you,
> Ioan
>
>
>
> --
> View this message in context:
http://quantlib.10058.n7.nabble.com/SwapRateHelper-Question-SWIG-Python-tp15297.html> Sent from the quantlib-dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
>
http://p.sf.net/sfu/SauceLabs> _______________________________________________
> QuantLib-dev mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-devThe best possible search technologies are now affordable for all companies.
Our experts will assist you in its installation for $59/mo, no commitment.