【发布时间】:2019-02-27 17:06:41
【问题描述】:
今天(2019-2-27),发现几乎所有在沪/深上市的中国公司的股票价格都无法通过quantmod中的“getSymbols”功能完全下载,总是产生数据缺失的警告信息。然而,美国公司和在美国上市的中国公司均未受到影响。据我所知,这是我第一次遇到这个问题。我在想这个过程的哪些部分出了问题。雅虎金融数据库或getSymbols???我尝试的例子实际上是一些最大的公司,所以我假设他们的股票数据是完全可用的。
> getSymbols("BABA") ### Alibaba listed in US, not affected
[1] "BABA"
> getSymbols("BILI")
[1] "BILI"
> getSymbols("0700.hk") ### Tencent listed in HK, affected.
[1] "0700.HK"
Warning message:
0700.hk contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
> getSymbols("601398.SS")
[1] "601398.SS"
Warning message:
601398.SS contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
> getSymbols("601318.SS")
[1] "601318.SS"
Warning message:
601318.SS contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
【问题讨论】:
标签: r quantmod yahoo-finance