RE: Adding functions to QuantLib SWIG

Posted by smazzucca on
URL: http://quantlib.414.s1.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14745.html

I was referring to this, previously in the same thread:

 

>If you want more combinations, you have to modify piecewiseyieldcurve.i (look at the bottom of the file; there's a few examples) and regenerate the wrappers.

 

I added this segment in bonds.i:

 

%rename(CallableFixedRateBond) CallableFixedRateBondPtr;

class CallableFixedRateBondPtr : public BondPtr {

    %feature("kwargs") CallableFixedRateBondPtr;

  public:

    %extend {

        CallableFixedRateBondPtr(

                Integer settlementDays,

                Real faceAmount,

                const Schedule &schedule,

                const std::vector<Rate>& coupons,

                const DayCounter& accrualDayCounter,

                BusinessDayConvention paymentConvention,

                Real redemption,

                Date issueDate,

                const CallabilitySchedule &putCallSchedule) {

            return new CallableFixedRateBondPtr(

                new CallableFixedRateBond(settlementDays, faceAmount,

                                  schedule, coupons, accrualDayCounter,

                                  paymentConvention, redemption,

                                  issueDate, putCallSchedule));

        }

    }

};

 

Thanks so much!

S

 

 

From: Luigi Ballabio [via QuantLib] [mailto:ml-node+[hidden email]]
Sent: Monday, December 16, 2013 10:59 AM
To: Simon Mazzucca
Subject: Re: Adding functions to QuantLib SWIG

 

Hi,
    I'm not sure what samples you're referring to? Anyway, I can have
a look at your SWIG interface if you post it here.

Luigi


On Fri, Dec 13, 2013 at 8:57 PM, smazzucca <[hidden email]> wrote:


> I am also trying to convert CallableFixedRateBond using SWIG.
>
> I made some progress by copying the FixedRateBond segment in bonds.i, but at
> the end of the day I'm getting errors when trying to compile.
>
> Where exactly are the samples ? I don't see them anywhere ?
>
> Thank you,
> Simon
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14737.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&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>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


If you reply to this email, your message will be added to the discussion below:

http://quantlib.10058.n7.nabble.com/Adding-functions-to-QuantLib-SWIG-tp6140p14741.html

To unsubscribe from Adding functions to QuantLib SWIG, click here.
NAML





This e-mail, including its contents and attachments, if any, is confidential and is intended only for the addressee. If you are not the intended recipient, you are hereby notified that any use, dissemination or distribution of this communication is strictly forbidden. If you received this e-mail in error please immediately notify the sender and delete or destroy this and all copies of this message and all attachments. Any unauthorized disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.