How can i see all available data series from quantmod package?

为君一笑 提交于 2019-12-03 06:22:47

问题


How to show which list of all quotes / data series available for example with getSymbols from Yahoo?


回答1:


I don't know of a way. The TTR package has a function (stockSymbols) to download all the current symbols from the NYSE, AMEX, and NASDAQ. It tries to put them in an acceptable format for Yahoo, but there's no guarantee that the 6,000+ symbols it retrieves have data on Yahoo. I'm not sure what to do for other exchanges...

> library(TTR)
> x <- stockSymbols()
Fetching AMEX symbols...
Fetching NASDAQ symbols...
Fetching NYSE symbols...
> str(x)
'data.frame':   6473 obs. of  8 variables:
 $ Symbol   : chr  "ADK" "ADK-WT" "AFP" "AIM" ...
 $ Name     : chr  "Adcare Health Systems Inc" "Adcare Health Systems Inc" "United Capital Corporation" "Aerosonic Corporation" ...
 $ LastSale : num  4.12 2.1 30 2.73 2.7 ...
 $ MarketCap: num  3.28e+07 0.00 2.68e+08 1.02e+07 9.29e+07 ...
 $ IPOyear  : num  NA NA 1973 NA NA ...
 $ Sector   : chr  "Health Care" "n/a" "Capital Goods" "Capital Goods" ...
 $ Industry : chr  "Hospital/Nursing Management" "n/a" "Metal Fabrications" "Industrial Machinery/Components" ...
 $ Exchange : chr  "AMEX" "AMEX" "AMEX" "AMEX" ...


来源:https://stackoverflow.com/questions/4219308/how-can-i-see-all-available-data-series-from-quantmod-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!