On this Picostat.com statistics page, you will find information about the Smarket data set which pertains to S&P Stock Market Data. The Smarket data set is found in the ISLR R package. You can load the Smarket data set in R by issuing the following command at the console data("Smarket"). This will load the data into a variable called Smarket. If R says the Smarket 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 Smarket R data set. The size of this file is about 70,464 bytes.
S&P Stock Market Data
Daily percentage returns for the S&P 500 stock index
between 2001 and 2005.
A data frame with 1250 observations on the following 9 variables.
The year that the observation was recorded
Percentage return for previous day
Percentage return for 2 days previous
Percentage return for 3 days previous
Percentage return for 4 days previous
Percentage return for 5 days previous
Volume of shares traded (number of daily shares
traded in billions)
Percentage return for today
A factor with levels
Up indicating whether the market had a positive or negative
return on a given day
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,
Springer-Verlag, New York
Dataset imported from https://www.r-project.org.