CPIbond

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

CPIbond

Seyfullah ÇETİN

Hi there,

 

I haven’t seen many examples of CPIBond usage. There is only one in test suite which is used for CPI Swap constintency. I tried to use some parts of that code chunk to create a CPIbond and access its methods. I can get some of them but for example, I can not access cleanprice(), it throws an exception. Is CPIbond a useable class or just still under construction?

 

Thanks in advance.

 

PS: I don’t have much of a finance knowledge.

 

M. Seyfullah ÇETİN
Yazılım Geliştirme Uzmanı

cid:image001.jpg@01CA69C8.7FB7FB60

[hidden email]
Tel : 0212 356 64 00
Faks : 0212 356 47 88

 

 


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: CPIbond

Luigi Ballabio
2012/3/16 Seyfullah ÇETİN <[hidden email]>
I haven’t seen many examples of CPIBond usage. There is only one in test suite which is used for CPI Swap constintency. I tried to use some parts of that code chunk to create a CPIbond and access its methods. I can get some of them but for example, I can not access cleanprice(), it throws an exception. Is CPIbond a useable class or just still under construction?

It should be usable.  What is the message of the exception? Setting up the inflation curves might be tricky.

Luigi
 


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: CPIbond

Seyfullah ÇETİN
Hi again,

Here is the code. It is pretty much same as the the one in test suite.

In the line when I try to get the cleanprice() (cpiB.cleanPrice();), I get a
"Vector iterator offset out of range" exception.

-----Original Message-----
From: Luigi Ballabio [mailto:[hidden email]]
Sent: Tuesday, March 20, 2012 3:40 PM
To: Seyfullah ÇETİN
Subject: Re: [Quantlib-users] CPIbond

May you send to the mailing list some code that reproduces the problem?


2012/3/20 Seyfullah ÇETİN <[hidden email]>:
> We get a C++ vector exception.  It is thrown when Bond::notional(Date d)
is

> called. It is because notionalSchedule_ is empty I guess.
>
>
>
> From: Luigi Ballabio [mailto:[hidden email]]
> Sent: Tuesday, March 20, 2012 1:47 PM
> To: Seyfullah ÇETİN
> Cc: [hidden email]
> Subject: Re: [Quantlib-users] CPIbond
>
>
>
> 2012/3/16 Seyfullah ÇETİN <[hidden email]>
>
> I haven't seen many examples of CPIBond usage. There is only one in test
> suite which is used for CPI Swap constintency. I tried to use some parts
of

> that code chunk to create a CPIbond and access its methods. I can get some
> of them but for example, I can not access cleanprice(), it throws an
> exception. Is CPIbond a useable class or just still under construction?
>
>
> It should be usable.  What is the message of the exception? Setting up the
> inflation curves might be tricky.
>
> Luigi
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

CodeSample.cpp (11K) Download Attachment