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.
------------------------------------------------------------------------------ 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 |
2012/3/16 Seyfullah ÇETİN <[hidden email]>
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 |
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 > 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 |
Free forum by Nabble | Edit this page |