This function returns weights and constituents for a specified MSCI index.

msci_indicies_constituents(
  indicies = NULL,
  nest_data = TRUE,
  return_message = TRUE
)

Arguments

indicies

vector of indicies

  • NULL: returns all indicies (default)

  • index: index name

nest_data

TRUE return nested data frame

return_message

TRUE return a message after data import

Value

nested tibble or tibble if nest_data = FALSE

References

MSCI Inc

See also

Examples

library(stringr)
df_msci_indicies <-
msci_indicies()
## Get all technology indicies and their constituents
tech_indicies <-
df_msci_indicies %>%
filter(nameIndex %>% str_detect('TECH')) %>%
.$nameIndex
msci_indicies_constituents(indicies = tech_indicies, nest_data = TRUE, return_message  = TRUE)
msci_indicies_constituents(indicies = "NORTH AMERICA", nest_data = FALSE, return_message = TRUE)#'
msci_indicies_constituents(indicies = NULL, nest_data = TRUE, return_message = TRUE)