powered by
This function downloads stock data from https://finance.yahoo.com/.
download_data( symbol, from = "1902-01-01", to = Sys.Date(), file = NULL, verbose = TRUE )
A data.frame if file = NULL.
data.frame
file = NULL
A character, the stock's symbol. It must match the identifier on https://finance.yahoo.com/.
character
A character, a date in format "YYYY-MM-DD", setting the lower data bound. Must not be earlier than "1902-01-01" (default).
"YYYY-MM-DD"
"1902-01-01"
A character, a date in format "YYYY-MM-DD", setting the upper data bound. Default is the current date Sys.date().
Sys.date()
Either
NULL (default) to return the data as a data.frame,
NULL
or a character, the name of the file where the data is saved as a .csv-file.
.csv
Set to TRUE to return information about download success.
TRUE
The downloaded data has the following columns:
Date: The date.
Date
Open: Opening price.
Open
High: Highest price.
High
Low: Lowest price.
Low
Close: Close price adjusted for splits.
Close
Adj.Close: Close price adjusted for dividends and splits.
Adj.Close
Volume: Trade volume.
Volume
### download 21st century DAX data data <- download_data(symbol = "^GDAXI", from = "2000-01-03") head(data)
Run the code above in your browser using DataLab