Top Banner
Exercises of computational methods in finance Nikos Skantzos
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Exercises of computational methods in finance Nikos Skantzos.

Exercises of computational methods in finance

Nikos Skantzos

Page 2: 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

Page 3: Exercises of computational methods in finance Nikos Skantzos.

Integrate numerically the function exp(-x²/2) between –4 and +4, using an interval of dx=0.01.

Microsoft Excel Worksheet

Page 4: Exercises of computational methods in finance Nikos Skantzos.

Differentiate numerically and analytically the function exp(-x²/2).

Microsoft Excel Worksheet

Page 5: Exercises of computational methods in finance Nikos Skantzos.

Write a program in VBA that calculates the functions min(a,b) and max(a,b) using the min / max of two numbers.

Microsoft Excel Worksheet

Page 6: Exercises of computational methods in finance Nikos Skantzos.

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.

Microsoft Excel Worksheet

Page 7: Exercises of computational methods in finance Nikos Skantzos.

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.

Microsoft Excel Worksheet

Page 8: Exercises of computational methods in finance Nikos Skantzos.

Write a programe in VBA to compute a Black-Scholes price (analytic formula) for a Call option: Call(S, K, , r, q, T).

Microsoft Excel Worksheet

Page 9: Exercises of computational methods in finance Nikos Skantzos.

Compare the price of a simple call option to the price call with a barrier where the barrier level H increases.

Microsoft Excel Worksheet

Page 10: Exercises of computational methods in finance Nikos Skantzos.

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?

Microsoft Excel Worksheet

Page 11: Exercises of computational methods in finance Nikos Skantzos.

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.

Microsoft Excel Worksheet

Page 12: Exercises of computational methods in finance Nikos Skantzos.

Write an Excel method that calculates the cumulative function of a normal density function e-x*x/2/√(2π)

Microsoft Excel Worksheet

Page 13: Exercises of computational methods in finance Nikos Skantzos.

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?

Microsoft Excel Worksheet

Page 14: Exercises of computational methods in finance Nikos Skantzos.

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?

Öýëëï åñãáóßáò ôïõ Microsoft Excel

Page 15: Exercises of computational methods in finance Nikos Skantzos.

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

Öýëëï åñãáóßáò ôïõ Microsoft Excel

Page 16: Exercises of computational methods in finance Nikos Skantzos.

Calculate the number using a Monte-Carlo method

Öýëëï åñãáóßáò ôïõ Microsoft Excel

Page 17: Exercises of computational methods in finance Nikos Skantzos.

Write a VBA program that calculates the value of a digital option with Monte Carlo simulations. Compare with the analytic result.

Öýëëï åñãáóßáò ôïõ Microsoft Excel

Page 18: Exercises of computational methods in finance Nikos Skantzos.

Calculate the price of a knock-out option using Monte Carlo and the formula for the surviving probabilities

Öýëëï åñãáóßáò ôïõ Microsoft Excel

Page 19: Exercises of computational methods in finance Nikos Skantzos.

Price a call option using the explicit PDE method and compare the result to the Black-Scholes formula.

Öýëëï åñãáóßáò ôïõ Microsoft Excel

Page 20: Exercises of computational methods in finance Nikos Skantzos.

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.

Microsoft Excel Worksheet

Page 21: Exercises of computational methods in finance Nikos Skantzos.

Write an Excel method that calculates the cumulative function of a normal density function e-x*x/2/√(2π)

Microsoft Excel Worksheet