全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管百科 爱问频道
757 0
2016-11-01
  最近在学习用R处理时间序列,最近碰到一个问题,求大神帮忙看看。
GSPC<-as.xts(get.hist.quote('^GSPC',start='1970-01-02',end='2009-09-15',
quote=c('Open','High','Low','Close','Volume','AdjClose')))#用get.hist.quote函数在yahoo上获取标准普尔500指数,并转化为xts类
candleChart(last(GSPC,'3 months'),theme='white',TA=NULL)#用candleChart函数画个K线图
画K线图出现错误于periodicity(x) : can not calculate periodicity of 1 observation
不太明白,分明是30年左右的数据怎么会只有一个时期的数据呢?



注:需要加载的程序包
library(lattice)
library(randomForest)
library(tseries)
library(quantmod)
library(quadprog)
library(xts)
library(zoo)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群