get_tickers() helps you to get the tickers of a specific stock index.
get_tickers(exchange)
| exchange | A desired exchange. Dee Details. |
|---|
A tibble with stocks' codes used in Yahoo Finance website.
Currently get_tickers supports the following stock indexes:
dow: Dow Jones Index (United States)
sp500: S&P 500 Index (United States)
nasdaq: Nasdaq Composite Index (United States)
nyse: NYSE Composite Index (United States)
amex: AMEX Composite Index (United States)
russell2000: Russell 2000 Index (United States)
ftse100: FTSE 100 Index (United Kingdom)
dax: Deutsche Boerse AG Index (Germany)
cac40: CAC 40 Index (France)
bel20: BEL 20 (Belgium)
topix: Topix Index (Tokyo)
hangseng: Hang Seng Index (Hong Kong)
sensex: BSE Sensex Index (India)
jakarta: Jakarta Stock Exchange Composite Index (Indonesia)
bursa: FTSE Bursa Malaysia KLCI Index (Malaysya)
nzx50: NZX 50 Index (New Zealand)
kospi: KOSPI Composite Index (South Korea)
taiex: TWSE Taiwan
tsx: Toronto Composite Index (Canada)
ibovespa: Ibovespa Index (Brazil)
ipc: BMV IPC Index (Mexico)
ipsa: IPSA Index (Chile)
merval: Merval Index (Argentina)
library(YahooTickers) # get the brazilian stocks index tickers get_tickers(ibovespa) #> Yahoo does not provide the Ibovespa Index components. Tickers been downloaded from: topforeignstocks.com. #> # A tibble: 81 × 1 #> tickers #> <chr> #> 1 WEGE3.SA.SA #> 2 EMBR3.SA.SA #> 3 AZUL4.SA.SA #> 4 CCRO3.SA.SA #> 5 ECOR3.SA.SA #> 6 GOLL4.SA.SA #> 7 RAIL3.SA.SA #> 8 BRFS3.SA.SA #> 9 JBSS3.SA.SA #> 10 MRFG3.SA.SA #> # … with 71 more rows # get the sp500 stocks tickers get_tickers(sp500) #> Yahoo does not provide the S&P 500 components. Tickers been downloaded from: en.wikipedia.org/wiki/List_of_S%26P_500_companies. #> # A tibble: 505 × 1 #> tickers #> <chr> #> 1 MMM #> 2 ABT #> 3 ABBV #> 4 ABMD #> 5 ACN #> 6 ATVI #> 7 ADBE #> 8 AMD #> 9 AAP #> 10 AES #> # … with 495 more rows # The exchange argument should be unquoted. This throws an error. # get_tickers("sp500")