<< interest Financial module markowitz >>

Financial module >> Financial module > irs

irs

For a fix-for-floating Interest Rate Swap compute both the spread and the value of the legs.

SYNOPSIS

[spread,leg]=irs(time,months,r,setting);

Description

The function computes both the spread (i.e. the fixed payment) and the value of the legs for an Interest Rate Swap. The function can take into account both "in advance" and "in arrears" IRS.

Parameters

time
the subscribing date of the IRS; it must be in the form [year month day]
months
number of months between each payment (more common are 3 or 6)
r
column vector containing the relevant spot rates
setting
this variable must be zero (0) for "in advance" IRS and one (1) for "in arrears" IRS

Output

spread
fix payment of the IRS
leg
value of both legs of the IRS

Example

Let as assume that 12th May 2010 an annual swap is subscribed (with 3-month payments).We first set the relevant interest rates (for one year swap with 3-month payments the interest rates must be four):

-->r=[0.00652 0.00956 0.01091 0.01216]';

Now we can use the function. For an "in advance" IRS we have

-->[spread,leg]=irs([2010 5 12],3,r,0)

leg = 0.0121787

spread = 0.0120930

Thus we have to pay 1.2% in exchange of the floating interest rate.

In the case of an "in arrears" IRS the last

-->[spread,leg]=irs([2010 5 12],3,r,1)

leg = 0.0106842

spread = 0.0140050

The spread is higher since we eliminate the first interest rate with an increasing curve.

Authors

Francesco Menoncin - Brescia University - 2010

See Also


<< interest Financial module markowitz >>