Hello folks,
I am new to R and am working on a school project and have using trying to test ACF test, the following code works unit the point ACF testing. I get the error as " Error in na.fail.default(as.ts(x)) : missing values in object" . this is using quantmod only. Please advise me as to how to fix this. thank you in advance .
My understand is the log return for the first date is missing. Please make corrections
AAPL.Adjusted
2007-01-03 NA
2007-01-04 0.021952724
2007-01-05 -0.007146586
2007-01-08 0.004926015
2007-01-09 0.079799289
2007-01-10 0.046746206
library(quantmod)
getSymbols("AAPL")
AAPL.rtn=diff(log(AAPL$AAPL.Adjusted))
t.test(AAPL.rtn)
acf(AAPL.rtn)
Error in na.fail.default(as.ts(x)) : missing values in object
thank you,