Hi,
In the swapvaluation.cpp, I added a par rate calculation after the creation of the depoSwapTermStructure: i.e. boost::shared_ptr<YieldTermStructure> depoSwapTermStructure(new PiecewiseFlatForward(settlementDate, depoSwapInstruments, termStructureDayCounter, tolerance)); Rate tr = depoSwapTermStructure->parRate(10, settlementDate); ------------------------------------------------------- the 10 year swap rate is 5.165% ( Rate s10yQuote=0.05165;) but the value returned by parRate is 5.16517962147765% The difference is too small to be explained by a daycount convention or fixingDays offset, but it exists nonetheless and i can't seem to figure out why. Could someone please explain why this discrepancy exists, how to fix it and if not, how to explain it away? I know it is in the 6th/7th decimal place, but the numbers lose their credibility for some people if they don't tie exactly to the numbers in the yield curve inputs. Anyone have any ideas? thanks and regards Sid __________________________________________________________ How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos http://in.photos.yahoo.com |
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 |
Luigi Ballabio wrote:
> the parRate method is just an approximation---it doesn't take into > account all market conventions for swaps--- the par rate is like a zero rate or a discount factor: all of them are formulae/definitions that express the current (today) value of future payment(s). As such none of them mind about any market convention at all. > as a matter of fact I've > a mind to remove it from the YieldTermStructure interface. I would not. It might be stressed in a better way that the par rate is not a swap rate, but the par rate has its own right to exist. > 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. Yeah! ciao -- Nando |
On 07/18/2005 03:13:28 PM, Ferdinando Ametrano wrote:
>> the parRate method is just an approximation---it doesn't take >> into account all market conventions for swaps--- > > the par rate is like a zero rate or a discount factor: all of them > are formulae/definitions that express the current (today) value of > future payment(s). As such none of them mind about any market > convention at all. I beg to differ. There are conventions determining _what_ future payments should be considered when calculating the par rate. The fact that the method "doesn't mind" only means that you hard-coded them in the current implementation---for instance, fixed-rate payments are considered to have annual frequency, which is true here in Europe but, I'm told, false on the other side of the Atlantic. >> as a matter of fact I've a mind to remove it from the >> YieldTermStructure interface. > > I would not. It might be stressed in a better way that the par rate > is not a swap rate... Even though the documentation in the code says otherwise > ...but the par rate has its own right to exist. Defined as what? Later, Luigi ---------------------------------------- This gubblick contains many nonsklarkish English flutzpahs, but the overall pluggandisp can be glorked from context. -- David Moser |
Free forum by Nabble | Edit this page |