/* ** Version 01 ** Date : 20/07/2001 ** -------------------------------------------------------------------------- ** Copyright K.Cuthbertson and D. Nitzsche ** "Financial Engineering:Derivatives and Risk Manangement" - J. Wiley 2001 ** ** VALUE AT RISK: FORWARD FX CONTRACT ** ** Calculation of VaR for FX- Forward: Dollar-Euro(Germany), Ch 23, Table 23.8 ** */ new ; cls ; format /m1/rd 12,7; output on ; screen on ; /* output file=c:\docs\arun\out.out reset; @ --- USER TO CHECK FILEPATH --- @ */ /* " ------------------------------------------------------------------------------------------ " ; " VaR of FX-Forward " ; " ------------------------------------------------------------------------------------------ " ; ?; " Domestic Currency (USD) "; ?; " Foreign country is Germany with Euro as the foreign currency "; ?; ?; " Number of assets mapped from the FX forward (n=3) "; ?; " Maturity of forward contract (days) "; ?; " Maturity of forward contract, years (t) "; ?; " Spot Foreign Exchange rate (domestic per unit of foreign currency) (s) "; ?; " Forward Foreign Exchange rate (domestic per unit of foreign currency) (Fwd)"; ?; " Domestic Interest Rate (rd) "; ?; " Foreign Interest Rate (rf) "; ?; " Standard Deviation of asset returns , daily % , (sigma) "; ?; " Value-at-Risk for each mapped position (Z) "; ?; " Correlation between Asset returns (R) "; */ @ ------------------------------------- USER INPUT (see Table 23.8) ---------------------------------------------- @ n = 3 ; @ Each FX-forward is mapped into 3 assets = 2-spot interest rates + spot-FX @ days = 365 ; @ Maturity of forward contract @ s = 1.1500 ; @ Spot FX: (USD per f.c.) @ rd = 6.00 ; @ domestic, % p.a. @ rf = 5.00 ; @ foreign, % p.a. @ sigma = {0.6, 0.05, 0.08 } ; @ { Spot-FX, Foreign(Euro) int.rate, Domestic(USD) int.rate}, Daily % @ Vfwd = 10000000 ; @ Receipt of Forward Euros-10m in days=365, 'long Forward Euros' @ @ ------------------------------------ END OF USER INPUT (see Table 23.8) ----------------------------------------- @ @ -------------- Assets 1, 2, 3 are { Spot-FX, Foreign(Euro) int.rate, Domestic(USD) int.rate} -------------------- @ R = { 1 0.25 0.04, 0.25 1 0.20, 0.04 0.20 1 } ; t = days/365; rd = rd./100 ; rf = rf./100 ; rdc = ln(1+rd) ; rfc = ln(1+rf) ; Fwd = s.*( (1 + rd).^t ./ ( 1 + rf).^t ) ; @ forward rate, using compound int rates @ Fwdc = s.*exp( (rdc-rfc).*t ) ; @ forward rate, using contin comp. int rates @ Vdom = -Vfwd.*Fwd ; @ value of forward position in dom. curr. @ @ --------------- Create the equivalent synthetic position (ie. mapping)- See Appendix 23.3 ---------------------- @ Vs0 = Vfwd.*s.*exp(-rfc.*t) ; @ PV(t=0, dom. curr.) of spot-FX or Foreign lending position, 'long' @ @ Vs0 = 10 F exp (-rd*t) = 10 s exp(-rf*t) @ Vf0 = Vs0 ; @ PV(t=0, dom. curr.) of spot-FX or Foreign lending position, 'long' @ Vd0 = -Vfwd.*Fwd.* exp(-rdc.*t) ; @ PV(t=0, dom. curr.) of Domestic (borrowing) position, 'short' @ V0 = Vs0|Vf0|Vd0 ; @ ---------------------------- { Spot-FX, Foreign(Euro) int.rate, Domestic(USD) int.rate} ------------------- @ Z = zeros(n,1); Z[1,1] = 1.65*(sigma[1,1]/100)*Vs0; Z[2,1] = 1.65*(sigma[2,1]/100)*Vf0; Z[3,1] = 1.65*(sigma[3,1]/100)*Vd0; VaR = sqrt(Z'*R* Z); " ----------------------------------------------------------------------------------------------------------- " ; " VaR of FX-Forward " ; " ----------------------------------------------------------------------------------------------------------- " ; ?; " Spot Foreign Exchange rate (domestic per unit of foreign currency) (s) " s ; ?; " Forward Foreign Exchange rate (domestic per unit of foreign currency) (Fwd) " Fwd ; ?; " Forward Foreign Exchange rate (domestic per unit of foreign currency) (Fwdc) " Fwdc ; ?; " Domestic Interest Rate (rd) " rd ; ?; " Foreign Interest Rate (rf) " rf ; ?; " Domestic Interest Rate, contin. comp. (rdc) " rdc ; ?; " Foreign Interest Rate, contin. comp. (rfc) " rfc ; ?; " Correlation Matrix,{ Spot-FX, Foreign(Euro) int.rate, Domestic(USD) int.rate} " R ; ?; ?; " Value of forward deal in foreign and domestic currency " Vfwd~Vdom ; ?; " PV(t=0), ALL in dom. curr. of synthetic or mapped posn. consisting of " ; " {Spot-FX, Foreign lending position('long'), Domestic borrowing('short') " V0 ; ?; " Standard Deviation of asset returns, daily %,(= sigma) " sigma' ; ?; " $-VaR for {spot-FX, Foreign posn, USD domestic posn } = (Z-vector) " Z' ; ?; " Worse Case VaR " sumc( abs(Z) ); " Diversified VaR " VaR; " ------------------------------------------------------------------------------------------------------------ " ; end;