Posted by
Luigi Ballabio on
Jul 28, 2009; 9:24am
URL: http://quantlib.414.s1.nabble.com/IborIndex-and-valuation-of-swaps-tp7810p7812.html
On Wed, 2009-07-15 at 00:42 -0700, dhoorens wrote:
> Actually my question is more general
> Suppose I have to price a swap at 31/12/2008
> The only informations I have are the yieldCurve at 31/12/2008 and the
> characteristics of the swap (notional, fixrate, index followed by floating
> leg, maturity (frequencies of both legs are annual))
>
> How can be the floating rate used for next coupon be determined by these
> informations?
> My idea was "it must be an input".. but i"m not sure
If the floating coupon already started, you're right---it's an input,
since it can't be retrieved from today's curve. From your previous
mail, I see you already figured that it should be stored with the
Index::addFixing method. To get the correct date, I'd do something like:
boost::shared_ptr<CashFlow> currentCoupon = ...;
boost::shared_ptr<FloatingRateCoupon> flt =
boost::dynamic_pointer_cast<FloatingRateCoupon>(currentCoupon);
iborIndex->addFixing(flt->fixingDate(), ...);
Luigi
--
A programming language is low-level when its programs require attention
to the irrelevant.
-- Alan Perlis
------------------------------------------------------------------------------
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