R programming questions?
Problem 1. Use the dataset “FourStocks_Daily2013”. Calculate the daily Log returns for four stocks.
(a) Plot the daily log returns of each stock over time. A widely held assumption in mathematical models of stock prices is that the corresponding log returns are independent and identically distributed. Do the plots show departures from this assumption?
(b) Use the returns data to estimate the mean return and standard deviation of returns. Assume the returns have a normal distribution. Simulate 100 days forward of stock price movement for each stock (10,000 iterations). Calculate the probability that the stock price will increase by 5% by the end of 100 days.
(c) For each stock show the Q-Q plot of the daily log returns and check the assumption of normality (use the Shapiro-Wild test and significant level of 5%).
(d) If the daily log returns do not have a normal distribution, compare the returns with some Student-t distributions with different degree freedom (at least 4 different degree freedom) and find a best fitted distribution.