Description Usage Format Source Examples
Data runs from 1950 to near the end of 2018.
1 | data("sp500_1950_2018")
|
A data frame with 17346 observations on the following 7 variables.
DateDate of the form "YYYY-MM-DD".
OpenOpening price.
HighHighest price of the day.
LowLowest price of the day.
CloseClosing price of the day.
Adj.CloseAdjusted price at close after accounting for dividends paid out.
VolumeTrading volume.
1 2 3 4 5 | data(sp500_1950_2018)
sp500.ten.years <- subset(sp500_1950_2018,
"2009-01-01" <= as.Date(Date) & as.Date(Date) <= "2018-12-31")
d <- diff(sp500.ten.years$Adj.Close)
mean(d > 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.