Exercises of computational methods in finance

advertisement
Exercises of computational
methods in finance
Nikos Skantzos
1.
Decompose the following strategies into simple Call and Put positions
(short or long). Discuss advantages and disadvantages of each of the
strategies
• Left: Call(K1) + Put(K2): Strangle
•Advantages: protection against volatility (profit for low spots, profit for high spots)
•Disadvantages: Expensive
• Middle: ½Call(K1) + ½ Put(K2)-Call(K)-Put(K): Butterfly
•Advantages: cheap
•Disadvantages: profit limited with the two strikes
• Right: Call(K1) - Put(K2): Risk reversal
•Advantages: cheaper than vanilla
•Disadvantages: gives risk for losses if spots is low
Integrate numerically the function exp(-x²/2) between –4 and +4, using
an interval of dx=0.01.
Differentiate numerically and analytically the function exp(-x²/2).
Write a program in VBA that calculates the functions min(a,b) and max(a,b)
using the min / max of two numbers.
Write a program in VBA to generate a brownian motion W(t). The input parameters
are: the number of time steps, the final time. As an output, the function should
return the simulated trajectory.
Use the function of exercise 4 to calculate the variance of the final value of
a brownian trajectory with dt=0.01, on the basis of 1000 realisations.
Change the time-increment to dt=0.5 and explain why the variance
increases.
Write a programe in VBA to compute a Black-Scholes price (analytic
formula) for a Call option: Call(S, K, s, r, q, T).
Compare the price of a simple call option to the price call with a barrier
where the barrier level H increases.
What is the value of a 3m call on EUR/USD, rEUR = 4%, rUSD = 5% vol=25%, K=1.3
for different values of the spot. For each point of the curve calculate the Delta
using finite differences and the analytic formula. If S=1.27, what is the cost of
an option on 1,000,000 EUR notional? And on an option on 1,000,000 USD
notional?
Write a VBA program that generates variables of a normal distribution of mean μ
and variance σ using the VBA uniform random number generator. Calculate the
mean and the variance of the samples.
Write an Excel method that calculates the cumulative function of a normal
density function e-x*x/2/√(2π)
Using Excel calculate Black-Scholes spotladder (price of a call option for various spot
levels) for different values of (i) volatility, (ii) maturity, (iii) rates. What is the impact
of each of these on the price of the option?
Calculate with Monte Carlo the value of an Asian put option and compare
with the value of the corresponding vanilla put. How do you explain
the difference in the prices?
Programm a VBA function allowing the pricing of a Call with Monte-Carlo:
Call(S, K, s, r, q, T, Nsimu). Compare with the exact solution from
Black-Scholes formula
Calculate the number p using a Monte-Carlo method
Write a VBA program that calculates the value of a digital option with
Monte Carlo simulations. Compare with the analytic result.

Calculate the price of a knock-out option using Monte Carlo and the
formula for the surviving probabilities
Price a call option using the explicit PDE method and compare the result to
the Black-Scholes formula.
Write a VBA program that generates variables of a normal
distribution of mean μ and variance σ using the VBA uniform
random number generator. Calculate the mean and the
variance of the samples.

Write an Excel method that calculates the cumulative function
of a normal density function e-x*x/2/√(2π)
Download