Login  Register

Re: dual curve bootstrapping

Posted by Peter Caspers-4 on Oct 04, 2015; 4:40pm
URL: http://quantlib.414.s1.nabble.com/dual-curve-bootstrapping-tp16940p16942.html

Hi,

the compiler is not able to match any of the four constructors. You
are obviously trying to call the second one. In your code

boost::shared_ptr<RateHelper> s12m(new SwapRateHelper(
        Handle(s12mRate), 1*Years,
        calendar, swFixedLegFrequency,
        swFixedLegConvention, swFixedLegDayCounter,
        swFloatingLegIndex,Handle<YieldTermStructure>(OISwapTermStructure)));

you should write Handle<Quote>(s12mRate), and make sure, that s12mRate
is of type boost::shared_ptr<Quote> and OISwapTermStructure is of type
boost::shared_ptr<YieldTermStructure>.

If you attach the full code we could have a more detailed look.

Peter




On 4 October 2015 at 16:44, ashwinids <[hidden email]> wrote:

> I'm trying to learn dual curve bootstrapping by following the paper
>            discouting.cpp
> <http://quantlib.10058.n7.nabble.com/file/n16940/discouting.cpp>
> https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CBwQFjAAahUKEwj6wLCEjKnIAhVYkY4KHXK0DWQ&url=http%3A%2F%2Fssrn.com%2Fabstract%3D2219548&usg=AFQjCNGZ2tanuDrTuSxa_sYRNoRZVuaqyw&sig2=KLgOhmFSUYvZ7FcdKqI_2g&bvm=bv.104317490,d.c2E
> <https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CBwQFjAAahUKEwj6wLCEjKnIAhVYkY4KHXK0DWQ&url=http%3A%2F%2Fssrn.com%2Fabstract%3D2219548&usg=AFQjCNGZ2tanuDrTuSxa_sYRNoRZVuaqyw&sig2=KLgOhmFSUYvZ7FcdKqI_2g&bvm=bv.104317490,d.c2E>
>
> First I created full ois discounting curve,then supplied it to the
> swapratehelper to bootstrap the forward curve.
>
> code for swapratehelper:
>
>       boost::shared_ptr<RateHelper> s12m(new SwapRateHelper(
>         Handle(s12mRate), 1*Years,
>         calendar, swFixedLegFrequency,
>         swFixedLegConvention, swFixedLegDayCounter,
>
> swFloatingLegIndex,Handle<YieldTermStructure>(OISwapTermStructure)));
>
> I'm getting compilation errors
>   no known conversion for argument 1 from
> ‘QuantLib::Handle<QuantLib::Quote>’ to ‘QuantLib::Rate {aka double}
>  no known conversion for argument 8 from
> ‘QuantLib::Handle<QuantLib::YieldTermStructure>’ to ‘const
> QuantLib::Handle<QuantLib::Quote>&
>
>
> These compilation error start after addition of
> QuantLib::Handle<QuantLib::YieldTermStructure> to swapratehelper
> constructor.
>
> I have attached a sample of the code.
> Please guide me here,what i'm doing wrong?
>
>
>
>
>
>
>
> --
> View this message in context: http://quantlib.10058.n7.nabble.com/dual-curve-bootstrapping-tp16940.html
> Sent from the quantlib-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users