Principles-of-Financial-Computing-2018s

  1. Write a program to price the American put and its delta based on the CRR binomial tree. Inputs: (1) S (spot price), (2) X (strike price), (3) r (risk-free interest rate), (4) s (volatility), (5) T (years), (6) n (number of periods). Output: put price and delta. For example, assume S = 100, X = 105, r = 0.03, s = 0.25, T = 1, and n = 300. Then the put price is 11.4336 and the delta is −0.5066.

  2. Write a program to price the European arithmetic average-rate knock-in call on a non-dividend-paying stock; calculate its delta too. Note that the payoff is the same as the Asian call, and the knock-in barrier is triggered by the average price too. Inputs: (1) S (spot price), (2) X (strike price), (3) H (barrier price), (4) T (years), (5) r (risk-free interest rate), (6) s (volatility), (7) n (number of periods), (8) k (number of buckets). Output: call price and its delta. For example, assume S = 100, X = 100, H = 110, T = 1, r = 0.05, s = 0.30, and n = 200, and k = 100. Then the call price is 8.3514 and its delta is 0.5726.

  3. Write a least-squares Monte Carlo program to price American-style Asian puts. Note that the payoff is the same as the Asian put (of course, it is based on the running average if early exercised). Output its price and standard error. Inputs: (1) S (spot price), (2) X (strike price), (3) T (years), (4) r (risk-free interest rate), (5) s (volatility), (6) n (number of periods), (8) k (number of simulation paths). Output: put price and its standard error. For example, assume S = 100, X = 100, T = 1, r = 0.05, s = 0.30, n = 100, and k = 100000. Then the put price is 5.5126 and its standard error is 0.0251.

  4. Write a program to price European put options based on the GARCH model (Ritchken-Trevor algorithm). Output its price. Inputs: E (days before expiration), r (%) (interest rate), S (stock price at time 0), h0, b0, b1, b2, c, X (strike price), n1 (number of partitions per day), n2 (number of variances per node). For example, the option price is about 2.0163 when E = 30, r (%) = 5, S = 100, h0 = 0.010469, b0 = 0.000006575, b1 = 0.9, b2 = 0.04, c = 0, X = 100, n1 = 3, n2 = 3.