Title: | Estimation of value and hedging strategy of call and put options. |
---|---|
Description: | Estimation of value and hedging strategy of call and put options, based on optimal hedging and Monte Carlo method, from Chapter 3 of 'Statistical Methods for Financial Engineering', by Bruno Remillard, CRC Press, (2013). |
Authors: | Bruno Remillard |
Maintainer: | Bruno Remillard <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-12-18 06:40:49 UTC |
Source: | CRAN |
Computes the value of C and the optimal hedging strategy for a call or a put option on a grid at discrete time intervals, using optimal hedging and simulations. The continuous time model is assumed to be a Levy process, so the periodic returns are i.i.d. Only the returns at the first period need to be simulated. For values of the asset not on the grid, interpolation is needed. The optimal number of shares phi to be bought at period i-1, when the discounted price is s and the discounted value of the hedging portfolio is P, is given by phi = (interpol1d(s,a[i,],minS,maxS)-P*rho)/s and the change in the discounted portfolio is phi * s. At time 0, P = interpol1d(s,C[1,],minS,maxS).
hedging.iid(R,T,K,r,put,n,m,minS,maxS)
hedging.iid(R,T,K,r,put,n,m,minS,maxS)
R |
Simulated iid excess periodic returns for the first period. |
T |
Maturity of the option (in years). |
K |
Strike price. |
r |
Annual (continuous) interest rate. |
put |
1 (default) for a put and 0 for a call. |
n |
Number of hedging periods. |
m |
Number of points of the grid. |
minS |
Minimum value of the grid. |
maxS |
Maximum value of the grid. |
S |
Points on the grid at which the option is evaluated. |
C |
C(i,j) represents the value of the option at period i-1 for point S(j) on the grid. |
a |
a(i,j) represents a value needed to compute the optimal hedging strategy at period i-1 for point S(j) on the grid. |
phi1 |
phi1(j) is the initial number of shares of the asset to be bought if its price is S(j). |
rho |
Constant needed for the computation of the hedging strategy. |
Bruno Remillard
Chapter 3 of 'Statistical Methods for Financial Engineering, B. Remillard, CRC Press, (2013).
# Computes the price of a one-year maturity put option when hedged 5 times # at regular time intervals. # The model is assumed to be Black-Scholes with parameters mu and sigma, # so the excess periodic returns are Gaussian. n = 5; # number of hedging periods m = 5001; # number of points of the grid minS = 80.0; # minimum value of the grid maxS = 120.0; # maximum value of the grid S0 = 100.0; # initial value K = 100.0; # strike price T = 1.0; # maturity of the option r = 0.05; # annual (continuous) rate put = 1; # Put = 0 implies call! #Simulation of excess periodic returns sigma = 0.06; # annual volatility of the returns mu = 0.09; # annual mean of the returns Tp = T/n; rp = r*Tp; sigmap = sigma*sqrt(Tp); Kp = K*exp(-r*T); mup = mu*Tp-0.5*sigmap*sigmap; #Gaussian excess returns N = 10000; # number of simulated returns R = mup -rp +sigmap*rnorm(N); # Computation out0 = hedging.iid(R,T,K,r,put,n,m,minS,maxS) C = out0$C; a = out0$a; rho = out0$rho; S = out0$S; phi1 = out0$phi1; # Initial value of the option computed from interpolating C C0 = interpol1d(S0,C[1,],minS,maxS); # Initial value of the option computed from interpolating C phi = (interpol1d(S0,a[1,],minS,maxS)-C0*rho)/S0; par(mfrow=c(2,1)) plot(S,C[1,],type='s',main=bquote('Put values ' * C[0] * ' at time 0 for n' ==.(n) )) plot(S,phi1,type='s',main=expression('Number of shares ' *phi[1] * ' at start')) par(new=TRUE) C0 phi
# Computes the price of a one-year maturity put option when hedged 5 times # at regular time intervals. # The model is assumed to be Black-Scholes with parameters mu and sigma, # so the excess periodic returns are Gaussian. n = 5; # number of hedging periods m = 5001; # number of points of the grid minS = 80.0; # minimum value of the grid maxS = 120.0; # maximum value of the grid S0 = 100.0; # initial value K = 100.0; # strike price T = 1.0; # maturity of the option r = 0.05; # annual (continuous) rate put = 1; # Put = 0 implies call! #Simulation of excess periodic returns sigma = 0.06; # annual volatility of the returns mu = 0.09; # annual mean of the returns Tp = T/n; rp = r*Tp; sigmap = sigma*sqrt(Tp); Kp = K*exp(-r*T); mup = mu*Tp-0.5*sigmap*sigmap; #Gaussian excess returns N = 10000; # number of simulated returns R = mup -rp +sigmap*rnorm(N); # Computation out0 = hedging.iid(R,T,K,r,put,n,m,minS,maxS) C = out0$C; a = out0$a; rho = out0$rho; S = out0$S; phi1 = out0$phi1; # Initial value of the option computed from interpolating C C0 = interpol1d(S0,C[1,],minS,maxS); # Initial value of the option computed from interpolating C phi = (interpol1d(S0,a[1,],minS,maxS)-C0*rho)/S0; par(mfrow=c(2,1)) plot(S,C[1,],type='s',main=bquote('Put values ' * C[0] * ' at time 0 for n' ==.(n) )) plot(S,phi1,type='s',main=expression('Number of shares ' *phi[1] * ' at start')) par(new=TRUE) C0 phi
Interpolates linearly a function given at equally spaced points on the interval [minS,maxS].
interpol1d(x,F0,minS,maxS)
interpol1d(x,F0,minS,maxS)
x |
Point at which the function is interpolated. |
minS |
Minimum value of the grid. |
maxS |
Maximum value of the grid. |
F0 |
Value of the function at m equally spaced points on the grid. |
interpol |
Linear interpolation of the function at point x. |
Bruno Remillard
Chapter 3 of 'Statistical Methods for Financial Engineering, B. Remillard, CRC Press, (2013).
F0 = c(1:10) minS = 1; maxS = 10; out = interpol1d(2.45,F0,1,10) out #since the function is the identity, the answer should be 2.45!
F0 = c(1:10) minS = 1; maxS = 10; out = interpol1d(2.45,F0,1,10) out #since the function is the identity, the answer should be 2.45!