CompFin 2020 SS QF Sheet 03

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Christian-Albrechts-Universität zu Kiel SS 2020

Mathematisches Seminar
Prof. Dr. Sören Christensen
Adrian Theopold, Henrik Valett Sheet 03

Computational Finance
Exercises for all participants

C-Exercise 07 (Options in the CRR model)(4 points)


Write a Python function

V_0 = CRR_AmEuPut (S_0, r, sigma, T, M, K, EU)

that computes and returns an approximation to the price of an European or an American put
option with strike K > 0 and maturity T > 0 in the Black-Scholes model with initial stock
price S(0) > 0, interest rate r > 0 and volatility σ > 0. The parameter "EU" is 1 if the price
of an European put shall be computed or is 0 in the American case. Use the binomial method
as presented in the course with M ∈ N time steps.

As M → ∞ we would expect convergence of the price in the binomial model towards the
price in the Black-Scholes model. To show this implement the Black-Scholes formula for
the fair price of a European put option with strike K > 0 and parameters of the BS-model as
above, given the stock price S(t) at time 0 ≤ t ≤ T

P(t, S(t), r, σ , T, K) = Ke−r(T −t) Φ(−d2 ) − S(t)Φ(−d1 ).

Here, Φ denotes the cumulative distribution function of the standard normal distribution and
   
σ2
log S(t)
K + r + 2 (T − t) √
d1 := √ , d2 := d1 − σ T − t.
σ T −t

Test your algorithm with

S(0) = 100, r = 0.05, σ = 0.3, T = 1, M = 10, . . . , 500, K = 120, EU = 1.

Plot the put option price in the binomial model in dependence on the number of steps M. Plot
the fair price in the BS-model into the same plot using the same parameters.
Print the price of an American put with the same S(0), r, σ , T, K as above and M = 500 steps
in the console.
Useful Python commands: numpy.maximum
C-Exercise 8 (Pricing a deep out-of-the-money European call option by Monte-Carlo
with importance sampling)(4 points)
Consider a Black-Scholes model with parameters S(0), r, σ > 0. The goal is to approximate
by the Monte-Carlo method the fair price V (0) of an European call option on the stock with
strike K  S(0) at maturity T .

Write a Python function

[V0, CIl, CIr] = BS_EuCall_MC_IS (S0, r, sigma, K, T, mu, N,


alpha)

that approximates the price of the European call option via Monte-Carlo based on N ∈ N
samples and additionally returns the left and right boundary of an asymptotic α-level con-
fidence interval. Use a new random variable Y ∼ N(µ, 1) for the importance sampling method.

Test your function for S(0) = 100, r = 0.05, σ = 0.3, K = 220, T = 1, N = 10000, α = 0.95
and plot your estimator for V (0) in dependence on µ against the real value.

Hint: Experiment with the range of µ such that you can see visible changes in the variance
of your estimator.

C-Exercise 9 (Using control variables to reduce the variance of MC-estimators) (4


points)
Write a Python function

V0 = BS_EuOption_MC_CV (S0, r, sigma, T, K, M)

that computes the initial price of a European self-quanto call, i.e. an option with payoff
(S(T ) − K)+ S(T ) for some strike price K at maturity, in the Black-Scholes model via the
Monte-Carlo approach with M ∈ N samples. Use a European call option with the same strike
price K as control variate to reduce the variance of the estimator. To this end, estimate in a
first Monte-Carlo simulation with M samples the optimal value

Cov((S(T ) − K)+ S(T ), (S(T ) − K)+ )


.
Var((S(T ) − K)+ )

Test your function for the parameters

S(0) = 100, r = 0.05, σ = 0.3, T = 1, K = 110, M = 100000,

and compare the result to the plain Monte-Carlo simulation (cf. C-Exercise 6).

Useful Python commands: numpy.cov

Please comment your solution. Please include your name(s) as comment in the beginning
of the file.

Submit until: Thu, 07.05.2020, 8:30

You might also like