如何从 quantmod 包中查看所有可用数据系列? [英] How can i see all available data series from quantmod package?

查看:67
本文介绍了如何从 quantmod 包中查看所有可用数据系列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用来自 Yahoo 的 getSymbols 显示可用的所有报价/数据系列的列表?

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

推荐答案

我不知道有什么办法.TTR 包有一个函数 (stockSymbols) 可以从 NYSE、AMEX 和 NASDAQ 下载所有当前的交易品种.它试图将它们放在雅虎可接受的格式中,但不能保证它检索的 6,000 多个符号在雅虎上有数据.我不确定要为其他交易所做什么...

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" ...

这篇关于如何从 quantmod 包中查看所有可用数据系列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆