Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. r(t) = a + Br(t-1) + e #where e is error
  2.  
  3. library(tseries)
  4. security<-"MMM"
  5. startDate<-"2012-06-01"
  6. endDate<-"2016-10-31"
  7. qte_list<-c("AdjClose")
  8.  
  9. price=get.hist.quote(instrument = security, startDate, endDate, quote = qte_list, provider = "yahoo" )
  10. ret<-diff(log(price[,1]))
  11.  
  12. fit<-arima(ret, order=c(1,0,0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement