Go To Documentation Main IndexMain Index
Go To TIPS, Inc.TIPS Home
ok_bond_MDYs

ok_bond_MDYs (routine)

Validate all dates associated with bonds

Introduced in release: 1.0
Component: Generic
Purpose: Validates the given dates needed for the bond calculations. Checks that settlement date, dated/issue date, first coupon date, and maturity date are valid dates. If optional dates are not provided it creates them. It also checks the following relationships between the dates:

 Dated/issue date is optional.
 First coupon date not allowed if dated/issue date is not given.
 First coupon date is optional unless dated/issue date creates an
   odd first coupon.
 Settlement date is greater than or equal to dated/issue date.
 Settlement date is less than maturity date.
 Dated/issue date is less than first coupon date.
 Dated/issue date is less than maturity date.
 First coupon date and maturity date are in sync - no odd last coupon.

Results: The value of the function is true (1) if the dates are valid. The value of the function is false (0) if the dates are invalid. The variable status will contain the reason it is invalid.

Error Conditions: The variable status contains a non zero value upon returning from the function when the inputs contain an error. Where x and y are single digits representing different dates as follows:

 1 = maturity date
 2 = dated/issue date
 3 = first coupon date
 7 = settlement date
The errors are:

 110x = bad year in date
 120x = bad month in date
 130x = bad day in date
 150x = required date not given
 20xy = date x is not less than date y
 21xy = date x is not less than or equal to y
 22xy = date x is not in sync with date y

Last Mod Date: 10/24/1994© 2001 TIPS, Inc.Doc Version: 5.0