# Calculating Daily Returns with Quantmod for R

#### physEcon

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.

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]
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!

Replies
3
Views
828
Replies
0
Views
1K
Replies
6
Views
4K
Replies
18
Views
30K
Replies
5
Views
7K