Math 239 Homework 1 solutions Question 1. Delta hedging simulation. (a) Means, standard deviations and histograms are found using HW1Q1a.m with 100,000 paths. In the case of weekly rebalancing: mean = 0.0002 and standard deviation = 0.6963. In the case of daily rebalancing: mean = 0.0009 and standard deviation = 0.3242. Figure 1: Distribution of the hedging errors with weekly (left) and daily (right) rebalancing. function [results] = HW1Q1a(N,p) % N is the number of rehedging times % p is the number of simulated paths S0 = 50; mu = 0.10; sig = 0.30; r = 0.05; K = 50; T = 0.25; 1
% p columns of the N-1 rehedging times (from T/N to T-T/N) Times = cumsum(ones(n-1,p))*t/n; % simulate p discretized paths at times T/N to T S = (mu-0.5*sig*sig)*t/n + sig*randn(n,p)*sqrt(t/n); S = S0*exp(cumsum(S)); % compute the initial hedge Initial_Delta = BSdelta(S0, sig, r, K, T); Bank = BS(S0, sig, r, K, T) - Initial_Delta*S0; % compute all the deltas at once Delta = BSdelta(S(1:N-1,:), sig, r, K, T-Times); % compute the gains from trading at each rehedging times Gains = ([Initial_Delta*ones(1,p); Delta(1:N-2,:)] - Delta(1:N-1,:)).*S(1:(N-1),:); % Profit or Loss is the sum of the actualized gains from trading + % what was in the bank at the begining + what is held in stock - % payments to the client Profit_or_Loss = exp(r*(t-times(:,1))) *Gains + exp(r*t)*bank... + Delta(N-1,:).*S(N,:) - max(0, S(N,:)-K); % results %hist(profit_or_loss); results = [mean(profit_or_loss) std(profit_or_loss)]; (b) The stock price must be updated using µ. This question is about simulating real world scenarios not about computing prices via the risk-neutral representation formula. The value of µ itself has however little infuence on the resuts. (even µ = 100%) (c) To compute the size of the hedging error, we compute its L 2 norm, which is the square root of (variance + mean squared). We use HW1Q1c.m which calls previous function HW1Q1a.m with 1,000 paths. The rate of convergence is approximately 1. Question 2. Stop-loss start-gain strategy. Use HW1Q1a.m but instead of calling the functions BS.m and BSdelta.m, call functions BS2.m and BSdelta2.m. 2
Figure 2: Rate of convergence of the L 2 norm of the hedging errors as the number of rehedging times increases. Horizontal axis is log 2 (N) and vertical axis is log 2 ( Hedging Error 2 ). function [result] = BS2(S, sig, r, K, T) result = max(s - K, 0); end function [result] = BSdelta2(S, sig, r, K, T) result = (S - K > 0); end Means, standard deviations and histograms are found using 100,000 paths. In the case of weekly rebalancing: mean = -3.3619 and standard deviation = 2.5466. In the case of daily rebalancing: mean = -3.3518 and standard deviation = 2.3388. Increasing the number of rehedging does not improve the hedge, which is always losing money. The only paths where the hedge breaks even are the paths that never cross the strike level. Each time the stock crosses the strike level from above, the strategy loses money because we are selling slightly below K. Similarly, when the stock crosses the strike level from below, the strategy loses money because we are buying slightly above K. It looks like increasing the number of rehedging times will improve the hedge because, we would buy and sell at prices that become closer and closer to K. This is not the case because the number of times that we will have to buy and sell will increase proportionally. This has to do with the fact that Brownian paths have an infinite number of crossings. This is closely related to the theory of local times for semimartingales. 3
Figure 3: Distribution of the hedging errors with weekly (left) and daily (right) rebalancing. Question 3. Transaction costs. (a) Means, standard deviations and histograms are found using 100,000 paths. We simply add the line Gains = Gains - k*abs(gains); to the code in Question 1(a). In the case of weekly rebalancing: mean = -1.0887 and standard deviation = 0.8740. In the case of daily rebalancing: mean = -2.5095 and standard deviation = 1.0089. The distributions of the hedging are skewed to the left because of the transaction costs. Increasing the number of transactions increases the costs. Even though the volume of the transaction becomes smaller, this is not enough to compensate. This is closely related to the fact that Brownian paths have infinite variation. (b) Means, standard deviations and histograms are found using 100,000 paths. We simply compute prices and hedges using ˆσ instead of σ in the code in Question 3(a). In the case of weekly rebalancing: ˆσ = 39.9% and the option s price is $4.2645; mean and standard deviation of hedging errors are 0.0406 and 0.8238. In the case of daily rebalancing: ˆσ = 49.2% and the option s price is $5.1803; mean and standard deviation of hedging errors are -0.0024 and 0.4517. For comparison, the Black-Scholes price is $3.2915. Leland s hedge seems to do a very good job since the results are now comparable with those of Question 1. 4
Figure 4: Distribution of the hedging errors with transaction costs in the case of weekly (left) and daily (right) rebalancing. Question 4. Non constant volatility. We use the Euler discretization scheme to simulate paths of the CEV process: S = zeros(n,p); S(1,:) = S0*(1 + mu*t/n + alpha*s0.^beta.*randn(1,p)*sqrt(t/n)); for i = 2:N S(i,:) = S(i-1,:).*(1 + mu*t/n + alpha*s(i-1,:).^beta.*randn(1,p)*sqrt(t/n)); end For a small number of rehedging times, the results look similar to those for geometric Brownian motion. However, for large N, the hedge does not work as well. This shows that the hedge does not replicate the option perfectly. Question 5. Gaussian processes and Brownian bridge. (a) E{W t } = 0. Let s t, Cov{W s, W t } = E{W s (W t W s )} + E{W 2 s } = E{W s }E{W t W s } + s = s = s t. We used the independence of the increments in the third equality. 5
Figure 5: Distribution of the hedging errors with transaction costs and Leland s strategy in the case of weekly (left) and daily (right) rebalancing. (b) It is a Gaussian process because any linear combination of the X ti s is a linear combination of W ti s and W 1 and is therefore a Gaussian random variable. E{X t } = 0. Cov{W s, W t } = s t st for s, t 1. (c) It is a Gaussian process for the same reason. E{(1 t)w t/(1 t) } = 0. Take s t < 1, then s/(1 s) t/(1 t) and Cov{(1 s)w s/(1 s), (1 t)w t/(1 t) } = (1 s)(1 t)s/(1 s) = s t st. (d) For t < 1, t 0 ds/(1 s)2 <, and the process is well-defined as an Itô integral. By plugging in the SDE, one checks that it is a solution. By uniqueness of solutions to such linear SDE, it is the solution. E{Y t } = 0 and for s t, Cov{Y s, Y t } = (1 s)(1 t) s 0 du/(1 u)2 = s st 6
Figure 6: Rate of convergence of the L 2 norm of the hedging errors in the CEV model. Horizontal axis is log 2 (N) and vertical axis is log 2 ( Hedging Error 2 ). 7