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.


Time and frequency from dates


[Times, F] = date2time(Settle, Dates, Compounding, Basis,



Settlement date. A vector of serial date numbers or date character vectors.


Vector of dates corresponding to the compounding value.


(Optional) Scalar value representing the rate at which the input zero rates were compounded when annualized. This argument determines the formula for the discount factors:

Compounding = 1, 2, 3, 4, 6, 12 (Default = 2.)

Disc = (1 + Z/F)^(-T), where F is the compounding frequency, Z is the zero rate, and T is the time in periodic units; for example, T = F is one year.

Compounding = 365

Disc = (1 + Z/F)^(-T), where F is the number of days in the basis year and T is a number of days elapsed computed by basis.

Compounding = −1

Disc = exp(-T*Z), where T is time in years.


(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.


(Optional) End-of-month rule. A vector. This rule applies only when Maturity is an end-of-month date for a month having 30 or fewer days. 0 = ignore rule, meaning that a bond's coupon payment date is always the same numerical day of the month. 1 = set rule on (default), meaning that a bond's coupon payment date is always the last actual day of the month.


[Times, F] = date2time(Settle, Dates, Compounding, Basis,
computes time factors appropriate to compounded rate quotes beyond the settlement date.

Times is a vector of time factors.

F is a scalar of related compounding frequencies.

    Note   To obtain accurate results from this function, the Basis and Dates arguments must be consistent. If the Dates argument contains months that have 31 days, Basis must be one of the values that allow months to contain more than 30 days; for example, Basis = 0, 3, or 7.

date2time is the inverse of time2date.

Introduced before R2006a

Was this topic helpful?