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.


Construct interest-rate curve object from dates and data


CurveObj = IRDataCurve(Type,Settle,Dates,Data)
CurveObj = IRDataCurve(Type,Settle,Dates,Data,Name,Value)



Type of interest-rate curve. Acceptable values are forward, zero, or discount.


Scalar for the Settle date of the curve.


Dates corresponding to rate data.


Interest-rate data for the curve object.


(Optional) Scalar that sets the compounding frequency per year for the IRDataCurve object:

  • −1 = Continuous compounding

  • 0 = Simple interest (no compounding) for “zero” and “discount” curve types only, not supported for “forward” curves

  • 1 = Annual compounding

  • 2 = Semiannual compounding (default)

  • 3 = Compounding three times per year

  • 4 = Quarterly compounding

  • 6 = Bimonthly compounding

  • 12 = Monthly compounding


Simple interest can be specified for an instrument by specifying the Compounding value as 0 and is supported for “zero” and “discount” curve types only (not supported for “forward” curves).


(Optional) Day-count basis of the interest-rate curve. A scalar of integers.

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

  • 13 = BUS/252

For more information, see basis.


(Optional) Values are:

  • 'linear' — Linear interpolation (default).

  • 'constant' — Piecewise constant interpolation.

  • 'pchip' — Piecewise cubic Hermite interpolation.

  • 'spline' — Cubic spline interpolation.


CurveObj = IRDataCurve(Type,Settle,Dates,Data,Name,Value) constructs an interest-rate curve with the specified Dates and Data. You must enter the optional arguments for Basis, Compounding, and InterpMethod as comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Alternatively, an IRDataCurve object can be bootstrapped from market data using the bootstrap method.

After an IRDataCurve curve object is constructed, you can use the following methods to determine the forward rates, zero rates, and discount factors. In addition, you can use the toRateSpec method to convert the interest-rate curve object to a RateSpec structure.


Returns forward rates for input dates.


Returns zero rates for input dates.


Returns discount factors for input dates.


Returns par yields for input dates.


Converts to be a RateSpec object; this structure is identical to the RateSpec produced by the Financial Instruments Toolbox™ function intenvset.


Bootstraps an interest rate curve from market data.


CurveSettle = datenum('2-Mar-2016');
Data = [2.09 2.47 2.71 3.12 3.43 3.85 4.57 4.58]/100;
Dates = datemnth(CurveSettle,12*[1 2 3 5 7 10 20 30]);
irdc = IRDataCurve('Zero',CurveSettle,Dates,Data)
irdc = 

			 Type: Zero
		   Settle: 736391 (02-Mar-2016)
	  Compounding: 2
			Basis: 0 (actual/actual)
	 InterpMethod: linear
			Dates: [8x1 double]
			 Data: [8x1 double]

Introduced in R2008b