2014-01-14 22 views
0

我使用quantmod的函數getQuote得到了一堆股票的最後一個出價報價。例如,我嘗試使用形式爲* .MI的符號,並且無任何問題地得到它們的引號。但是,在處理表單* .MC的代碼時,雖然符號和信息存在,但可以看到錯誤,例如VISEBRO。有人知道API中包含的信息是否與網站上顯示的信息不同?有沒有人知道一種方法來克服這一點?雅虎的API和getQuote來自quantmod軟件包的結尾「* .MC」

library(quantmod) 

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

回答

1

目前可能無法通過雅虎財經API下載西班牙語交易報價。

在評論部分關於 'MC' A搜索here收率:

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'