Question
Using r studio. using weekly S&P stock market date(ISRL) This question should be answered using the Weekly data set, which is part of the ISLR
Using r studio. using weekly S&P stock market date(ISRL)
This question should be answered using the Weekly data set, which is part of the ISLR package. Weekly percentage returns for the S&P 500 stock index between 1990 and 2010. (To learn more about the data in the help section in R search for Weekly S&P Stock Market Data).
a. Produce somegraphical summaries of the Weekly data. Do there appear to be any patterns?
b. Use the full data set to perform a logistic regression with Direction as the response and the five lag variables plus Volume
as predictors. Use the summary function to print the results. Do the predictors appear to be statistically significant? If so, which ones?
c. Split the sample between training and test data and evaluate the forecast accuracy of the model from part b). Compare the forecast accuracy with the model that includes Lag 2 as the only predictor. (cross validation method). Which model would you choose to predict the Direction of weekly returns?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started