/* ** Version 01 ** Date : 20/07/2001 ** -------------------------------------------------------------------------- ** Copyright K.Cuthbertson and D. Nitzsche ** "Financial Engineering:Derivatives and Risk Manangement" - J. Wiley 2001 ** ** FOREIGN CURRENCY OPTIONS ** ** Pricing foreign currency options using the Garman-Kohlhagen formula. ** (Model based on the Black - Scholes formula) ** */ new ; cls ; /* ofile = "c:\\kcdn\\output.out" ; output file = ^ofile reset ; */ format /m1/rdn 16,8 ; output off ; screen off ; " ------------------------------------------------------------ " ; " " ; " Definitions of Variables Used " ; " ----------------------------- " ; " " ; " " ; " K = Strike price (cents per f.c.) " ; " " ; " S = exchange rate (scalar - single value only) " ; " (required for printing) " ; " " ; " Days_mat = Days until expiry of option " ; " (Default : 50) " ; " " ; " Days_year = Number of days in the year " ; " (Default : 365) " ; " " ; " r_dom = Domestic interest rates (US Dollars) " ; " (Default : 0.1 - 10%) " ; " " ; " r_for = foreign interest rate " ; " (Default : 0.08 - 8%) " ; " " ; " sigma = Volatility of exchange rate " ; " (Default : 0.2 - 20%) " ; " " ; " ------------------------------------------------------------ " ; /* ----------------------------------- START USER DATA INPUT ---------------------------- Note : the currency and the strike price has to be defined as US Dollars (or cents) per unit of foreign currency -------------------------------------------------------------------------------------- */ K = 145 ; @ e.g. Here defined in cents per Pound Sterling @ S = 142 ; Days_mat = 50 ; Days_year = 365 ; r_dom = 0.05 ; @ US Dollar interest rates @ r_for = 0.09 ; @ interest rates of the foreign currency @ sigma = 0.15 ; @ Volatility of the exchange rate @ /* ---------------------------------------- END USER DATA INPUT ---------------------------- */ /* ----------------------------------- STARTING THE CALCULATION ---------------------------- */ T = Days_mat/Days_year ; {GK_call} = gkcall(K,S,sigma,T,r_dom,r_for); GK_put = -S.*exp(-r_for.*T) + GK_call + K.*exp(-r_dom.*T) ; @ Using Put Call parity @ SBE_call = K + GK_call ; SBE_put = K - GK_put ; /* ------------------------------ Printing Output and the Graph -------------------------- */ output on; screen on ; @@ "" ; " ------------------------------------------------------------------------ " ; " " ; " FILE : Chp11 Tab4 Pricing currency options.txt " ; " ============================================== " ; " " ; " Version 20/07/2001 " ; " " ; " Copyright K.Cuthbertson and D. Nitzsche " ; " 'Financial Engineering:Derivatives and Risk Manangement' - J. Wiley 2001 " ; " " ; " FOREIGN CURRENCY OPTIONS " ; " Pricing foreign currency options " ; " " ; " ------------------------------------------------------------------------ " ; @@ "" ; @@ "" ; @@ " Parameter Inputs " ; @@ " ================ " ; @@ "" ; @@ ftos(K," Strike Price of Option : %*.*lf",25,2) ; @@ "" ; @@ ftos(Days_mat," Number of days untill maturity : %*.*lf",17,2) ; @@ ftos(Days_year," Number of days in the year : %*.*lf",21,2) ; @@ ftos(T," Time to expiry : %*.*lf",35,4) ; @@ "" ; @@ ftos(r_dom," Domestic interest rates (e.g. US rates) : %*.*lf",8,2) ; @@ ftos(r_for," Foreign interest rates : %*.*lf",25,2) ; @@ ftos(sigma," Volatility of exchange rate : %*.*lf",20,2) ; @@ "" ; @@ "" ; @@ " OPTION PREMIA " ; @@ " ============= " ; @@ "" ; @@ ftos(GK_call," CALL PREMIUM Garman Kohlhagen model : %*.*lf",14,4) ; @@ ftos(GK_put," PUT PREMIUM Garman Kohlhagen model : %*.*lf",15,4) ; @@ "" ; @@ ftos(SBE_call," Break even stock price for the Call : %*.*lf",14,4) ; @@ ftos(SBE_put," Break even stock price for the Put : %*.*lf",15,4) ; @@ "" ; @@ "" ; /* ---------------------------------------- END OF PROGRAM -------------------------------- */ /* ---------------------------------------------------------------------------------------- */ /* Procedures: Garman Kolhagen Call and Put */ /* ---------------------------------------------------------------------------------------- */ proc gkcall(k,s,sigma,tau,r_dom,r_for); local d1,d2,c; d1 = (ln(s./k)+(r_dom-r_for+(sigma.^2)/2).*T)./(sigma.*sqrt(T)) ; d2 = d1 - (sigma.*sqrt(T)) ; c = s.*exp(-(r_for.*T)).*cdfn(d1)-k.*exp(-(r_dom.*T)).*cdfn(d2) ; retp(c); endp; end ;