来自quantmod包的yahoo的API和getQuote用于结束“* .MC”的代码

时间:2014-01-14 17:44:03

标签: r quantmod yahoo-finance

我使用quantmod的函数getQuote获得了对一堆股票的最后报价。我尝试使用* .MI形式的符号,并获得他们的报价没有任何问题。但是,当处理* .MC形式的代码时会出现错误,尽管符号和信息存在,例如可以通过VISEBRO看到。有谁知道API中包含的信息是否与网站上显示的信息不同?有没有人知道如何克服这个问题?

library(quantmod)

# note than VIS is a different equity than VIS.MC
getQuote('VIS.MC', what='b2')
getQuote('EBRO.MC', what='b2')

1 个答案:

答案 0 :(得分:1)

目前,可能无法通过yahoo finance API下载西班牙语交易所的报价。

在评论部分here中搜索“MC”会产生:

ERROSELL
October 7, 2013 at 2:45 am
I have a problem in order to obtain data from exchange .MC (Madrid)

SANDRO GIANGRANDI
October 7, 2013 at 7:03 am
I understand that ALL stock quotes from the spanish exchange are not available.
my feeling is that spanish quotes are available on payment, so Yahoo cannot make them available free of charge.
if you get the historical prices, no problem at all.
I am not sure to have solved your problem, but it is the same problem I faced some time ago.

另外,here

Yahoo Product Support (Admin, Yahoo) responded Dec 21, 2012
Dear Hector,

We regret to inform you that Spanish stocks are no longer available for download.

Our catalog of downloads continues to offer a broad range of stocks to choose from and we hope you will continue to be a consumer of it.

Y! Product Support

因此,当'VIS.MC'符号存在但不能下载时出现错误:

Error in download.file(paste("http://finance.yahoo.com/d/quotes.csv?s=",  : 
cannot open URL 'http://finance.yahoo.com/d/quotes.csv?s=VIS.MC&f=d1t1b2'
相关问题