我试图获取>10年的数据,但我还不能找到如何使用getSymbols()或chartSeries()来实现这一点。
https://www.quantmod.com/documentation/getSymbols.html https://www.quantmod.com/documentation/chartSeries.html
还是雅虎只有2007-01-03年的数据?
library(quantmod)
getSymbols("AAPL")
chartSeries(AAPL, type="line", subset="last 15 years")
Warning message:
In last.xts(c(13.702, 13.346, 13.619, 13.65, 13.727, 15.045, 15.234, :
requested length is greater than original
chartSeries(AAPL, type="line", subset="last 11 years") # this works

发布于 2017-08-19 18:51:14
您需要将from设置为不同于默认值2007-01-01的值。
library(quantmod)
getSymbols("AAPL", from = "1990-01-01")
chartSeries(AAPL, type="line", subset="last 15 years")

https://stackoverflow.com/questions/45768016
复制相似问题