Question

FITE7405 Assignment 2 (15 marks) 1. (2 marks) Implement the Black-Scholes formulas for C(S, t) and P(S, t), and cal- culate the values of both call and put options with

following parameters: (3.1) S = 100, K = (3.2) S = 100, K (3.3) S = 100, K = (3.4) S = 100, K (3.5) S = 100, K = = Due time: 7pm, 27-02-2024 = 100, t = 0, T = 0.5, σ = = 20%, and r = 1%. = : 0, T = 0.5, o = 20%, and r = 1%. 110, t 100, t = 0, T = 1.0, o = 20%, and r = 1%. 100, t = 0, T = 0.5, o = 30%, and r = = 1%. 100, t = 0, T = 0.5, o = = 20%, and r = € 2%. Based on the results, please comment on how each parameter, namely, strike, maturity, volatility, and the risk free rate affects the call and put values. Remarks: Please submit your source code along with the numerical results. You are free to choose any programming language. Please treat the implementation of this problem seriously as your next assignment will need it. 2. (Correlated normal random variables, 3 marks) Recall the covariance of two random variables X and Y is defined by Cov(X,Y)=E((X - E(X)) (Y – E(Y))) = E(XY) – E(X)E(Y). Another related definition is correlation coefficient p(X,Y)= Cov(X,Y) √Var(X) Var(Y) It can be proved that the correlation coefficient p(X, Y) always lies between −1 and +1. In this problem, you need to finish the following tasks: (2.1) X and Y are two independent standard normal random variables. We now define another random variable Z by Z = pX+√√/1 − p²Y, where p ¤ [−1, 1]. Prove that p(X, Z) = p. (2.2) Write a short program to numerically verify p(X, Z) = p. Specifically, you need to 1 (a) write a standard normal random variable generator. (b) generate 200 samples of X and Y. (c) generate the samples of Z using the formula and the samples of X and Y. Please use 0.5 as the correlation p. (d) calculate the sample correlation coefficient p(X, Z) based on the samples of X and Z, and compare it with the theoretical value 0.5. Please put your source code and numerical test results in text files and submit them. You don't have to write your own normal random variable generator, and you can use third party code or built-in functions from your chosen programming language. Remarks: In mathematical finance, we very often need to generate correlated random variables. From this problem you should learn how to do this. Here we consider generating only two correlated random variables. It can be easily ex- tended to generate N correlated random variables. To do that, we need Cholesky decomposition http://en.wikipedia.org/wiki/Cholesky_decomposition. In case you are wondering how to prove −1≤ p(X,Y) ≤ 1, here is a simple proof. Let ux, ox be the mean and standard deviation of X, and My and ΟΥ be the mean and standard deviation of Y. It can be easily proved that p(V, W) Cov(V, W) = p(X, Y) where V X-μx and W Y-μY. Also we notice that Var(V + W) Var(V) ± 2Cov(V, W) + Var(W) ≥ 0. Since Var(V) = 1 and Var(W) = 1, we have −1 ≤ Cov(V, W) ≤ 1. σχ σy 3. (Implied Volatility Calculation, 10 marks) In this problem, you will gain some experience of dealing with real option trading data. First we need to extend the Black-Scholes formulas slightly. So far, we have assumed that the underlying asset doesn't pay dividends during the life of an option, and that there is no borrowing cost when short-selling the underlying asset. In practice, in most cases these two assumptions are not true; therefore, the Black-Scholes formulas have to be extended slightly. These materials will be covered in the coming lectures. For this problem, let's just use the formulas directly. We will denote the dividend information and borrowing cost (and other related terms) by a single parameter, repo rate q, and now the Black-Scholes formulas become: C(S, t) Se-q(T-)N(dı) – Ke-r(T-)N(d2), P(S,t) = Ke-¹(Tt) N(-d₂) - Se 9(T-¹) N(-d₁). d₁ d₂ = where N(x) is the cumulative density function of N(0, 1), and In(S/K) + (rq)(Tt) o√T-t In(S/K) + (r — q)(T – t) o√T-t = = = = 2 + 1 o√T-t, = √T-t. (1) (2) At the same time, the call-put parity formula becomes: C(S, t) – P(S, t) = Se¯¶(T-t) — Ke¯r(T−t). You are given a “marketdata.csv" file containing some real trading data of options on A50 ETF listed in Shanghai Stock Exchange. You can get the specifications of all instruments in the file "instruments.csv". For the time to maturity, you can calculate it by "(24-16)/365". You are asked to finish the following tasks: (3.1) (2 marks) Implement the algorithm presented in Lecture 4 to calculate implied volatilities with the extended Black-Scholes formulas (1)-(2). Note ac (o) ap(o) that the formulas for and also need to change to: до do Se-a(T-t)√T-tN'(d₁) ap(o) do The initial guess & changes to: ac (o) до ô = 2 = In So/K+ (r-q)(Tt) (3) T-t (3.2) (4 marks) Apply your algorithm to calculate the implied volatilities for both the bid prices and the ask prices. Specifically, you need: (3.2.1) calculate the bid/ask implied volatilities of all instruments at 09:31:00, 09:32:00, 09:33:00. Specifically, you take snapshots of the given market data at 09:31:00, 09:32:00, 09:33:00, respectively. Then for each snap- shot, you calculate the bid implied volatility and ask implied volatility of each instrument. Put your results in three separate csv files using the names "31.csv", "32.csv", and “33.csv” (this is to make our tutor's life easier, thank you). The csv files should have the following format: Strike, BidVolP, AskVolP, BidVolC, Ask VolC 1.9, If you notice that the implied volatility for some instrument is not achiev- able, put "NaN”. 3 (3.2.2) Put the results into three different plots one for each time point. For each plot, the x-axis should be the strike levels, and the y-axis should be implied volatilities. When calculating the implied volatilities, for the asset A50's spot price, you can use the average of the bid/ask prices. In the instrument.csv file, the symbol for A50 ETF is '510050'. You can assume the risk free interest rate is 4% and the repo rate is 20%. (3.3) (4 marks) The trading unit for buying/selling an option is 10000, and the transaction cost is about 3.3 RMBs per unit. You can assume that when you sell an option, there is no transaction cost. The transaction cost happens when you buy options. Using the non-arbitrage conditions you have learned so far, check whether you see any arbitrage opportunities in the data. You can consider two cases: one without any transaction cost, and the other one with the real transaction cost. You can assume there is no transaction cost for A50ETF. Write down your findings and submit them. Please submit your source code, results, plots, and your analysis for (3.3). Remarks: Here is how you take a snapshot of the market at a specific time. Let's say you want to do that at 09:31:00. Essentially you just need to observe the latest bid and ask prices of each instrument up to 09:31:00, e.g., some bid/ask prices might be last updated at 09:30:25. When you check an arbitrage opportunity, you can only assume that you buy an option at its ask price and sell an option at its bid price. 4