Re: Bond Cash flow dates

Posted by sumanta on
URL: http://quantlib.414.s1.nabble.com/Yc-Issue-in-Ql-tp14172p14193.html

Hello Luigi,

It says the "1st iteration: could not bootstrap ". The quantlib curve is unable to interpolate these kind of data.

How do you think these should be handled or fixed? Also I would like to inform you that if the wrong data / big jump is at the last quote, the quantlib is able to interpolate properly.

Regards,
Sumanta



On Thu, Apr 4, 2013 at 2:59 PM, Luigi Ballabio [via QuantLib] <[hidden email]> wrote:
Catch the exception as I suggested in my previous post and you'll see
the cause of the error.

On Wed, Apr 3, 2013 at 1:26 PM, sumanta <[hidden email]> wrote:

> Hello Luigi,
>
> What I did was I gave a set of quotes to create a YC. The sample quotes are
> given below.
>
> 1 day, 3%
> 3 day , 3%
> 8 day, 3%
> 20 day , 3%
> 25 day, 3%
> 30 day , 3%
> 40 day, 3%
> 45 day , 3%
> This worked fine.
>
> Now I changed it to
> 1 day, 3%
> 3 day , 3%
> 8 day, 3%
> 20 day , 10%
> 25 day, 3%
> 30 day , 3%
> 40 day, 3%
> 45 day , 3%
>
> This cause the crash.
>
> Regards,
> Sumanta
>
>
> On Wed, Apr 3, 2013 at 3:12 PM, Luigi Ballabio [via QuantLib] <[hidden

> email]> wrote:
>>
>> Hi,
>>     I'm not sure what the context was here.  Anyway, it's only a crash
>> if you don't catch exceptions. If you surround the yield-curve
>> construction with a try/catch clause, you can get hold of the
>> exception that was raised and find the reason for the failure.
>> Something like the following will do:
>>
>> try {
>>     // your code here
>> } catch (std::exception& e) {
>>         std::cout << e.what() << std::endl;
>> }
>>
>> Luigi
>>
>>
>> On Tue, Apr 2, 2013 at 3:47 PM, sumanta <[hidden email]> wrote:
>>
>> > Hello,
>> >
>> > You were right. I passed some wrong parameters due to which the yc was
>> > not
>> > formed properly. I have fixed it and now it is working fine. Thanks for
>> > the
>> > help.
>> >
>> > However, there is one more issue. I asked one of my college to do some
>> > negetive testing on my implementation. What he did was to give some
>> > sharp
>> > jumps to the input points.  This caused a crashed in the YC. I agree
>> > that
>> > the sharp jumps that he gave was no logical. How can you suggest why the
>> > yc
>> > crashed? And is it the responsibility of the user to check the validity
>> > of
>> > the input points before passing it for yc construction.
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://quantlib.10058.n7.nabble.com/Yc-Issue-in-Ql-tp14172p14179.html
>> > Sent from the quantlib-users mailing list archive at Nabble.com.

>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Minimize network downtime and maximize team effectiveness.
>> > Reduce network management and security costs.Learn how to hire
>> > the most talented Cisco Certified professionals. Visit the
>> > Employer Resources Portal
>> > http://www.cisco.com/web/learning/employer_resources/index.html
>> > _______________________________________________
>> > QuantLib-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>>
>> ------------------------------------------------------------------------------
>> Minimize network downtime and maximize team effectiveness.
>> Reduce network management and security costs.Learn how to hire
>> the most talented Cisco Certified professionals. Visit the
>> Employer Resources Portal
>> http://www.cisco.com/web/learning/employer_resources/index.html
>> _______________________________________________
>> 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/Yc-Issue-in-Ql-tp14172p14182.html
>> To unsubscribe from Yc Issue in Ql, click here.
>> NAML
>
>
>
>
> --
> Great spirits have always encountered violent opposition from mediocre
> minds.
>
> ________________________________
> View this message in context: Re: Bond Cash flow dates
>
> Sent from the quantlib-users mailing list archive at Nabble.com.

>
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
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/Yc-Issue-in-Ql-tp14172p14192.html
To unsubscribe from Yc Issue in Ql, click here.
NAML



--
Great spirits have always encountered violent opposition from mediocre minds.