Python或者c++代写-MF 703
时间:2021-09-23

MF 703: Programming for Mathematical Finance Professor Chris Kelliher Fall 2021 Problem set # 2 Due: Thursday, September 24h, by 4pm ET 1. Historical Analysis of Sector 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 price data from January 1st 2010 for the following ETFs on ya- hoo finance or another site of your choice. Clean/check the data for splits and other anomalies. (b) Calculate the annualized return and standard deviation of each ETF (c) Calculate the covariance matrix of daily and monthly returns. Comment on the differ- ences in correlations at different frequencies. (d) Calculate a rolling 90-day correlation of each sector ETF with the S&P index. Do the correlations appear to be stable over time? What seems to cause them to vary the most? (e) Consider a single factor CAPM model where returns are composed of the market return and an idiosyncratic component: ri,t = βrmkt,t + i,t (1) For each sector ETF, compute it’s β to the market using the above model. This will require computing a linear regression on stock returns. Compute the β for the entire historical period and also compute rolling 90-day β’s. Are the β’s that you calculated consistent over the entire period? How do they compare to the rolling correlations? 1 (f) Compute the auto-correlation of each ETF by regressing each ETFs current days return against its previous days return: ri,t = αri,t−1 + i,t (2) Is there any evidence of auto-correlation in this ETF universe? Present the α’s for each ETF and comment on your results. 2. Exotic Option Pricing via Simulation Consider a one-year fixed strike lookback option which enables the buyer to choose the point of exercise for the option at its expiry. Recall that the dynamics of the Black-Scholes model can be written as: dSt = rSt dt+ σSt dWt (3) And that each Brownian motion increment dWt is normally distributed with mean zero and variance ∆t. Assume that r = 0, S0 = 100 and σ = 0.25. (a) Generate a series of normally distributed random numbers and use these to generate simulated paths for the underlying asset. What is the mean and variance of the terminal value of these paths? Does it appear to be consistent with the underlying dynamics? (b) Calculate the payoff of a European put option with strike 100 along all simulated paths. Make a histogram of the payoffs for the European option. What is the mean and standard deviation of the payoffs? (c) Calculate a simulation approximation to the price of a European put option by taking the average discounted payoff across all paths. (d) Compare the price of the European put option obtained via simulation to the price you obtain using the Black-Scholes formula. Comment on any difference between the two prices. (e) Calculate the payoff of a fixed strike lookback put option with stike 100 along all simulated path. (HINT: The option holder should exercise at the minimum price along each simulated path). Calculate the simulation price for the lookback option by averaging the discounted payoffs. (f) Calculate the premium that the buyer is charged for the extra optionality embedded in the lookback. When would this premium be highest? Lowest? Can it ever be negative? (g) Try a few different values of σ and comment on what happens to the price of the European, the Lookback option and the spread/premium between the two. 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. 2





































































学霸联盟


essay、essay代写