Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Font 2 Paragraph Styles 2 Question 2 Use RMarkdown and provide the code you used The Smarket data is part of the ISLR library. This

image text in transcribed
Font 2 Paragraph Styles 2 Question 2 Use RMarkdown and provide the code you used The Smarket data is part of the ISLR library. This data set consists of percentage returns for the S&P 500 stock index over 1,250 days, from the beginning of 2001 until the end of 2005. For each date, we have recorded the percentage returns for each of the five previous trading days, Lag1 through Lag5. We have also recorded Volume (the number of shares traded on the previous day, in billions), Today (the percentage return on the date in question) and Direction (whether the market was Up or Down on this date). Ft a logistic regression model in order to predict Direction using Lag1 through Lag5 and Volume. Hint: Use the data set to calculate the number (in percentage) of time the index went up. Split your data into a testing and training set, use cutoff of 0.3. Does your model outperform the current performance of the index? Justify your answer. If not, could you provide a better cutoff value? B ds Focus 58 items ere to search PL W O Font 2 Paragraph Styles 2 Question 2 Use RMarkdown and provide the code you used The Smarket data is part of the ISLR library. This data set consists of percentage returns for the S&P 500 stock index over 1,250 days, from the beginning of 2001 until the end of 2005. For each date, we have recorded the percentage returns for each of the five previous trading days, Lag1 through Lag5. We have also recorded Volume (the number of shares traded on the previous day, in billions), Today (the percentage return on the date in question) and Direction (whether the market was Up or Down on this date). Ft a logistic regression model in order to predict Direction using Lag1 through Lag5 and Volume. Hint: Use the data set to calculate the number (in percentage) of time the index went up. Split your data into a testing and training set, use cutoff of 0.3. Does your model outperform the current performance of the index? Justify your answer. If not, could you provide a better cutoff value? B ds Focus 58 items ere to search PL W O

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Research In Finance

Authors: John W. Kensinger

1st Edition

0857245414, 978-0857245410

Students also viewed these Finance questions

Question

What is BBRY's source of competitive advantage?

Answered: 1 week ago