The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Using Collections

Marcelo Perlin

2023-02-16

Fetching collections of prices

Collections are just a bundle of tickers pre-organized in the package. For example, collection SP500 represents the current composition of the SP500 index.

The available collections are:

available_collections <- yfR::yf_get_available_collections(
  print_description = TRUE
  )
## 
## ── Description of Available Collections ──
## 
## ℹ SP500: The SP500 index (US MARKET) - Ticker = ^GSPC
## ℹ IBOV: The Ibovespa index (BR MARKET) - Ticker = ^BVSP
## ℹ FTSE: The FTSE index (UK MARKET) - Ticker = ^FTSE
## ℹ DOW: The DOW index (US MARKET) - Ticker = ^DJI
## ℹ testthat-collection: A (small) testing index for testthat() -- dev stuff, dont use it!
available_collections
## [1] "SP500"               "IBOV"                "FTSE"               
## [4] "DOW"                 "testthat-collection"

One can download the composition of the collection with yf_collection_get:

library(yfR)

# be patient, it takes a while
df_yf <- yf_collection_get("SP500")

head(df_yf)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.