This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Price cash flows from set of zero curves


Price = cfbyzero(RateSpec, CFlowAmounts, CFlowDates, Settle,



Structure containing the properties of an interest-rate structure. See intenvset for information on creating RateSpec.


Number of instruments (NINST) by maximum number of cash flows (MOSTCFS) matrix with entries listing cash flow amounts corresponding to each date in CFlowDates. Each row is a list of cash flow values for one instrument. If an instrument has fewer than MOSTCFS cash flows, the end of the row is padded with NaNs.


NINST-by-MOSTCFS matrix of cash flow dates. Each entry contains the serial date of the corresponding cash flow in CFlowAmounts.


Settlement date on which the cash flows are priced. Settle must be either a scalar or NINST-by-1 vector of serial date numbers or date character vectors of the same value which represent the settlement date for each cash flow. Settle must be earlier than Maturity.


(Optional) Day-count basis of the instrument. A vector 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.


Price = cfbyzero(RateSpec, CFlowAmounts, CFlowDates, Settle,
computes Price, an NINST-by-NUMCURVES matrix of cash flows prices. Each column arises from one of the zero curves.


collapse all

This example shows how to price a portfolio containing two cash flow instruments paying interest annually over the four-year period from January 1, 2000 to January 1, 2004. Load the file deriv.mat, which provides ZeroRateSpec. The ZeroRateSpec structure contains the interest-rate information needed to price the instruments.

load deriv.mat
CFlowAmounts =[5 NaN 5.5 105;5 0 6 105];
CFlowDates = [730852, NaN, 731582,731947;
              730852, 731217, 731582, 731947];
Settle = 730486;
Price = cfbyzero(ZeroRateSpec, CFlowAmounts, CFlowDates, Settle)
Price =


Related Examples

Introduced before R2006a

Was this topic helpful?