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
Using adf.test to test time series stationarity of stock price
2 messages · Yitao Zhang, Brian G. Peterson
On 04/21/2013 06:28 PM, Yitao Zhang wrote:
Hey guys, I'm trying to do a augmented Dickey-Fuller test to test the stationarity of a stock price.
With your stated economics background, one would assume that you'd realize that price is almost never stationary. Perhaps try on returns?
Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock