Documentation

liborfloat2fixed

Compute par fixed-rate of swap given 3-month LIBOR data

Description

example

[FixedSpec,ForwardDates,ForwardRates] = liborfloat2fixed(ThreeMonthRates,Settle,Tenor) computes forward rates, dates, and the swap fixed rate.

Note

The liborfloat2fixed function assumes that floating-rate observations occur quarterly on the third Wednesday of a delivery month. The first delivery month is the month of the first third Wednesday after Settle. Floating-side payments occur on the third-month anniversaries of observation dates. Fixed payments start on the same date as the first floating payment, and recur on the same date as the first-coupon date (on anniversary months).

example

Price = liborprice(___,StartDate,Interpolation,ConvexAdj,RateParam,InArrears,Sigma,FixedCompound,FixedBasis) specifies options using one or more optional arguments in addition to the input arguments in the previous syntax.

Examples

collapse all

This example shows how to compute the par fixed-rate of a swap given 3-month LIBOR data. Use the supplied EDdata.xls file as input to a liborfloat2fixed computation.

[EDFutData, textdata] = xlsread('EDdata.xls');
Settle                = datenum('15-Oct-2002');
Tenor                 = 2;

[FixedSpec, ForwardDates, ForwardRates] =...
liborfloat2fixed(EDFutData(:,1:3), Settle, Tenor)
FixedSpec = struct with fields:
Coupon: 0.0222
Settle: '16-Oct-2002'
Maturity: '16-Oct-2004'
Period: 4
Basis: 1

ForwardDates = 8×1

731505
731596
731687
731778
731869
731967
732058
732149

ForwardRates = 8×1

0.0177
0.0166
0.0170
0.0188
0.0214
0.0248
0.0279
0.0305

Input Arguments

collapse all

Three-month Eurodollar futures data or forward rate agreement data, specified as an N-by-3 matrix in the form of [month year IMMQuote]. A forward rate agreement stipulates that a certain interest rate applies to a certain principal amount for a given future time period. The floating rate is assumed to compound quarterly and to accrue on an actual/360 basis.

Data Types: double

Settlement date of fixed-rate of swap, specified as a scalar numeric using serial date numbers.

Data Types: double

Life of the swap contract, specified as a scalar integer.

Data Types: double

(Optional) Reference date for valuation of forward swap, specified as a scalar numeric using serial date numbers. This in effect allows forward swap valuation.

Data Types: double

(Optional) Interpolation method to determine applicable forward rate for months when no Eurodollar data is available, specified as a scalar numeric with values of:

• 0 is 'nearest'

• 1 is 'linear'

• 2 is 'cubic'

.

Data Types: double

(Optional) Indicates whether futures/forward convexity adjustment is required, specified as a scalar logical. Use ConvexAdj for forward rate adjustments when those rates are taken from Eurodollar futures data.

Data Types: logical

(Optional) Short-rate model's parameters (Hull-White), specified a 1-by-2 vector to denote the parameters [a S], where the short-rate process is:
$dr=\left[\theta \left(t\right)-ar\right]dt+Sdz.$

Data Types: double

(Optional) Indicates whether the swap is in arrears, specified as a scalar logical.

Data Types: logical

(Optional) Overall annual volatility of caplets, specified as a scalar numeric.

Data Types: double

(Optional) Compounding or frequency of payment on the fixed side, specified as a scalar numeric with one of the following possible values:

• 1 is annual

• 2 is semiannual

• 4 is quarterly

• 12 is monthly

Data Types: double

(Optional) Basis of the fixed side, specified as a scalar numeric using one of the supported values:.

• 0 = actual/actual (default)

• 1 = 30/360 (SIA)

• 2 = actual/360

• 3 = actual/365

• 4 = 30/360 (BMA)

• 5 = 30/360 (ISDA)

• 6 = 30/360 (European)

• 7 = actual/365 (Japanese)

• 8 = actual/actual (ICMA)

• 9 = actual/360 (ICMA)

• 10 = actual/365 (ICMA)

• 11 = 30/360E (ICMA)

• 12 = actual/365 (ISDA)

Data Types: double

Output Arguments

collapse all

Structure of the fixed-rate side of the swap, returned as a structure with the following fields:

• Coupon: Par-swap rate

• Settle: Start date

• Maturity: End date

• Period: Frequency of payment

• Basis: Accrual basis

Dates corresponding to ForwardRates, returned as serial date numbers. All of the dates are third Wednesdays of the month, spread three months apart. The first element is the third Wednesday immediately after Settle.

Forward rates corresponding to the forward dates, quarterly compounded, and on the actual/360 basis, returned as numeric decimal values.