Swap valuations

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

Swap valuations

dhoorens
Hi
Simple and fast question

In Hull Ed. 5 section 6.4 : Valuation of IRS, I can find the formula giving the value of a IRS
Vswap = Bfix - Bfloating
where
   Bfix is the value of the fixedratebond (fixedLeg) and
   Bfloating is (L+k*) exp(-r1*t1)
with
   L= notional, k* = fltRate, r1 = Libor zero rate at time t1, t1 next payment date

Can i find this formula coded somewhere in the pricingEngines section of QuantLib?
Tks
David

Reply | Threaded
Open this post in threaded view
|

Re: Swap valuations

Luigi Ballabio
On Tue, 2009-07-14 at 05:53 -0700, dhoorens wrote:

> In Hull Ed. 5 section 6.4 : Valuation of IRS, I can find the formula giving
> the value of a IRS
> Vswap = Bfix - Bfloating
> where
>    Bfix is the value of the fixedratebond (fixedLeg) and
>    Bfloating is (L+k*) exp(-r1*t1)
> with
>    L= notional, k* = fltRate, r1 = Libor zero rate at time t1, t1 next
> payment date
>
> Can i find this formula coded somewhere in the pricingEngines section of
> QuantLib?

Not really. The above is the simplified formula assuming par coupons.
DiscountingSwapEngine does the same, but also adds up future floating
coupons (which are not in the formula, as they're assumed to add up to
100 (discounted, of course) and cancel out with the redemption of the
fixed-rate bond.)

Luigi


--

Testing can never demonstrate the absence of errors in software, only
their presence.
-- W.E. Dijkstra



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users