KAL_II Servicing Valuation Model
Programmers' Interface Manual
DESCRIPTION: PROGRAMMERS' INTERFACE MANUAL (PIM)
This document is a summary of all features that are available to an experienced KAL_II User. We do not recommend using these features until you are comfortable with the basic modeling process.
TOPICS
1. PRINTER SETUP - We are accumulating different printer configuration strings.
2. KAL_II BATCH MODE - The program can be executed using a predefined set of files from the DOS command line.
3. SCRIPT FILES - The model will "read" a series of keystrokes from your KEY file and execute the keystrokes exactly as if you were pressing the keys. Complete sensitivity analyses can be constructed and executed with little effort on your part.
4. GRAPHICS - (There is a separate document for the graph files)
5. ASCII FILE RULES - Summary of ASCII file RULES used in the preparation of the Model output and input files.
6. ASCII INPUT FILES - A description of all ASCII input files. All portfolio assumptions and characteristics can be read from an ASCII delimited file.
7. ASCII OUTPUT FILES - A description of all ASCII output files. All data generated by the model can be sent to a DOS file. These files are easily read into a spreadsheet or database program. You can completely duplicate all reports printed by the model. The data is available to be audited or included in your own valuation modeling.
8. RBASE DATABASE DEFINITION - We are including the ARIN database definitions as part of the PIM.
1. PRINTER SETUP
1.1 PORTRAIT OR LANDSCAPE
The type of page layout depends only on your printer. There is obviously an advantage of using a longer page width and a smaller type. The IBM line printer character is a 16..66 line pitch. It allows approximately 170 characters on a line.
The courier type face allows 10 characters per inch which is 80 characters on a line.
1.2 TYPEFACE - There are several typefaces available. The best two to use are courier and line printer. There are what are called FIXED SPACE fonts. Nothing but a fixed space font will work for the reports printed by the model. There are other fixed space fonts available. If you need to use something other than courier or line print then I would recommend sending the reports to a disk file and using your own word processing program to print the reports. I use Ventura all the time and it works very well.
1.3 MARGINS - Margins are dependent on two things. First, can you printer print to the edge of the paper. Second, do you need to punch holes in the paper. A normal margin is about .5". This is 5 characters in courier and 8 characters in line print. I like line print for the HP Laser Jet.
1.4 PAGE WIDTH
The page width is totally dependent on the page layout and the typeface. Below is a table for you convenience. This table works for both the Laser Jet and the Epson
PORTRAIT LANDSCAPE
COURIER 80 100
LINEPRINT 130 170
1.5 LINE SPACING
The following is my recommended line spacing guide:
COURIER 6 lines per inch
LINE PRINT 8 lines per inch
You can go as high as 10 lines per inch if you need to save paper or want to jam the number together. It is not very attractive.
1.6 PITCH (CHARACTERS PER INCH)
This is a function of the type face.
COURIER 10 character per inch.
LINE PRINT 16.66 characters per inch
1.7 PRINTER OR DISK FILE
I generally prefer the disk file output. The model prints very well but I like to have absolute control over the printing process. I also like to include the printed results in a Ventura report. If the number happen to be wrong (Imagine that!) then I don't have to throw away reams of paper.
1.8 HP LASER JET SERIES II CONTROL CODES
This chart works well for me. If there is an error please call me and I will figure it out for you. These codes are entered exactly as shown into the printer control section in the System Environment Section of the program.
RESET 027 069
LANDSCAPE 027 038 108 049 079
PORTRAIT 027 040 115 048 084
LINES/INCH 4 LINES 027 038 108 052 068
6 LINES 027 038 108 054 068
8 027 038 108 056 068
10 027 038 108 053 067
12 027 038 108 052 068
PITCH 10 027 038 107 048 083
12 027 038 107 050 083
16.66 027 038 107 052 083
2. BATCH MODE
The model may be executed using command line parameters. Each parameter begins with a "-" and a Capital letter.
-A action_code P for Portfolio simulation
G for Group simulation
-C command_file - the name of a file that holds actual key-strokes. The "command file" is a full file-name, including any extension that you have put on it, of an ASCII file containing a sequence of key-strokes to use instead of the ones pre-programmed into the "action" choices.
-D default_file the name of a check values file to substitute for the one in PREVIOUS.USE
-E econ_file the name of an Econ file to substitute for the one in PREVIOUS.USE
-F firm_file - the name of a Firm file to substitute for the one in PREVIOUS.USE
-G group_file - the name of a group file to substitute for the one in PREVIOUS.USE
-M months - the number of months to simulate.
-P portfolio_file - the name of a portfolio file to substitute for the one in PREVIOUS.USE
-S subdirectory - The name of the default subdirectory to be used to search for all files. All files generated by the program will be sent to this subdirectory.
-T temporary - The name of a temporary disk\subdirectory to be used as a work file. The use of an electronic disk is ideal for large group files. The program will run much faster if the work disk is an electronic disk.
File Extensions
The file names do NOT have an extension, because the program knows what it should be.
3. SCRIPT FILES
Script files are ASCII files which contain ONLY a series of keystrokes that you want the model to execute. If you do not include enough key strokes to exit the model, the script file will "bomb" the execution. You must exit gracefully
PORT.KEY - a sample "*.KEY" file is attached, which does a portfolio simulation, puts in 360 months, shows the valuation, shows one page of cash flows, and exits. Non-printing characters are made with the "backlash" and three-digit number of the ASCII code.
SPECIAL KEYS
\013 CARRIAGE RETURN
\027 ESCAPE KEY
\255 WAIT 5 SECONDS AND CONTINUE
REGULAR KEYS
"PS360\013V\027\027\027Y" - This combination will cause the program to got to the portfolio simulation section, run the model for 360 months, view the value screen, and exit the model.
FUNCTION KEYS
F1 \186 HELP
F2 \187 REPLACE SNAPSHOT
F3 \188 APPEND SNAPSHOT
F7 \192 APPEND REPORTS
F9 \194 REPLACE REPORTS
ARROW KEYS
<- \202 Left Arrow
-> \196 Right Arrow
^ \207 Up Arrow
v \204 Down Arrow
4. ASCII RULES
1. The total length of the line must be under 240 bytes long.
This conforms with the Lotus specification for importing files
2. All fields should have "'s at the beginning and end. It is
not required for numeric fields but it is necessary when all the
field positions do not have the same data types.
3. All fields should be separated by commas.
4. Blank or empty fields
Blank fields should have nothing or " ".
Numeric fields may have 0's
5. GRAPHICS (See the separate graph manual)
The spreadsheet graphics manuals are located in the KALII library. The manuals are compress along with the spreadsheet programs. When you unzip the GRAPH1 and GRAPH2 files you will find the manuals
6. ASCII INPUT FILES
The following are the file extensions fro the ASCII input files:
Valuation Inputs - These files can have two distinct input formats. The format depends on how you save the file in the Change Data section.
6.1 *.ECN - Economic Data file
6.2 *.FRM - Firm data file
6.3 *.MKP - Portfolio Data file
6.4 *.GRP - Group Data File
The following files are composed of a single number per line:
6.5 *.FHA - Thirty year FHA prepayment Table
6.6 *.RTE - 360 Months Interest Rate table
6.7 *.INF - 360 Months inflation Table
6.1 The following input files use the exact same file layout:
*.ECN, *.FRM, *.MKP
1 A FLD1 Text 60 characters
2 B FLD2 Real 9 Digits with decimal point
3 C FLD3 Real 9 Digits with decimal point
4 D FLD4 Real 9 Digits with decimal point
5 E FLD5 Real 9 Digits with decimal point
6 F FLD6 Real 9 Digits with decimal point
7 G FLD7 Text 35 Characters [Description]
8 H FLD8 Integer Record Number [Index]
*.ECN - Starts with -> "$ECN$",,,,,,,,
- Ends with -> "$END$",,,,,,,,
*.FRM - Starts with -> "$FRM$",,,,,,,,
- Ends with -> "$END$",,,,,,,,
SPECIAL RULES FOR DATA INPUT FILES
-----------------------------------------------
1. Every line must have all the commas even though no data exists between the commas.
2. You must start with an available file and then alter that file. It is impossible to build a proper file from scratch.
3. Almost every line is unique. We have provided a list of what fields are on each line. Use this list to find and change variables.
4. There is a special audit program to help you check the results of your programming. KAL_II will simply halt if you have not done the programming correctly.
5. All numbers must have decimals wherever decimals currently exist.
6.4 Group File - *.GRP
The first line of the file must be -> "$GRP$"
The second line is the group file name
The data lines contain two delimited fields:
1 A FLD1 Text 1 Character
This is the combine cash flows character.
2 A FLD1 Text 8 Characters
This is the portfolio name. The portfolio must be in the default directory you set in the System Environment Section.
The last line of the file should be -> "$END$"
6.5 *.FHA - Thirty year FHA prepayment Table
Each line represent one year. There must be thirty records in this file. Each line contains the percentage of loans remaining at the end of the current year.
6.6 *.RTE - INTEREST RATE TABLE - 360 MONTHS
Each line represents one month. there must be 360 liners with an interest rate on each line. One rate per line and all 360 months must be present.
6.7 *.INF - INFLATION RATE TABLE - 360 MONTHS
Each line represents one month. there must be 360 lines with an inflation rate on each line. One rate per line and all 360 months must be present.
7. VALUE ASCII OUTPUT
The program creates ASCII files using all loan status data, financial data, cash balance data, and five year budget data.
These files are intended to be used with your spreadsheets or database processors. You can completely duplicate all the KAL_II reports and screens within your own system.
The following are the names of the ASCII output files:
7.1 *.MON - 360 months of valuation data
7.2 *.YRS - 30 year valuation data
7.3 *.BUD - 60 month planning data
7.4 *.BAL - 360 Cash balances data
7.5 *.DBT - 360 month debt repayment data
7.6 *.VAL - Predebt valuation file
7.7 *.ROE - Return on Equity valuation file
7.8 *.SCR - Default name for screen capture files
7.1 GNMAEX.MON - MONTHLY RESULTS DATA FILE
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A MON Month
2 B PROB Payoff Probability
3 C AB Average Loan Balance
4 D SF Servicing Fees
5 E LF Late Fees
6 F ANC Ancillary Income
7 G P&O Earnings on P&I
8 H IMP Earnings on Impounds
9 I SRV Servicing Cost
10 J DEL Delinquency Cost
11 K PR Payoff Cost
12 L PI Payoff Interest
13 M FOR Foreclosure Costs
14 N ADV Cost of Advances
15 O P-IMP Pay on Impounds
===============================
16 P OI Operating Income
17 Q AMRT Amortization
18 R TX Income Tax
===============================
19 S NET Net Income
20 T CSH Cash Flow
21 U TERM Accumulated Terminations
22 V PAY Total Month's Payoffs
23 W FOR Total Month's Foreclosures
24 X REM Remaining Balance (Percent of Balance)
25 Y ST GOOD-LOAN
26 Z ST DEL-1-MON
27 A ST DEL-2-MON
28 AB ST GT-90+-DAY
29 AC ST FORECLOSE
30 AD DEL Total Delinquent
31 AE LNS Loan Count
7.2 GNMAEX.YRS - YEARLY DATA FILE - *.YRS
The Yearly Data File does not have any delinquency information in the file.
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A YEAR Month
2 B PAY PR Payoff Probability
3 C EB Average Loan Balance
4 D SRV Servicing Fees
5 E LT Late Fees
6 F ANC Ancillary Income
7 G P&I Earnings on P&I
8 H IMP Earnings on Impounds
9 I SRV Servicing Cost
10 J DEL Delinquent cost
11 K P-R Payoff Cost
12 L P-I Payoff Interest
13 M FOR Foreclosure Costs
14 N ADV Cost of Advances
15 O IMP Pay on Impounds
16 P OI Operating Income
17 Q AMRT Amortization
18 R TX Income Tax
19 S NET Net Income
20 T CSH Cash Flow
21 U CT Loan Count
22 V BAL Segment Balance
7.3 GNMAEX.BUD - KAL_II Budget ASCII File
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A MON Month
2 B OI Operating Income
3 C FC Fixed Cost
4 D NI New Interest
5 E EI Existing Interest
6 F NA New Amortization
7 G EA Existing Amortization
8 H DD New Debt
9 I ED Existing Debt
7.4 GNMAEX.BAL - KAL_II Cash Balances ASCII File
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A Mon Month of the Simulation
2 B PB Prior Cash Balance
3 C RP Regular Cash Receipts
4 D DP Delinquent Cash Receipts
5 E PP Payoff Cash Receipts
6 F FP Refunds from Foreclosure
7 G OP Investor Remittances
8 H EB Ending Cash Balance
9 I AB Average Cash Balance
10 J AA Average Cash Advance
11 K MA Maximum Cash Advance
12 L TPB Real Estate Tax Prior Balance
13 M TIN Real Estate Tax Receipts
14 N TOUT Real Estate Tax Payments
15 O TREF Real Estate Tax Refunds
16 P TEB Real Estate Tax Ending Balance
17 Q IPB Insurance Prior Balance
18 R IIN Insurance Receipts
19 S IOUT Insurance Payments
20 T IREF Insurance Refunds
21 U IEB Insurance Ending Balance
22 V EPB Special Insurance Prior Balance
23 W EIN Special Insurance Receipts
24 X EOUT Special Insurance Payments
25 Y EREF Special Insurance Refunds
26 Z EEB Special Insurance Ending Balance
7.5 GNMAEX.DBT - KAL_II Debt Analysis File
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A MON Month
2 B CBAL Earn on Debt
3 C RATE Net Cash Flow
4 D BTAX Principal
5 E 1-T Interest
6 F ATAX Tax Shield
7 G SVC Cash Balance
8 H AVAIL Balance of Debt
9 I PRN Principal Repaid
10 J INT Interest on Debt
11 K TXSHLD Tax Shield
12 L CBAL Ending Cash Balance
13 M DBAL Beginning Debt Balance
14 N PRN Principal Repayment
15 O DBAL Ending Debt Balance
7.6 GNMAEX.VAL - Valuation Results File
This file is created every time you access the PreDebt valuation screen. The program automatically replaces the file with the same segment name. If the group valuation is being run the program uses the Group name as the file name and adds the *.VAL extension.
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A PNAME Portfolio Name
2 B PPREX Purchased Price Expensed
3 C PPRAM Purchased price Amortized
4 D PPRTOT Total Purchase Price
5 E CCSTEX Conversion cost Expensed
6 F CCSTAM Conversion cost Amortized
7 G CCSTTOT Conversion cost total
8 H PPEXTOT Total Purchase Price Expensed
9 I PPAMTOT Purchase Price Amortized
10 J PPTOTAL Total Purchase Price
11 K TAXRTE Tax Rate
12 L TAXSAV Tax Savings
13 M NETPUR Net Purchase Price
14 N SIMMON Months of Simulation
15 O EXPLIF Expected Loan Life
16 P PAYBAK Payback in Years
17 Q ECNDUR Economic Duration
18 R PREVAL Present Value Percent
19 S DISCRTE After Tax Discount Rate
20 T PRI%BAL Net Initial Cost as a Percent
21 U NOMIRR Nominal IRR as a Percent
22 V NETPV Net Present Value
23 W MODIRR Modified IRR
24 X BEV$ Breakeven Price in Dollars
25 Y BEV% Breakeven Price Percent
26 Z PORBAL Segment or Portfolio Balance
27 AA LOANCNT Loan Count
28 AB SERFEE Service Fees
29 AC INTRTE Interest Rate
30 AD MATMON Maturity in Months
7.7 GNMAEX.ROE - Equity Valuation Results File
This file is created every time you access the Return on Equity valuation screen. The program automatically replaces the file with the same segment name. If the group valuation is being run the program uses the Group name as the file name and adds the *.VAL extension.
COLUMN NAME DESCRIPTION
------- ----- ---------------------
1 A PNAME Portfolio Name
2 B PPREX Purchased Price Expensed
3 C PPRAM Purchased price Amortized
4 D PPRTOT Total Purchase Price
5 E CCSTEX Conversion Cost Expensed
6 F CCSTAM Conversion Cost Amortized
7 G CCSTTOT Conversion Cost Total
8 H PPEXTOT Total Purchase Price Expensed
9 I PPAMTOT Purchase Price Amortized
10 J PPTOTAL Total Purchase Price
11 K TAXRTE Tax Rate
12 L TAXSAV Tax Savings
13 M NETPUR Net Purchase Price
14 N BORFUN Borrowed Funds
15 O EQUINV Equity Invested
16 P SIMMON Months of Simulation
17 Q EXPLIF Expected Loan Life
18 R PAYBAK Payback in Years
19 S ECNDUR Economic Duration
20 T PVEDOL Equity Present Value Dollars
21 U PVEPCT Equity Present Value Percent
22 V EQURTE Equity Discount Rate
23 W EQUINV% Equity Invested - Percent Total Investment
24 X NOMIRR Equity Nominal IRR as a Percent
25 Y NETPV Equity Net Present Value Dollars
26 Z MODIRR Modified IRR Rate
27 AA PORBAL Segment or Portfolio Balance
28 AB LOANCNT Loan Count
29 AC SERFEE Service Fees
30 AD INTRTE Interest Rate
31 AE MATMON Maturity in Months
7.8 *.SCR Screen Shots
This file extension is recommended whenever you capture a screen image. The screen image is a regualr ASCII text file with no graphics characters.
8. RBASE DATABASE DEFINITION
We are currently working on a complete RBASE interface for KAL_II. We all the system ARIN and it is an expert system that creates portfolios and groups of portfolios.
Please check the documentation from time to time to see how we are doing.
8.1 PORTVAL TABLE DEFINITION
Field Descriptions
------------------------------------
# Name Type Length
1 GRPNUM TEXT 3 characters
2 GRPDTE DATE
3 GRPRUN INTEGER
4 PORNUM INTEGER
5 PNAME TEXT 8 characters
6 PPREX CURRENCY
7 PPRAM CURRENCY
8 PPRTOT CURRENCY
9 CCSTEX CURRENCY
10 CCSTAM CURRENCY
11 CCSTTOT CURRENCY
12 PPEXTOT CURRENCY
13 PPAMTOT CURRENCY
14 PPTOTAL CURRENCY
15 TAXRTE REAL
16 TAXSAV CURRENCY
17 NETPUR CURRENCY
18 SIMMON INTEGER
19 EXPLIF REAL
20 PAYBAK REAL
21 ECNDUR REAL
22 PREVAL REAL
23 DISCRTE REAL
24 PRI%BAL REAL
25 NOMIRR REAL
26 NETPV CURRENCY
27 MODIRR REAL
28 BEV$ CURRENCY
29 BEV% REAL
30 PORBAL CURRENCY
31 LOANCNT INTEGER
32 SERFEE REAL
33 INTRTE REAL
34 MATMON INTEGER