floatingratebond pricing

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

floatingratebond pricing

hudsoncity
I am trying to figure out the function that calculates the price for floatingratebond. I have server questions:
  1. It seems that FloatingRateBond inherits the dirtyprice and cleanprice from the BOND class. Basically the FloatingRateBond and FixedRateBond classes share the same pricer?
  2. The reason I want to find out the exact pricer used by the FloatingRateBond is that I don't think QuantLib addresses the discount margin in the formula, by examinging its constructor. I want to incorporate the discount margin in the pricing formula if the QuantLib fails to include it
  3. In general, it takes time to find the exact function in the QuantLib because of layers upon layers of template and inheritance. What is the best way for me to maneuver in case I know what I am looking for, such as pricing formula for the floating rate note?
Regards,
Song

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: floatingratebond pricing

Luigi Ballabio
Song,
    (1) fixed-rate bonds and floating-rate bonds share the same pricer
in the sense that both are priced (by means of the
DiscountingBondEngine class, see below) by discounting their coupon
amounts to their settlement date. The difference is in the coupons,
which of course return different amounts based on whether they are
fixed or floating; to get at those formulas, you'll have to look at
the FixedRateCoupon and IborCoupon classes.
    (2) bond constructors don't take a discount curve, because that's
passed to their pricing engine instead (usually,
DiscountingBondEngine).
    (3) one way to look for functionality is to start from the test
suite and see how things are instantiated and used.  For a general
view of the architecture, which might help you make more sense of the
code, see my draft at
<http://sites.google.com/site/luigiballabio/qlbook>. In particular,
chapter 2 explains the instrument / pricing engine separation, and
chapter 4 describes (among other things) bond pricing.

Hope this helps,
    Luigi


On Tue, Jun 4, 2013 at 10:23 PM, song xu <[hidden email]> wrote:

> I am trying to figure out the function that calculates the price for
> floatingratebond. I have server questions:
>
> It seems that FloatingRateBond inherits the dirtyprice and cleanprice from
> the BOND class. Basically the FloatingRateBond and FixedRateBond classes
> share the same pricer?
> The reason I want to find out the exact pricer used by the FloatingRateBond
> is that I don't think QuantLib addresses the discount margin in the formula,
> by examinging its constructor. I want to incorporate the discount margin in
> the pricing formula if the QuantLib fails to include it
> In general, it takes time to find the exact function in the QuantLib because
> of layers upon layers of template and inheritance. What is the best way for
> me to maneuver in case I know what I am looking for, such as pricing formula
> for the floating rate note?
>
> Regards,
> Song
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users