Main Index |
TIPS Home |
ok_disc_inok_disc_in (routine)
Validate all inputs associated with discount securities
Introduced in release: 1.0
Component: Generic
Purpose:
Validates all the given values needed for the discount calculations.
Results:
The value of the function is true (1) if all the values are valid. The value of the function is false (0) if any of the values 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:
200 = invalid given_flag
500 = invalid day_type
4001 = given yield is less than or equal to zero
4002 = given price is less than or equal to zero
4003 = given discount rate is less than or equal to zero
4004 = given coupon equivalent yield is less than or equal to zero
4005 = given bond equivalent yield is less than or equal to 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
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
21xy = date x is not less than or equal to y
| Last Mod Date: 03/01/1990 | © 2001 TIPS, Inc. | Doc Version: 5.0 |