getSymbols可以从雅虎获得期货数据吗?

时间:2015-03-12 14:37:48

标签: r

我尝试了以下代码:

library(quantmod)
getSymbols("GCH15.CMX",src="yahoo",from="2015-01-01")
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  : 
  cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=GCH15.CMX&a=0&b=01&c=2015&d=2&e=12&f=2015&g=d&q=q&y=0&z=GCH15.CMX&x=.csv'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :
  cannot open: HTTP status was '404 Not Found'

但我从雅虎那里得到了符号“GCH15.CMX”。我们可以使用以下链接获取信息:http://finance.yahoo.com/echarts?s=GCH15.CMX%20Interactive#%7B%22range%22%3A%225d%22%2C%22scale%22%3A%22linear%22%7D

getSymbols支持从雅虎获取期货数据吗?


行。经过几次与雅虎的尝试,我知道从雅虎获取期货数据是不可能的,因为雅虎不提供与股票一样的功能。真可惜...... :-(

1 个答案:

答案 0 :(得分:0)

没有。您无法从您提供的链接“获取”信息。getSymbols没有要检索的历史数据。