I am a very experienced programmer in fortran, but I know very little of objected oriented programming.To help me to get started using QuantLib, could someone post or send to me ([hidden email]) a simple example of yield calculation of a fixed rate coupon bond? I was told to look at the "test suite" but I am so new to all this, including QuantLib, that this advice did not help me much. I need a complete code such as the "ConvertibleBonds.cpp", which comes in the QuantLib package. That is, a code in which I just have to compile and run. Of course, I would also appreciate receiving other examples of code, but the one mentioned above would already be very helpful. Thanks!
Maria Vieira ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
On Aug 17, 2008, at 3:47 AM, maria vieira wrote: > I am a very experienced programmer in fortran, but I know very > little of objected oriented programming.To help me to get started > using QuantLib, could someone post or send to me > ([hidden email]) a simple example of yield calculation of a > fixed rate coupon bond? I was told to look at the "test suite" but I > am so new to all this, including QuantLib, that this advice did not > help me much. I need a complete code such as the > "ConvertibleBonds.cpp", which comes in the QuantLib package. That > is, a code in which I just have to compile and run. Of course, I > would also appreciate receiving other examples of code, but the one > mentioned above would already be very helpful. Thanks! A quick note: if anyone wants to write a bond example, post it here--- I'll be happy to include it in next release. Thanks, Luigi P.S. Maria: in the meantime, you can start looking at the file test- suite/bonds.cpp. It cannot be compiled as it is, but chances are that you can can take any of the functions in there, copy it in a separate file, rename it as main() and obtain a running program. (You'll probably have to remove the BOOST_ERROR function calls, too.) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Dear Luigi, quantlib-users,
I'm currently in the process of writing such a sample (it's almost over in fact). I'm still having small discrepancies between direct calculations of the prices and yields, and the results of yield to price/price to yield computations. I'm going to investigate them as soon as I have some time. By the way I enclosed the code I wrote to this e-mail (as well as the result of its execution). It gives a good idea on how Maria could compute the yield of her bond. If someone has some remarks regarding the quality or the completeness of my sample, do not hesitate to tell me. Just to add that my code compiles against Quantlib 0.9.6 Thanks, Florent 2008/8/18 Luigi Ballabio <[hidden email]>
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
On Tue, 2008-08-19 at 11:23 +0200, Florent Grenier wrote:
> I'm currently in the process of writing such a sample (it's almost > over in fact). I'm still having small discrepancies between direct > calculations of the prices and yields, and the results of yield to > price/price to yield computations. I'm going to investigate them as > soon as I have some time. Thanks, Florent. It was sorely missed. I'll look at your code as soon as I get some time. Luigi -- fix, n.,v. What one does when a problem has been reported too many times to be ignored. -- the Jargon file ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
In reply to this post by Florent Grenier
Hi Florent
your settlement days are 3, but fixing days are 2. If you make both 3, you will get same results in your floater check Thanks Adam
|
Hi Adam,
Thanks you indeed it was the reason :) I send you the corrected code. Thanks, Florent 2008/8/25 adam99 <[hidden email]>
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev bond.cpp (21K) Download Attachment |
On Aug 27, 2008, at 7:21 PM, Florent Grenier wrote: > I send you the corrected code. Florent, I see that you're using a depo-swap curve for forecasting LIBOR fixings and for dscounting. If you have time to do so, and if you think that it makes sense, it might be interesting to use a bond curve for discounting instead; you can build one with a few FixedRateBondHelpers. Other than that, the example looks ok. I'll add it to the library when you think it's finalized. Thanks, Luigi ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Hi Luigi,
Yes good idea, I'll do it as soon as I can. Just a small question: do you already know when the next release will take place? I would like to bring my modifications to the example before that release. Thanks, Florent 2008/8/27 Luigi Ballabio <[hidden email]>
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
On Aug 28, 2008, at 11:14 AM, Florent Grenier wrote: > Yes good idea, I'll do it as soon as I can. Just a small question: > do you already know when the next release will take place? I would > like to bring my modifications to the example before that release. I'd like to finalize the release by the end of September (see the mail i just posted to QuantLib-users for details.) Luigi ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |