[R-SIG-Finance] Using adf.test to test time series stationarity of stock price
Yitao Zhang
yitaoz at stanford.edu
Mon Apr 22 01:28:31 CEST 2013
Hey guys,
I'm trying to do a augmented Dickey-Fuller test to test the stationarity of a stock price.
library(quantmod)
library(tseries)
stock2=getSymbols("PEP", src="yahoo", from= '2005-6-01', to ='2012-6-21', auto.assign=FALSE)
adf.test(stock2[,1])
Results:
Augmented Dickey-Fuller Test
data: stock2[, 1]
Dickey-Fuller = 2.7174, Lag order = 12, p-value = 0.99
alternative hypothesis: stationary
Warning message:
In adf.test(stock2[, 1]) : p-value greater than printed p-value
My results has a warning of p value greater than printed p value. Is this normal? Also I've tried various stocks but it doesn't ever go below 0.99. Would love to know what you guys think.
--
Yitao Zhang
Stanford University '14
B.A. in Economics
(650)-391-6966 | yitaoz at stanford.edu
More information about the R-SIG-Finance
mailing list