[R-SIG-Finance] getSymbols problem in quantmod

Costas risk2009 at ath.forthnet.gr
Thu Dec 16 15:29:06 CET 2010


WRT my previous email, I am using R:

platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          12.0
year           2010
month          10
day            15
svn rev        53317
language       R
version.string R version 2.12.0 (2010-10-15)

On a windows XP machine....

I seems that the same code in a linux platform (Ubuntu) exhibits no such 
problem...

The data downloads ok...

So I assume it is a problem of the windows quantmod library....

I hope this helps...


On 16/12/2010 16:21, Costas wrote:
> Hi,
>
> It seems that getting SP500 daily prices before 1980 or so from 
> yahoo.finance via the getSymbols() in quantmod becomes problematic:
>
>> > getSymbols('^GSPC',src='yahoo',  from='1950-01-03', 
>> return.class='xts');tail(GSPC)
>> [1] "GSPC"
>>            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume 
>> GSPC.Adjusted
>> 2010-12-13   1242.52   1246.73  1240.34    1240.46  4361240000       
>> 1240.46
>> 2010-12-14   1241.84   1246.59  1238.17    1241.59  4132350000       
>> 1241.59
>> 2010-12-15   1241.58   1244.25  1234.01    1235.23  4407340000       
>> 1235.23
>> <NA>          100.18    100.74    99.36      99.85    
>> 13880000         99.85
>> <NA>           80.86     81.45    80.49      81.10     
>> 5070000         81.10
>> <NA>           18.05     18.05    18.05      18.05     
>> 2950000         18.05
>> > getSymbols('^GSPC',src='yahoo',  from='2010-01-03', 
>> return.class='xts');tail(GSPC)
>> [1] "GSPC"
>>            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume 
>> GSPC.Adjusted
>> 2010-12-08   1225.02   1228.93  1219.50    1228.28  4607590000       
>> 1228.28
>> 2010-12-09   1230.14   1234.71  1226.85    1233.00  4522510000       
>> 1233.00
>> 2010-12-10   1233.85   1240.40  1232.58    1240.40  4547310000       
>> 1240.40
>> 2010-12-13   1242.52   1246.73  1240.34    1240.46  4361240000       
>> 1240.46
>> 2010-12-14   1241.84   1246.59  1238.17    1241.59  4132350000       
>> 1241.59
>> 2010-12-15   1241.58   1244.25  1234.01    1235.23  4407340000       
>> 1235.23
>> > getSymbols('^GSPC',src='yahoo',  from='1990-01-03', 
>> return.class='xts');tail(GSPC)
>> [1] "GSPC"
>>            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume 
>> GSPC.Adjusted
>> 2010-12-08   1225.02   1228.93  1219.50    1228.28  4607590000       
>> 1228.28
>> 2010-12-09   1230.14   1234.71  1226.85    1233.00  4522510000       
>> 1233.00
>> 2010-12-10   1233.85   1240.40  1232.58    1240.40  4547310000       
>> 1240.40
>> 2010-12-13   1242.52   1246.73  1240.34    1240.46  4361240000       
>> 1240.46
>> 2010-12-14   1241.84   1246.59  1238.17    1241.59  4132350000       
>> 1241.59
>> 2010-12-15   1241.58   1244.25  1234.01    1235.23  4407340000       
>> 1235.23
>> > getSymbols('^GSPC',src='yahoo',  from='1980-01-03', 
>> return.class='xts');tail(GSPC)
>> [1] "GSPC"
>>            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume 
>> GSPC.Adjusted
>> 2010-12-08   1225.02   1228.93  1219.50    1228.28  4607590000       
>> 1228.28
>> 2010-12-09   1230.14   1234.71  1226.85    1233.00  4522510000       
>> 1233.00
>> 2010-12-10   1233.85   1240.40  1232.58    1240.40  4547310000       
>> 1240.40
>> 2010-12-13   1242.52   1246.73  1240.34    1240.46  4361240000       
>> 1240.46
>> 2010-12-14   1241.84   1246.59  1238.17    1241.59  4132350000       
>> 1241.59
>> 2010-12-15   1241.58   1244.25  1234.01    1235.23  4407340000       
>> 1235.23
>> > getSymbols('^GSPC',src='yahoo',  from='1970-01-03', 
>> return.class='xts');tail(GSPC)
>> [1] "GSPC"
>>            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume 
>> GSPC.Adjusted
>> 2010-12-09   1230.14   1234.71  1226.85    1233.00  4522510000       
>> 1233.00
>> 2010-12-10   1233.85   1240.40  1232.58    1240.40  4547310000       
>> 1240.40
>> 2010-12-13   1242.52   1246.73  1240.34    1240.46  4361240000       
>> 1240.46
>> 2010-12-14   1241.84   1246.59  1238.17    1241.59  4132350000       
>> 1241.59
>> 2010-12-15   1241.58   1244.25  1234.01    1235.23  4407340000       
>> 1235.23
>> <NA>          100.18    100.74    99.36      99.85    
>> 13880000         99.85
>> >
> Look at the appended data row under the last dated price.....
>
> Why so?
>
> Anyone else with the same problems out there?
>
> Best,
> Costas



More information about the R-SIG-Finance mailing list