Financial Derivatives Toolbox    
date2time

Fixed income time and frequency from dates

Syntax

Arguments

Settle
Settlement date. A vector of serial date numbers or date strings. Settle must be earlier than or equal to Maturity.
Maturity
Maturity date. A vector of serial date numbers or date strings.
Compounding
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
Disc = (1 + Z/F)^(-T), where F is the compounding frequency, Z is the zero rate, and T is the time in periodic units, e.g. 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.
Basis
(Optional) Day-count basis of the bond. A vector of integers.
0 = actual/actual (default), 1 = 30/360, 2 = actual/360,
3 = actual/365.
EndMonthRule
(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.

Description

[Times, F] = date2time(Settle, Dates, Compounding, Basis, EndMonthRule) computes time factors appropriate to compounded rate quotes between Settle and Maturity dates.

Times is a vector of time factors.

F is a scalar of related compounding frequencies.

See Also

cftimes in the Financial Toolbox User's Guide

disc2rate, rate2disc


  classfin datedisp