From: Ferdinando Ametrano <ferdinando@am...>  20020619 17:07:51

Hi Jens you wrote: >I take the swapvaluation example and assume: > > termstructure with constant 4% rates > 2 year swap, 4% fixed rate, spread 0.0 > >and get the following results: > > *** 2Y swap at 4.00% > *** using constant 4% structure: > 2Y 4.00% NPV: 2346.70 > 2Y 4.00% fair spread: 0.1228% > 2Y fair fixed rate: 3.8760% > >Can somebody explain that to me? I'm sorry I cannot double check your example right now, but you might be paying too little attention to the daycount and compounding conventions. The 4% rate of a QuantLib term structure is continuos compounding: discount(t)=QL_EXP(0.04*t) and the time is measured with the daycount you provided as input (usually something smooth as act/365, not 30/360) The 4% fixed rate of a 2 year swap is simple compounding: cashflow=0.04*Nominal*t, and the time is measured with the daycount you provided as input (usually 30/360) This could easily account for the numerical results you provided. It would be different if you bootstrapped a term structure with a 2 year swap, 4% fixed rate and then the bootstrapped yield curve wouldn't reprice the same swap at 4%. This would be a real problem. Hope this helps. If not, please let me know and I'll go into the actual calculations ciao  Nando 