UnivPM_MathFinPutBarrierF_readme.txt The routines of the library UnivPM_MathFinPutBarrierF have been tested with the compiler Compaq Visual Fortran 6. How to call the software library: -Fortran 90 users: you must unzip the "UnivPM_MathFinPutBarrierF.zip" file which contains a simple main, Fmain.f90, that calls the routines and tvpack.f, for the computation of the univariate, bivariate e trivariate cumulative normal distributions. Main code description: Fmain.f90: This file contains a main code that implements the computation of the first three terms of the expansion that approximates the price of a continuously monitored up and out put barrier option. The file contains also several functions that evaluate the basilar functions that define the first three order terms. User Supplied Parameters. iord : an integer that selects the order of the expansion used to approximate the price (iord=0,1,2) kprice: strike price stock : stock price hbarr : barrier value taumin: time at which the option is evaluated taumax: maturity time User supplied functions (see the end of file Fmain.f90): 1) Function integr(t1,t2): evaluates the integral of the risk free interest rate r(t) on the interval (t1,t2) 2) Function integalpha(t1,t2): evaluates the integral of alpha(t) on the interval (t1,t2) 3) Function integs(t1,t2): evaluates the integral of the square of the volatility sigma^2(t) on the interval (t1,t2) 4) Function alpha(t1): evaluates the function alpha(t) at t=t1 5) Function sigmaq(t1): evaluates the square of the volatility at t=t1 File tvpack.f: This file collects several functions to compute univariate, bivariate, trivariate cumulative normal distributions. This file is downloadable from the website: http://www.math.wsu.edu/faculty/genz/software/software.html PHID(DH): A function that computes the normal distribution probabilities with accuracy of 1D-15. Based upon algorithm 5666 for the error function, from: Hart, J.F. et al, 'Computer Approximations', Wiley, New York, 1968 BVND(DH,DK,R): A function that computes bivariate normal probabilities. DH : lower bound of the integration interval (DH,+infinity) DK : lower bound of the integration interval (DK,+infinity) R : correlation coefficient rho_{1,2} This function is based on the method described by Z. Drezner, and G.O. Wesolowsky, (1989), On the computation of the bivariate normal integral, Journal of Statist. Comput. Simul. 35, pp. 101-107, with major modifications for double precision, and for |R| close to 1. BVND calculates the probability that X > DH and Y > DK. Note: Prob( X < DH, Y < DK ) = BVND( -DH, -DK, RHO ). TVTL(NU,H,R,EPSI): A function that computes trivariate normal and t-probabilities. This function uses algorithms developed from the ideas described in the papers: R.L. Plackett, Biometrika 41(1954), pp. 351-360. Z. Drezner, Math. Comp. 62(1994), pp. 289-294. Calculate the probability that X(I) < H(I), for I = 1,2,3 NU : integer degrees of freedom; use NU = 0 for normal cases. H : real array of upper limits for probability distribution R : real array of three correlation coefficients, R should contain the lower left portion of the correlation matrix RR. R should contains the values r21, r31, r23 in that order. EPSI: REAL required absolute accuracy; maximum accuracy, for most computations is approximately 1D-14