Main Content

tmfactor

Time factors of arbitrary dates

Description

TMFactors = tmfactor(Settle,Maturity) determines the time factors from a vector of Settlement dates to a vector of Maturity dates.

example

Examples

collapse all

Find the TFactors for Settle and Maturity dates.

TFactors = tmfactor('1-Jan-2015','1-Jan-2016')
TFactors = 
2

Find the TFactors for Settle and Maturity dates using a datetimes.

TFactors = tmfactor(datetime(2015,1,1),datetime(2016,1,1))
TFactors = 
2

Input Arguments

collapse all

Settlement date, specified as a scalar or a NINST-by-1 vector using a datetime array, string array, or date character vectors.

Note

Settle must be earlier than Maturity.

To support existing code, tmfactor also accepts serial date numbers as inputs, but they are not recommended.

Data Types: char | string | datetime

Maturity date, specified as a scalar or a NINST-by-1 vector using a datetime array, string array, or date character vectors.

Data Types: char | string | datetime

Output Arguments

collapse all

Time factors from a vector of Settle dates to a vector of Maturity dates, returned as a scalar numeric.

Version History

Introduced before R2006a

expand all