R Dataset / Package ISLR / Weekly


On this R-data statistics page, you will find information about the Weekly data set which pertains to Weekly S&P Stock Market Data. The Weekly data set is found in the ISLR R package. You can load the Weekly data set in R by issuing the following command at the console data("Weekly"). This will load the data into a variable called Weekly. If R says the Weekly data set is not found, you can try installing the package by issuing this command install.packages("ISLR") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the Weekly R data set. The size of this file is about 62,683 bytes.

Weekly S&P Stock Market Data


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




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


The year that the observation was recorded


Percentage return for previous week


Percentage return for 2 weeks previous


Percentage return for 3 weeks previous


Percentage return for 4 weeks previous


Percentage return for 5 weeks previous


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


Percentage return for this week


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


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


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



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

Title Authored on Content type
OpenIntro Statistics Dataset - dream August 9, 2020 - 12:25 PM Dataset
OpenIntro Statistics Dataset - winery_cars August 9, 2020 - 2:38 PM Dataset
R Dataset / Package HSAUR / toothpaste March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HSAUR / pottery March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HistData / Guerry March 9, 2018 - 1:06 PM Dataset
Attachment Size
dataset-95529.csv 61.21 KB
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0

This documentation is licensed under GPLv3 or later.