请回答者附上代码,满意的会有论坛币奖赏!谢谢!
Background
Your employer has sold a put option on WMT with a maturity of T = 0.25 and a strike price K = 80. The stock’s current price is S0 = 75. The following assumptions (annualized with continuous compounding) were used in pricing:
r=0.03
δ=0.05
σ=0.20
Your company intends to hedge its risk by delta hedging with shares of WMT. It will rebalance the hedge portfolio weekly.
Exercise 1.1
Generate 10,000 random paths for S using geometric Brownian motion according to the following:
∆t=0.25/13≈0.192
σ ̂=σ=0.20
μ ̂=0.07
Exercise 1.2
Using the paths generated in exercise 1.1, calculate gains/losses if the put option is not hedged. Create a histogram of the distribution. Calculate the expected gains/losses, their standard deviation, and their 99% VaR.
Exercise 1.3
Using the paths generated in exercise 1.1, simulate delta hedging along each path. Assume r ̂=r=0.03 and δ ̂=δ=0.05. Create a histogram of the distribution of hedged gains/losses. Calculate the expected hedging gains/losses, their standard deviation, and their 99% VaR.
Exercise 1.4
Generate 10,000 paths as in exercise 1.1, but this time with μ ̂=0. Simulate delta hedging along each path. Calculate the expected hedging gains/losses, their standard deviation, and their 95% VaR. Calculate the same measures for an unhedged position.
Exercise 1.5
Generate 10,000 paths as in exercise 1.1, but this time according to σ ̂=0.50. Simulate delta hedging along each path, where the hedging is performed according to the original pricing assumptions (i.e., σ = 0.20). Calculate the expected hedging gains/losses, their standard deviation, and their 99% VaR. Calculate the same for an unhedged position.
Exercise 1.6
Using the same paths as in exercise 1.5, simulate delta hedging once again, where this time hedging is performed assuming σ = 0.50 (you may assume the hedging assumption is changed immediately after pricing). Calculate the expected hedging gains/losses, their standard deviation, and their 99% VaR.