Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
MF 703: Programming for Mathematical Finance
Due: Thursday, September 30th, by 4pm. 1. Sector ETF Factor Modeling: Consider again the following universe of ETFs: Ticker Description SPY S&P Index XLB Materials XLE Energy XLF Financials XLI Industrials XLK Technology XLP Consumer Staples XLU Utilities XLV Healthcare XLY Consumer Discretionary (a) Download historical data on the Fama-French factors from Ken French’s website and write a piece of code that parses them into a Python dataframe (or other similar structure). Validate and clean data. (b) Calculate the daily covariance matrix of the factor returns over the entire time period. Are the factors highly correlated? Compare these correlations to the correlations of the sector ETFs that you calculated in HW2. Are they more or less correlated? (c) Calculate rolling 90 day correlations for the factor returns. Are they stable over time? Are they more stable than the correlations of the ETFs from HW2? (d) Check the factor returns for normality using your favorite test. Do the factor returns appear normal? (e) Consider a multi-factor model for the sector ETFs using the Fama French return data as variables. That is: ri,t = β1rmkt,t + β2rsize,t + β3rbtm,t + i,t (1) NOTE: This is the 3-factor Fama-French model. You may also choose to use a different set of Fama-French factors available on Ken French’s website. For each sector ETF, compute it’s β to the Fama-French factors using the above model. Compute the β for the entire historical period and also compute rolling 90-day β’s. Are 1 these β’s more consistent than the single factor model β’s that you obtained in your first homework? (f) Compute the daily residuals i,t in (1) for each sector ETF. What is their mean and variance? Do they appear to be normal? What does this tell you about the appro- priateness of the model? Can you think of any other tests of the residuals that would help you judge the model? 2. Exotic Option Pricing via Simulation Consider again a one-year fixed strike lookback option which enables the buyer to choose the point of exercise for the option at its expiry. The Bachelier model can be written as: dSt = r dt+ σ dWt (2) Assume that r = 0, S0 = 100 and σ = 10.0. (a) Generate a series of normally distributed random numbers and use these to generate simulated paths for the underlying asset. (b) Plot a histogram of the ending values of the asset price along the simulated paths. Are the ending values of your simulated paths normally distributed? Check using your favorite normality test. (c) Calculate a simulation approximation to the price of a Lookback put option with strike 100 under the Bachelier model. Compare the price of the lookback option in the Bachelier model to the Black-Scholes model price obtained in HW2. (d) Calculate the delta of the lookback option using finite differences as discussed in class. That is: ∆ ≈ c0(S0 + )− c0(S0 − ) 2 (3) Try for several values of and plot the calculated ∆ against the choice of . Comment on what you think is the optimal value of and what values lead to the largest amounts of error. NOTE: All code for completing these exercises should be completed either in Python or C++ and should be written generically. You may end up using this code on future assignments so I encourage you to code thoughtfully.