First, I am still quite the novice when it comes to R in general.
I am finding some odd results with quantmod's functions for daily returns.
Start with the following code:
Then I perform the following:
Can somebody help me with this one? Is it a rounding issue?
Thanks!
I am finding some odd results with quantmod's functions for daily returns.
Start with the following code:
Code:
getSymbols('QQQ',src='yahoo')
testRet<-allReturns(QQQ,type='arithmetic')
Then I perform the following:
Code:
> testRet[2]
daily weekly monthly quarterly
2007-01-04 0.01896392 NA NA NA
> QQQ$QQQ.Adjusted[2]
QQQ.Adjusted
2007-01-04 42.97
> QQQ$QQQ.Adjusted[1]
QQQ.Adjusted
2007-01-03 42.17
> (42.97-42.17)/42.17
[1] 0.01897083
Can somebody help me with this one? Is it a rounding issue?
Thanks!