PiecewiseFlatForward : day to day swap princing problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PiecewiseFlatForward : day to day swap princing problem

K.LAMINE

Hi all,

I have been trying to price forward starting swaps using the PiecewiseFlatForward function from Quantlib, as shown in the example program(swapvaluation)  which comes along.
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);

Everything else is the same as in the example program.

The values which I obtain using myswap.fairRate() are significantly different from what I get when I specify the forwardlife in years or months.

Would any of you have any Idea ?

Thanks,

Karim Lamine

Reply | Threaded
Open this post in threaded view
|

Re: PiecewiseFlatForward : day to day swap princing problem

Luigi Ballabio-2
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