Download SP500.xls from the course website. This file contains daily price of S&P500 between the December 3, 2012 and January 25, 2013. We first want to understand how the stock market performed in this period.
(i) Create a time series plot of S&P500 using Stata. Summarize your findings briefly.
Let St denote the price of S&P500 on date t. For example, S01/25/13 = 1502.96. Now for each day from 12/04/12 to 01/25/13, compute the daily return of S&P500 using the formula:
Rt = St -St-1 ×100 (%). St-1
Hint: Use generate command in Stata.
(ii) Calculate the sample mean and the sample median of the daily return of S&P 500.
(iii) What do you infer about the shape of the return distribution from the calculations in (ii)?
(iv) We want to create a frequency distribution with 10 intervals. Follow the rules in Sec 1.5 of the textbook to create a frequency distribution of the daily return.
(v) Create a histogram with 10 intervals. Summarize your findings briefly.
(vi) Based on your findings in (v), which do you think is better as a measure of central tendency: (a) the sample mean or (b) the sample median? Explain briefly.
(vii) In addition to the histogram in (v), create histograms with 3 intervals and 30 intervlas. Which one do you think best summaizes the return distribution? Explain briefly.
(viii) Calculate the variance, range, and IQR of Rt.