Stock data. (17 marks) The weekly rates of return for ve stocks (JP Morgan, Citibank, Wells Fargo, Royal Dutch Shell, and ExxonMobil) listed on the New York Stock Exchange were determined for the period January 2004 through December 2005. The weekly rates of return are dened as (current week closing price-previous week closing price)/(previous week closing price), adjusted for stock splits and dividends. 2 The data are listed in the le stocks1.csv. The observations in 103 successive weeks appear to be independently distributed, but the rates of return across stocks are correlated, because as one expects, stocks tend to move together in response to general economic conditions. Hint. Use R for this question. Your answers must be presented in four decimal points x.xxxx for the mean and three decimal points x.xxx for all other calculations. Use princomp for PCA in this scenario. (a) Obtain the sample mean vector, the sample covariance matrix of the observations and a scatterplot matrix for the dataset. Comment on the results. (3 marks) (b) Using the standardised variables (scaled), obtain the sample principal components for the data. Interpret the results. (4 marks) (c) Construct a scree and cumulative variance in a single plot. Comment on the results. (2 marks) (d) Show score plots of the rst two PCs along with observations and the components. Comment on the results. (3 marks) (e) Determine the proportion of the total sample variance explained by the rst two principal components. Interpret these components. (2 marks) (f) Given the results in (c)-(e), do you think that the stock rates-of-return data can be summarized in fewer than ve dimensions? Explain. (3 marks)
3. Stock data. (17 marks) The weekly rates of return for five stocks (JP Morgan, Citibank, Wells Fargo, Royal Dutch Shell, and Exxon Mobil) listed on the New York Stock Exchange were determined for the period January 2004 through December 2005. The weekly rates of return are defined as (current week closing price-previous week closing price)/(previous week closing price), adjusted for stock splits and dividends.