如何保存 get.hist.quote 的交易日期

how to save the trading- date from get.hist.quote

嗨,我用 get.hist.quote 下载数据,用 "coredata" 我节省了间谍的价格。相反,如何将 2006-12 期间的交易日期保存在向量中?

library(tseries)
library(zoo)
SPY <- get.hist.quote("SPY",start = "2006-01-02",end = "2011-01-01",quote = "AdjClose", compression = "d",retclass = c("zoo","ts"))
L<-length(SPY)
SPY <- get.hist.quote("SPY",start = "2006-01-02",end = "2012-01-01",quote = "AdjClose", compression = "d",retclass = c("zoo","ts"))
X <- length(SPY)

这是支持我的评论的测试代码:

dts <- as.Date( index(SPY), origin="2006-01-03")

> str(dts)
 Date[1:1259], format: "2006-01-03" "2006-01-04" "2006-01-05" "2006-01-06" "2006-01-09" "2006-01-10" "2006-01-11" "2006-01-12" "2006-01-13" ...
> max(dts)
[1] "2010-12-31"