时间序列 R语言考试基本代码.docVIP

  • 1
  • 0
  • 约7.77千字
  • 约 10页
  • 2023-05-04 发布于湖北
  • 举报
典型例题 HW2——5 HW3——3,4 HW4—— EXAM14,15——VAR library(quantmod) getSymbols(AAPL,from=2008-01-03,to=2015-01-28) dim(AAPL) head(AAPL) tail(AAPL) chartSeries(AAPL,theme=white) % Obtain time plot of closing price and trading volume da - read.csv(d-vix0411.csv,header=T)%有时候不用header参数,看head(da)的数据形式 da - read.table(d-vix0411.txt,header=T) AAPL.rtn=diff(log(AAPL$AAPL.Adjusted)) % Compute log returns unrate - as.numeric(UNRATE[,1]) % Use a regular vector, instead of an“xts”object library(fBasics) ts.plot(ibm,main=Monthly IBM simple returns: 1968-2015) % Time plot basicStats(ibm) apply(rtn,2,basicS

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档