## 5.7 Problems: Descriptive Statistics

Exercise 5.1 Compute time plots with ggplot2 function autoplot()
Exercise 5.2 In this question, you will compute descriptive statistics for the continuously compounded monthly return data on the Vanguard long term bond index fund (VBLTX), Fidelity Magellan stock mutual fund (FMAGX), and Starbucks stock (SBUX). You will use the R packages corrplot, IntroCompFinR, PerformanceAnalytics, tseries and zoo.
1. Use the tseries function get.hist.quote() to download from Yahoo! the monthly adjusted closing prices on VBLTX, FMAGX and SBUX over the period 1998-01-01 through 2009-12-31. Download these prices as "zoo" objects.
2. Use the PerformanceAnalytics function Return.calculate() to compute continuously compounded monthly returns and remove the first NA observation.
2. Univariate graphical analysis.
1. Make time plots of the return data using the zoo function plot.zoo(). Comment on any relationships between the returns suggested by the plots. Pay particular attention to the behavior of returns toward the end of 2008 at the beginning of the financial crisis.
2. Make a equity curve/cumulative return plot (future of $1 invested in each asset) and comment. Which assets gave the best and worst future values over the investment horizon? 3. For each return series, use the IntroCompFinR function fourPanelPlot() to make a four-panel plot containing a histogram, boxplot, normal QQ-plot, and SACF plot. Do the return series look normally distributed? Briefly compare the return distributions. Do you see any evidence of time dependence in the returns? 3. Univariate numerical summary statistics and historical VaR. 1. Compute numerical descriptive statistics for all assets using the R functions summary(), mean(), var(), stdev(), and the PerformanceAnalytics functions skewness() and kurtosis(). Compare and contrast the descriptive statistics for the three assets. Which asset appears to be the riskiest asset? 2. Using the mean monthly return for each asset, compute an estimate of the annual continuously compounded return (i.e., recall the relationship between the expected monthly cc return and the expected annual cc return). Convert this annual continuously compounded return into a simple annual return. Are there any surprises? 3. Using the estimate of the monthly return standard deviation for each asset, compute an estimate of the annual return standard deviation. Briefly comment on the magnitude of the annual standard deviations. 4. For each asset compute the empirical 1% and 5% quantiles of the cc returns. Using these quantiles compute the 1% and 5% historical (monthly) VaR values based on an initial$100,000 investment. Which asset has the highest and lowest VaR values? Are you surprised?
4. Bivariate graphical analysis and numerical summary statistics
1. Use the R pairs() function to create all pair-wise scatterplots of returns Comment on the direction and strength of the linear relationships in these plots.
2. Use the corrplot functions corrplot() and corrplot.mixed() to plot the correlation matrix of the returns on the three assets.
3. Use the R functions var(), cov(), and cor() to compute the sample covariance matrix and sample correlation matrix of the returns. Comment on the direction and strength of the linear relationships suggested by the values of the covariances and correlations.
Exercise 5.3 In this question, you will compute descriptive statistics for the continuously compounded weekly return data on the Vanguard long term bond index fund (VBLTX), Fidelity Magellan stock mutual fund (FMAGX), and Starbucks stock (SBUX). Repeat the analysis for the monthly returns but use instead weekly returns computed from end-of-week adjusted closing prices.
Exercise 5.4 In this question, you will compute descriptive statistics for the continuously compounded daily return data on the Vanguard long term bond index fund (VBLTX), Fidelity Magellan stock mutual fund (FMAGX), and Starbucks stock (SBUX). Repeat the analysis for the monthly returns but use instead daily returns computed from end-of-day adjusted closing prices.
Exercise 5.5 In this problem you will analyze the monthly simple returns on the Vanguard S&P 500 index (VFINX) and Amazon stock (AMZN) over the 5-year period January 2010, through January 2015. For this period there are T=60 monthly returns. The monthly prices for VFINX are in the IntroCompFinR object VangardPrices and the daily prices for AMZN are in the IntroCompFinR object .
1. Compute simple monthly returns on AMZN and VFINX and plot these returns together in a single plot. Do the monthly returns from the two assets look like realizations from a covariance stationary stochastic process? Why or why not?
2. Compare and contrast the return characteristics of the two assets. In addition, comment on any common features, if any, of the two return series.
3. Plot the cumulative simple returns (equity curve) for each fund, which represents the growth of \$1 invested in each fund over the sample period, and plot these returns in the same graph. Which fund performed better over the sample?
4. Using the IntroCompFinR function fourPanelPlot(), create descriptive statistics plots for each asset. In addition, compute Based on statistics, do the returns on VFINX and AMZN look normally distributed? Is there any evidence of linear time dependence? Briefly justify your answer.