[R-SIG-Finance] Free Stock Quotes - Yahoo Finance & Adjusted Closing Prices

Lui ## lui.r.project at googlemail.com
Wed Feb 2 00:33:34 CET 2011


Dear Group,

I am looking for some freely available stock data on an adjusted basis
(as the stock data I got from other costly sources are neither
corrected for stock splits and dividends...).
I tried Yahoo and had the following code retrieve quotes for the DAX
and its companies (except BASF):

library(fImport)
library(its)

Daxstocks <- c("ADS.DE","ALV.DE","BAYN.DE","BEI.DE","BMW.DE","CBK.DE","DAI.DE","DBK.DE","DB1.DE","LHA.DE","DPW.DE","DTE.DE","EOAN.DE","FME.DE","FRE.DE","HEI.DE","HEN3.DE","IFX.DE","SDF.DE","LIN.DE","MAN.DE","MEO.DE","MRK.DE","MUV2.DE","RWE.DE","SAP.DE","SIE.DE","TKA.DE","VOW3.DE")
StockData <- yahooSeries(Daxstocks, from = "2003-01-01", to = "2011-02-01")

Reihen <- ncol(StockData) %/% 6
StockData.adj <- cbind(StockData[,6])
for (i in 2:Reihen){
StockData.adj <- cbind(StockData.adj,StockData[,6*i])
}

write.csv(StockData.adj,"Yahoo_DataImport.csv")
stocks <- its(StockData.adj)
plot(stocks)

The dataimport works well - however the adjustments do not always seem
reasonable to me... Several companies (e.g. Adidas - ADS.DE,
Beiersdorf - BEI.DE) have had a stock split - but its not reflected in
the adjusted price (only in the UNADJUSTED closing price). Did anybody
have a similar problem? Were the adjustments for splits are not made
for the quoted adjusted prices but seemingly for the unadjusted? I
thought that Yahoo might have mixed up the columns, but the
"unadjusted closing prices" sometimes is indeed unadjusted...
Does anybody have experience with Yahoo Finance data?
Or even better: Does anybody have a more reliable source of stock data
(preferably german stocks).
Thank you very much!
Have a nice week!

Lui



More information about the R-SIG-Finance mailing list