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

Dirk Eddelbuettel edd at debian.org
Wed Feb 2 01:49:54 CET 2011


On 1 February 2011 at 18:33, Lui ## wrote:
| 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...).

R> library(quantmod)
Loading required package: Defaults
Loading required package: xts
Loading required package: TTR
R> head(getSymbols("IBM", auto.assign=FALSE))
           IBM.Open IBM.High IBM.Low IBM.Close IBM.Volume IBM.Adjusted
2007-01-03    97.18    98.40   96.26     97.27    9196800        90.69
2007-01-04    97.25    98.79   96.88     98.31   10524500        91.66
2007-01-05    97.60    97.95   96.91     97.42    7221300        90.83
2007-01-08    98.50    99.50   98.35     98.90   10340000        92.21
2007-01-09    99.08   100.33   99.07    100.07   11108200        93.30
2007-01-10    98.50    99.05   97.93     98.89    8744800        92.20
R> 

Note the last column above. At it seems to work the same way for German
stocks, modulo possible errors on holidays -- here is Siemens for you:

R> head(getSymbols("SIE.DE", auto.assign=FALSE))
           SIE.DE.Open SIE.DE.High SIE.DE.Low SIE.DE.Close SIE.DE.Volume SIE.DE.Adjusted
2007-01-01       75.14       75.14      75.14        75.14             0           67.40
2007-01-02       76.15       76.25      75.51        75.93       3112300           68.11
2007-01-03       75.85       75.99      75.29        75.51       3612800           67.74
2007-01-04       75.20       75.95      74.98        75.55       4653500           67.77
2007-01-05       75.23       76.40      75.20        75.32       5660700           67.56
2007-01-08       75.78       76.25      74.96        75.45       4412500           67.68
R> 

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-SIG-Finance mailing list