R Dataset / Package ISLR / Weekly

Submitted by pmagunia on March 9, 2018 - 1:06 PM
Dataset License
GNU General Public License v2.0
Attachment Size
dataset-95529.csv 61.21 KB
Documentation

Weekly S&P Stock Market Data

Description

Weekly percentage returns for the S&P 500 stock index between 1990 and 2010.

Usage

Weekly

Format

A data frame with 1089 observations on the following 9 variables.

Year

The year that the observation was recorded

Lag1

Percentage return for previous week

Lag2

Percentage return for 2 weeks previous

Lag3

Percentage return for 3 weeks previous

Lag4

Percentage return for 4 weeks previous

Lag5

Percentage return for 5 weeks previous

Volume

Volume of shares traded (average number of daily shares traded in billions)

Today

Percentage return for this week

Direction

A factor with levels Down and Up indicating whether the market had a positive or negative return on a given week

Source

Raw values of the S&P 500 were obtained from Yahoo Finance and then converted to percentages and lagged.

References

Games, G., Witten, D., Hastie, T., and Tibshirani, R. (2013) An Introduction to Statistical Learning with applications in R, www.StatLearning.com, Springer-Verlag, New York

Examples

summary(Weekly)
lm(Today~Lag1+Lag2,data=Weekly)
--

Dataset imported from https://www.r-project.org.

Documentation License
GNU General Public License v2.0

From Around the Site...

Title Authored on Content type
anscombe February 26, 2017 - 11:28 AM Dataset
R Dataset / Package Ecdat / Bids March 9, 2018 - 1:06 PM Dataset
R Dataset / Package gap / fa March 9, 2018 - 1:06 PM Dataset
R Dataset / Package wooldridge / intdef March 9, 2018 - 1:06 PM Dataset
R Dataset / Package pscl / UKHouseOfCommons March 9, 2018 - 1:06 PM Dataset