This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Price swap given swap rate


Price = liborprice(ThreeMonthRates,Settle,Tenor,SwapRate,StartDate,Interpolation,ConvexAdj,RateParam,InArrears,Sigma,FixedCompound,FixedBasis)



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


Settlement date of swap. Scalar.


Life of the swap. Scalar.


Swap rate in decimal.


(Optional) Scalar value to denote reference date for valuation of (forward) swap. This in effect allows forward swap valuation. Default = Settle.


(Optional) Interpolation method to determine applicable forward rate for months when no Eurodollar data is available. Default is 'linear' or 1. Other possible values are 'Nearest' or 0, and 'Cubic' or 2.


(Optional) Default = 0 (off). 1 = on. Denotes whether futures/forward convexity adjustment is required. Pertains to forward rate adjustments when those rates are taken from Eurodollar futures data.


(Optional) Short-rate model's parameters (Hull-White) [a S], where the short-rate process is:

Default = [0.05 0.015].


(Optional) Default = 0 (off). Set to 1 for on. If on, the routine does an automatic convexity adjustment to forward rates.


(Optional) Overall annual volatility of caplets.


(Optional) Scalar value. Compounding or frequency of payment on the fixed side. Also, the reset frequency. Default = 4 (quarterly). Other values are 1, 2, and 12.


(Optional) Scalar value. Basis of the fixed side.

  • 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)

For more information, see basis.


Price = liborprice(ThreeMonthRates,Settle,Tenor,SwapRate,StartDate,Interpolation,ConvexAdj,RateParam,InArrears,Sigma,FixedCompound,FixedBasis) computes the price per $100 notional value of a swap given the swap rate. A positive result indicates that fixed side is more valuable than the floating side.

Price is the present value of the difference between floating and fixed-rate sides of the swap per $100 notional.


collapse all

This example shows that a swap paying the par swap rate has a value of 0.

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

% compute the fixed rate from the Eurodollar data
FixedSpec = 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

% compute the price of a par swap
Price = liborprice(EDFutData(:,1:3), Settle, Tenor, FixedSpec.Coupon)
Price = 2.7756e-15

Price is effectively equal to 0.

Introduced before R2006a

Was this topic helpful?