We tested and ran our program on UNIX machines DECStations Sun Ultra Enterprise 5000, Enterprise 10000 and 60 Elite 3D with both operating system Solaris 2.5.1 and Solaris 2.6. How to proceed: 1) Unzip the file kb.zip. At the Unix prompt run the command unzip kb.zip The files: kb.f kbnotes.ps tensolve.f blas.f uncmin.f menus.m inputs.m TENSOLVE_DOC.ps PAR1,PAR2,...,PAR15 start restart TESTRE001.RES TESTRE001.DAT TESTRE TESTRB001.RES TESTRB001.DAT TESTRB will be then extracted. 2) Compile the fortran files to get an executable file 'name.out'. On a Unix machine at the Unix prompt run the command f77 -o name.out *.f 3) Test the program by running the command ./name.out < start You should get the Rational Expectations results in the files REE001001.RES, REE001 and REE001001.DAT which should report the same results as in the files TESTRE001.RES, TESTRE and TESTRE001.DAT. Modify the input parameters lambda and mu and set both of them equal to [1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1]. To modify these parameters follow step 5. Then, at the Unix prompt run the command ./name.out < restart You should get the Rational Beliefs Equilibrium results in the files RBE001001.RES, RBE001 and RBE001001.DAT which should report the same results as in the files TESTRB001.RES, TESTRB and TESTRB001.DAT. 4) Read the document kbnotes.ps and proceed with your own calculations. You can simply run the command ./name.out and input the initialization variables in 'interactive mode'. Alternatively, you can set the initialization variables in the ascii file 'start' when solving for a new case with uniform starting values, or in the ascii file 'restart' when solving for a new case using as the initial guess the solution of a previous case, and then run one of the commands used above: ./name.out < start ./name.out < restart 4.a) Note that the files 'start' and 'restart' have been set with the following initialization values for the TENSOLVE procedure (by input order): MSG = 16 ITERATION LIMIT = 150 STEPMAX = 1.0d+03 FUNCTION TOLERANCE = 1.0d-08 GRADIENT TOLERANCE = 1.0d-27 STEP TOLERANCE = 0.0d+00 RADIUS = -1.0d+00 METHOD (NEWTON) = 0 GLOBAL STRATEGY (LINE SEARCH) = 0. We refere you to the included postscript file TENSOLVE_DOC.ps for an exhaustive explanation of the role played by the initialization variables. You can set these variables to new values by modifying the files 'start' and/or 'restart' by using any text editor. The list of values for the variables used in each case is reported at the top of the summary output file (see prologue of kb.f). 4.b) In the file 'start' to open output files and supply a uniform initial guess to the non-linear equation solver the following input variables follow those listed in 4.a (by input order): 6 CHARACTER ROOT FOR OUTPUT FILENAMES = 'REE001' STARTING VALUE MENU OF CHOICES = 1 UNIFORM INITIAL GUESS OF STOCK PRICE = 27.00d0 UNIFORM INITIAL GUESS OF BOND PRICE = 0.95d0 UNIFORM INTTIAL GUESS OF STOCK HOLDINGS = 0.50d0 UNIFORM INITIAL GUESS OF BOND HOLDINGS = 0.00d0 4.c) In the file 'restart' to open output files and supply the solution of a previous case as initial guess to the non-linear equation solver the following input variables follow those listed in 4.a (by input order): 6 CHARACTER ROOT FOR OUTPUT FILENAMES = 'RBE001' STARTING VALUE MENU OF CHOICES = 2 13 CHARACTER OLD DATA FILENAME = 'REE001001.DAT' 4.d) Use any text editor to edit the files 'start' and/or 'restart' in order to modify the values of all the variables listed above so to fit the specifications of your own calculations. 5) To modify input parameters run matlab by typing 'matlab' at the Unix prompt. Then type 'inputs' when the matlab prompt appears. The following menu of choices will appear: ----- Input of parameters ----- 1) beta1 2) beta2 3) gamma1 4) gamma2 5) alpha1 6) alpha2 7) W1 8) W2 9) phi 10) high-div 11) low-div 12) lambda 13) mu 14) a 15) b 16) exit Select a menu number: and follow instructions. If matlab is not installed on your workstation, although more cumbersome, you can edit the PAR1,...,PAR15 files directly in any text editor, making sure you have matched up the correct PAR file with its corresponding parameter as given in the menu above. 6) Of course many things could be improved in the code thus any suggestion will be greatly appreciated (please email mordecai@leland.stanford.edu).