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
yf_get_available_collections
for finding all available collections- 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
yf_get