如何显示所有引号/数据系列中的哪个列表,例如Yahoo的getSymbols?
最佳答案
我不知道TTR软件包具有功能(stockSymbols
),可以从NYSE,AMEX和NASDAQ下载所有当前代码。它试图将它们放在Yahoo可接受的格式中,但不能保证它检索的6,000多个符号上都有Yahoo上的数据。我不确定该如何进行其他交流...
> 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" ...