Today we will use R astsa (Applied Statistical Time Series Analysis) library to analyze data and predict it with ARIMA model.
Load the data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
library(curl) library(quantmod) library(rusquant) library(xts) library(utils) # ASTSA lib is for ARIMA library(astsa) # Load the data price.ohlc <- getSymbols("SBER", from = Sys.Date()-1, to = Sys.Date(), src = "Finam", period = "1min", auto.assign = FALSE) price.cl <- Cl(price.ohlc) # Display close price on plot plot(price.cl) |
Look at ACF and PACF
Compare auto correlation and partial autocorrelation functions for diff data
1 |
asf2(na.omit(diff(price.cl)) |
Output: Continue reading