аЯрЁБс>ўџ :<ўџџџ9џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџьЅС'` №RПЅ9bjbj"9"92<@S@Sџ џџџџџџЄvvvvvvvЎЎЎЎЪюттттттттЌ
Ў
Ў
Ў
Ў
Ў
Ў
$hя в
vЌттЌЌв
vvттS
ЌvтvтЌ
ЌЌ
vv
тжУЗЯ"аЎF *
Ќ
i0
p
v
тЎ|
dp<тттв
в
тттЌЌЌЌ$ЎЎvvvvvvџџџџPlease write comments to all the parts of your code. They are a requirementand they will be graded.Part 1. Data gathering component (20 pts.)1. Download data on both options and equity for the following symbols: GOOG SPY VIXfor two consecutive days (does not matter when but both should be nolater than June 9th and avoid using Friday Monday as your two days)during the trading day (9:30am to 4:00pm). Please record the asset values(both GOOG and SPY) at the time when downloading is done. Please dothe same with the VIX. For the options please download the next maturityJune, July, and August.We shall refer to the data sets gathered in the two consecutive days asDATA1 (for the first day) and DATA2 (for the second day) respectivelythroughout this assignment and the following ones.Use as the sources for the data one of the following:(a) GOOGLE finance http://www.google.com/finance(b) Yahoo Finance http://finance.yahoo.com(c) BloombergFor the Bloomberg source access to one of Bloomberg terminals in the labis required. If you use Bloomberg data you may use the API to downloaddata in Excel automatically and organize the data.Regardless of the source, the data will have to be clean (no duplicatedvalues, only one exchange, every column labeled properly, in other wordsconsolidated).1Note on Bloomberg data. If you use R to interface with the Bloombergdata an useful package is Rbloomberghttp://cran.uvigo.es/web/packages/RBloomberg/index.htmlUseful documentation may be found athttp://www.findata.org/rbloomberg/rbloomberg-manual-0-4-144.pdf.Make certain that you have recorded and clearly labeled in your homework: The underlying equity or ETF price at the exact moment when therest of the data is downloaded. The short-term interest rate which may be obtained here:http://www.federalreserve.gov/releases/H15/Current/. There are alot of rates posted on the site - they are all yearly, they are in percents and need to be converted to numbers. There is no theoreticalrecommendation on which to use, I used to use 3-months Treasurybills which are not available anymore. Since then I have been usingthe Federal funds (effective) rate but you can go ahead and tryothers. You should remember to be consistent in your choice. Also,make sure that the interest rate that you use is for the same daywhen the data you use for the implied volatility was gathered andthat the data is quoted in percents (you will need numbers). Thesame site has a link to past (historical) interest rates. Time to Maturity. As you all know options mature in the thirdFriday of the respective month. Note that Mar 13 for example refersto the fact that the options expire in March 2013 not on the 13thof that month. This is important because it can make a differencewhen calculating the time to maturity T "t. The time to maturity isexpressed in years and may be calculated using calendar days (365)or trading days (252). Either way is fine for our purpose but doremember to be consistent in your choice.2. Write a paragraph describing the symbols you are downloading data for.Explain what is the SPY and its purpose. (Hint: look up the definition ofan ETF). Explain what is VIX and its purpose. Understand the optionssymbols. Understand when each option expires.Part 2. Analysis of the data.3. (5 pts.) Using your choice of computer programming language implementthe Black-Scholes formula as a function of current stock price S0, volatilityУ, time to expiration T "t (in years), strike price K and short-term interestrate r (annual). Please note that no toolbox function is allowed but youmay use the normal CDF calculation.4. (5 pts.) Perform sensitivity analysis on the parameters for the BlackScholes formula. See how small changes in each parameter effects the finalprice. Which parameters are the most sensitive (i.e. small change in the2parameter results in a large change in the final price) and which are themost robust (i.e. changes in the parameter results in only a small changein the final price.) Write a paragraph explaining your results and why youbelieve these parameters should behave in this manner.5. (5 pts.) Implement the Bisection method to find the root of arbitraryfunctions. Apply this method to calculate the implied volatility on thefirst day you downloaded (DATA1). For this purpose use as the optionvalue the average of bid and ask price if they both exist (and if theircorresponding volume is nonzero). Also use a tolerance level of 10"6.Average the implied volatilities for in-the-money, at-the-money, and outof-the-money strikes. Report these average implied volatilities. You needto do it for both the stock and the ETF data you have (you do not needto do this for VIX).Note. There is no clearly defined boundary between options at-the-moneyand out-of-the-money or in-the-money options. If we define moneynessas the ratio between S0 the stock price today and K the strike price ofthe option some people use values of moneyness between 0.95 and 1.05to define the options at the money. Yet, other authors use between 0.9and 1.1. Use these guidelines if you wish to determine which optionsimplied volatilities should be averaged. Whatever you use as your criteriaof moneyness, please clearly state it.Bonus 5 pts. Implement the Secant method to find the root of arbitraryfunctions. Apply this function to the same options as in the previousproblem. Compare the time it takes (either use the system clock or numberof iterations) to get the root with the same level of accuracy.6. (5pts.) Present a table reporting the implied volatility values obtained forevery maturity, option type and stock. Also compile the average volatilities as described in the previous point. Comment on the observed difference in values obtained for GOOG and SPY. Compare with the currentvalue of the VIX. Comment on what happens when the maturity increases.Comment on what happen when the options become in the money respectively out of the money.7. (12 pts.) Construct a binomial tree to calculate the values of the EuropeanCall option and one for the European Put option.8. (5 pts.) For synthetic data (i.e. parameters chosen by you, determinethe value of a call and put option using the Black-Scholes formula. Runyour binomial tree function for these same parameters for the values ofN = 5, 50, 100, 250, 500 and compile your results. By how much do eachof these binomial tree prices differ from that of the Black-Scholes formula?Summarize your results in a table and explain what the table means.39. (12 pts.) Next we will use the second dataset DATA2. For each strikeprice in the data use the Stock price for the same day, each of the averageimplied volatilites you calculated from DATA1 and the current short-terminterest rate (corresponding to the day on which DATA2 was gathered).First, use the Black-Scholes formula, to calculate the option price. Seconduse the binomial tree to calculate the same values for each volatility.10. (12 pts.) Implement a binomial tree to calculate the American option,both Call and Put. Repeat the steps in the previous problem and calculatethe respective option prices as if they are American.11. (10 pts.) Creaemзйорфц@ C lЕ(
@
Ъ
я
.z|моJЩщыЌЎЏбйwxямяЩяЩяЩяЖяІяІямяІяІяЩяЩяІяяЩяЖяpЩpямяp%hI!њ6B*CJOJQJ]aJphhI!њB*CJOJQJaJph%hI!њ6B*CJOJQJ]aJphhI!њB*
CJOJQJaJph%hI!њ6B*CJOJQJ]aJph%hI!њ6B*CJOJQJ]aJph%hI!њ5B*CJOJQJ\aJphhI!њB*CJOJQJaJph)Ѕ9§Ѕ9ўxy,026hlІЊф№ Б Г ""?&A&D&F&H&J&M&O&R&T&Ќ)4o5Ќ55И5072767P7T7r7v7|7~777япЬпЬЙЬпЬпЬпІяппЬяпЬппЬпЬпЬпЬпЬпппЬяпЬпЬпЬпЬhI!њB*CJOJQJaJphU%hI!њ5B*CJOJQJ\aJph%hI!њ6B*CJOJ
QJ
]aJph%hI!њ6B*CJOJQJ]aJph%hI!њ6B*CJOJQJ]aJphhI!њB*CJOJQJaJphhI!њB*CJOJ QJ aJph2te a table which contains the following columns: Bid andAsk values (from DATA 2), Black Scholes price, European and Americanprices calculated using the binomial tree. Use all of the average volatilitiesyou calculated. Write detailed comments about the observed differencesbetween the various option valuations and how they compare with theactual bid/ask values.Bonus: 10 pts, Strongly recommended as you will need the codeeventually Calculate the price of an American Up-and-In call option.This is an option that can be exercised at any time; but it will expireworthless unless by the expiration time the stock price would have hit thebarrier level. Use S0 = 10, strike K = 10, maturity T = 0.3, volatilityУ = 0.2, short rate r = 0.01, and barrier H = 11. Use as many steps inyour tree as you think are necessary (from what you learned previously inthe assignment)For the last problem I would read the algorithm in the book andtry and figure out if either: 1. I can figure out how to modifythe code there to work with the new option or 2. I try to findif there exist an easy to calculate relationship between the twooption types so that I can use the code in the book.4
7Є7І7Т7Ц7Ь7Ю7ю7ђ7n88Ў8э8ю8,9-9m9n9Ђ9Ѓ9Є9Ѕ9ямямямямяЩЙЩЙЩЙЩЙЩЙяЕhI!њhI!њB*CJOJQJaJph%hI!њ6B*CJOJQJ]aJph%hI!њ6B*CJOJQJ]aJphhI!њB*CJOJQJaJph0182PА. АЦA!А"А# $ %ААSАрЉJ@ёџJcke$1$a$ CJKH_HaJmH nHsH tH$A@ђџЁ$иЄЕk=W[SOBi@ѓџГBnfh