Re: Bond Cash flow dates

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

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.