我正在尝试分解从雅虎财经下载的股票数据,以查看季节性,趋势等各种组件......但我收到错误时间序列没有或少于2个期间
以下是我正在使用的代码,请帮助:
require(quantmod)
getSymbols("IBM", from="2013-01-02", to="2014-12-31")
ibm = subset(IBM,select=c("IBM.Adjusted"))
write.table(ibm,"ibm.txt",row.names=F,sep="\t")
ibm2<-read.table("ibm.txt",header=T,sep="\t")
ibmtimeseries <- ts(ibm2,
frequency=365,
start=c(2013,1))
ibmtimeseriescomponents <-
decompose(ibmtimeseries)
ibmtimeseriescomponents <-
decompose(ibmtimeseries)
分解时出错(googtimeseries): 时间序列没有或少于2个时段