【发布时间】:2017-09-26 03:53:30
【问题描述】:
我每周都使用此代码,但是,当我今天尝试它时,我得到了错误的 OHL 和 SPY 结果。调整后,查看收盘价和交易量,它们似乎正确,所以出了什么问题?
rm(list = ls())
options(scipen=999)
require(quantmod)
spy<-getSymbols("SPY", src = 'yahoo', from = '2007-05-31', auto.assign = T)
spy<-cbind(SPY)
dim(SPY)
head(SPY)
This the outcome from Yahoo:
Date Open High Low Close Adj Close* Volume
May 31, 2007 153.67 153.89 153.12 153.32 123.86 114,866,700
This is the outcome from the API( using quantmod):
SPY.Open SPY.High SPY.Low SPY.Close SPY.Volume SPY.Adjusted
2007-05-31 190.217 190.489 189.536 153.32 114866700 123.8624
【问题讨论】:
-
看起来像a bug。明天将进行更多调查。
-
兄弟,你得到答案了吗?我有同样的问题,不知道如何在工作 3 天后解决它。你能分享你的解决方案吗?非常感谢!