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

ok_ofsl_in (routine)

Validate all inputs associated with odd 1st, 2nd, last period bonds

Introduced in release: 1.2
Component: Generic
Purpose: Validates all the given values needed for the odd 1st, 2nd, last period bond calculations.

Results: The value of the function is true (1) if the inputs are valid. The value of the function is false (0) if the inputs 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. The errors are:

  500 = invalid day_type
  600 = invalid cpn_freq
 4001 = given yield is less than or equal to zero
 4002 = given price is less than or equal to zero
 4100 = coupon rate is less than zero
 4200 = redemption value is less than zero
 4301 = income tax rate less than zero or greater than 100
 4302 = capital gains tax rate less than zero or greater than 100
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 date 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 not in sync with date y

Last Mod Date: 12/14/1995© 2001 TIPS, Inc.Doc Version: 5.0