View source: R/download_data_stock_prices.R
download_data_stock_prices | R Documentation |
Downloads historical stock data from Yahoo Finance for given symbols and date range.
download_data_stock_prices(symbols, start_date = NULL, end_date = NULL)
symbols |
A character vector of stock symbols to download data for. At least one symbol must be provided. |
start_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the start date for the data. If not provided, a subset of the dataset is returned. |
end_date |
Optional. A character string or Date object in "YYYY-MM-DD" format specifying the end date for the data. If not provided, a subset of the dataset is returned. |
A tibble containing the downloaded stock data with columns: symbol, date, volume, open, low, high, close, and adjusted_close.
download_data_stock_prices(c("AAPL", "MSFT"))
download_data_stock_prices("GOOGL", "2021-01-01", "2022-01-01" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.