On 2004.07.22 19:35,
[hidden email] wrote:
> I have been trying to price forward starting swaps.
> I obtain accurate values when I express the length of the desired
> forward period in years or in months, I always obtain highly
> overpriced values when I express it in days.
> Here is the relevant code :
>
> SimpleSwap myswap(payfixedrate, calendar.advance(SettlementDate,j,
> Days, ModifiedFollowing), i, Years, calendar, roll, nominal,
> fixedlegfreq, fixedrate,fixedlegisadjusted, fixedlegdc,
> floatinglegfreq, euriborindex, fixingdays, spread,
> discountingtermstructure);
>
> (where i is the year and j is the forwardlife in days);
Karim,
calendar.advance(date,n,Days) advances the date of n _business_
days according to the calendar--e.g., if you use n = 365, you don't get
a year but rather more than one and a half year. You can try using
calendar.roll(date.plus(n,Days)) instead.
Later,
Luigi