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

ok_ofsl_dwm (routine)

Validate all dates associated with odd 1st, 2nd, last period bonds (coupon periods specified by day of week, week of month

Introduced in release: 1.3
Component: Generic
Purpose: Validates the given dates needed for the odd 1srt, 2nd, last period bond calculations with payment dates specified by day of week and week of month. Checks that settlement date, dated/issue date, first coupon date, second coupon date, last 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:

 Last coupon date is less than maturity date.
 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.
 Second coupon date not allowed if first date is not given.
 Second coupon date is optional unless first date creates an
   odd second 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.
 First coupon date is less than second coupon date.
 Dated/issue date is less than maturity date.
 Second coupon date and last coupon date are in sync.  If last coupon
   date is not given, it will be one period less than maturity date.

Alternatives: If the coupon dates are specified by a payment date and a coupon frequency only the use ok_ofsl_MDYs.

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
 6 = last 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 date y
 22xy = date x is not in sync with date y

Last Mod Date: 01/21/1997© 2001 TIPS, Inc.Doc Version: 5.0