Re: TermStructure question.
Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/TermStructure-question-tp3917p3918.html
On 07/18/2005 12:17:39 PM, Siddharth Sharma wrote:
> In the swapvaluation.cpp, I added a par rate
> calculation after the creation of the
> depoSwapTermStructure
>
> the 10 year swap rate is 5.165% ( Rate
> s10yQuote=0.05165;) but the value returned by
> parRate is 5.16517962147765%
Sid,
the parRate method is just an approximation---it doesn't take
into account all market conventions for swaps---and as a matter of fact
I've a mind to remove it from the YieldTermStructure interface. The
right way to evaluate the par rate is to instantiate a SimpleSwap and
call its fairRate() method, as is done later in the example.
Later,
Luigi
----------------------------------------
I have yet to see any problem, however complicated, which, when you
looked at it in the right way, did not become still more complicated.
-- Poul Anderson