Re: Bond Cash flow dates

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Bond Cash flow dates

sumanta
Hello,

I am working on the C# version of quantlib. I want to use low discrepancy random number generator given by QL.
 UInt32 se = 6;

 UniformLowDiscrepancySequenceGenerator un = new UniformLowDiscrepancySequenceGenerator(se);

This is the code that I wrote to create the object. This compiles but crashes on running.
Is this the correct approach. Kindly correct me if I am wrong.

Regards,
Sumanta



On Fri, Apr 12, 2013 at 10:01 PM, Sumanta Biswas <[hidden email]> wrote:
Hello Ballabio,

Thanks for the help.

Regards,
Sumanta


On Mon, Apr 8, 2013 at 12:39 PM, Ballabio Gerardo-4 [via QuantLib] <[hidden email]> wrote:

I suppose the problem is that in order to have quoted rates of 10% at 20 days and 3% at 25 days, the yield curve must be strongly negative between 20 and 25 days. From a quick back-of-the-envelope calculation I’d estimate it at -25%. That’s an unreasonable value and I wonder whether QuantLib should actually be required to deal with such values.

Indeed you don’t have this problem if the 10% quote is the last one.

 

Gerardo

 

 

Da: sumanta [mailto:[hidden email]]

Inviato: giovedì 4 aprile 2013 11.49
A: [hidden email]

Oggetto: Re: [Quantlib-users] Bond Cash flow dates

 

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.

 


View this message in context: Re: Bond Cash flow dates
Sent from the quantlib-users mailing list archive at Nabble.com.


Banca Profilo S.p.A. Corso Italia, 49 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057 Capitale Sociale Euro 136.794.106,00 i.v. Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 - [hidden email]
Iscritta all’Albo delle Banche e dei Gruppi bancari Aderente al Fondo Interbancario di Tutela dei depositi Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A. DISCLAIMER: The information transmitted may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

------------------------------------------------------------------------------
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-tp14172p14194.html
To unsubscribe from Yc Issue in Ql, click here.
NAML



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



--
Great spirits have always encountered violent opposition from mediocre minds.
Reply | Threaded
Open this post in threaded view
|

Re: Bond Cash flow dates

Luigi Ballabio
What does it mean "crashes on running"? What is the error message you get?

(Also, a suggestion as mailing list moderator: for clarity, when
starting a new thread you might want to change the subject of the post
and not quote old posts. Sending a new post instead of replying to an
existing one would be even better.)

Luigi

On Wed, Apr 17, 2013 at 11:50 AM, sumanta <[hidden email]> wrote:

> Hello,
>
> I am working on the C# version of quantlib. I want to use low discrepancy
> random number generator given by QL.
>  UInt32 se = 6;
>
>  UniformLowDiscrepancySequenceGenerator un = new
> UniformLowDiscrepancySequenceGenerator(se);
>
> This is the code that I wrote to create the object. This compiles but
> crashes on running.
> Is this the correct approach. Kindly correct me if I am wrong.
>
> Regards,
> Sumanta

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users