[R]

Gabor Grothendieck ggrothendieck at myway.com
Wed Jan 7 04:57:08 CET 2004


One thing to watch out for is adjustments:

- if the data is not adjusted for dividends and splits then
you may be able to just download data since your last download
yourself but depending on what you want to do with the data you 
may get misleading results.

For example, if the stock trades at $100 and there is a 2 for 1
split then the next day there will be twice as many shares with
each share at $50.  If the stock does not move that day then
the unadjusted return is -50% whereas the adjusted return is 0%.

- if the data _is_ adjusted for splits and dividends you will 
still have this problem if you just add new data onto the end
of the old data you downloaded.   For example, if you use the 
data you downloaded yesterday and then just download today's
data today then you will have the exact same problem as cited 
above even if the data is adjusted since you are using yesterday's
data for the prior days which was only adjusted today and you did
not re-download that.

To get around this you would have to at least redownload
yesterday's and today's data and compare yesterday's data with
the data for yesterday that you downloaded yesterday.  If 
they are not equal then adjustments are necessary and you would 
have to redownload all the data.

I don't know whether the data you are using it adjusted or 
unadjusted but be careful of these subtle problems.

---
Date: Mon, 5 Jan 2004 20:38:00 -0500 (EST) 
From: Ashutosh Tayshete <apt2003 at columbia.edu>
To: <r-help at stat.math.ethz.ch> 
Subject: [R] "Smart update" utility (or coding) for data files 

 
 
Hi,

I am a new user of R and this is my first e-mail here. Please enlighten me
on any etiquette issues I may have overstepped on.

My questions is as follows:

I need to do some data analysis for data from .csv files for stocks
(that I have obtained from yahoo)

How can I do a "smart update" of this data from Yahoo (or any other
site if you wish), so that in some way, I do not have to go and download
the new data from Excel every day.

I am running my code from a script file. So every time I start the program
I'd like the data to be up-to-date (ofcourse I shall be connected to the
internet.) Is there a utility I can download for this? If not, any hints
on how to code this will be appreciated.

many thanks
A

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list