yf_collection_get {yfR} | R Documentation |
Downloads a collection of data from Yahoo Finance
Description
This function will use a set collection of YF data, such as index components
and will download all data from Yahoo Finance using yf_get
.
Usage
yf_collection_get(
collection,
first_date = Sys.Date() - 30,
last_date = Sys.Date(),
do_parallel = FALSE,
do_cache = TRUE,
cache_folder = yf_cachefolder_get(),
...
)
Arguments
collection |
A collection to fetch data (e.g. "SP500", "IBOV", "FTSE" ).
See function |
first_date |
The first date of query (Date or character as YYYY-MM-DD) |
last_date |
The last date of query (Date or character as YYYY-MM-DD) |
do_parallel |
Flag for using parallel or not (default = FALSE). Before using parallel, make sure you call function future::plan() first. See <https://furrr.futureverse.org/> for more details. |
do_cache |
Use cache system? (default = TRUE) |
cache_folder |
Where to save cache files? (default = yfR::yf_cachefolder_get() ) |
... |
Other arguments passed to |
Value
A data frame with financial prices from collection
Examples
df_yf <- yf_collection_get(collection = "IBOV",
first_date = Sys.Date() - 30,
last_date = Sys.Date()
)
[Package yfR version 1.1.0 Index]