A quick answer to FixedCouponBond

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

A quick answer to FixedCouponBond

Jeffrey-J.Yu
>>Hello, I found QuantLib on the net and thought I would give it a try to do some bond related stuff - it"s a great project! It"s a bit difficult to get started though - I didn"t find any sample code involving bond stuff - any pointers? I have a specific question regarding the FixedCouponBond class, maybe someone can help me with this: I have some bonds that do not pay a coupon on maturity (only the principal). Specifically, I have date for the first coupon paid, and a date for the last coupon paid (which might be different from maturity). Am I correct in assuming that I cannot replicate this with the FixedCouponBond class? I had a poke around in the code, and it looks as if I might want to make a new class were I replace the coupon rate argument in the definition of cash flows with a vector that is set to zero after my last (and before my first) interest date (and equal to the coupon rate at the other dates). Would that work? Thanks, Max

Max,

I am unable to get your email address as it is not shown from the archive.  So I reply this to the whole group, hope it's ok.

The key characteristic of FixedCouponBond is to use Schedule and CashFlow to save the coupon dates/coupon payments into a vector, and assuming the coupon would be paid regularly.

In your case, I am not sure if the frequency is fixed.  Before we come up a business object for the type of instrument of your concern, you can always use the Schedule object and CashFlow object to generate the cash flow, manipulate it as you see fit, then discount them ....

The present value calculated by FixedCouponBond for Government securities are as good as you can see on Blooomberg.  However, you should include the proper credit spread otherwise.

Hope this helps,

Jeff

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.