Hi,

 

there seems to be an error on the yahoo finance page. When I visit the
german page http://de.finance.yahoo.com <http://de.finance.yahoo.com/>  I
can’t find the asset, but when I visit the American page (without de.) I do
find it.

Maybe that is the source of the error.

But when the getQuotes() method got it, it’s all fine.

 

regards

 

--

Konrad Hoppe

http://www.konrad-hoppe.com/

 

-----Ursprüngliche Nachricht-----
Von: Guillaume Yziquel [mailto:guillaume.yziquel@citycable.ch] 
Gesendet: Montag, 7. Dezember 2009 23:56
An: Konrad Hoppe
Cc: 'R-Finance'
Betreff: Re: [R-SIG-Finance] Futures prices in quantmod?

 

Konrad Hoppe a écrit :

> Hi Guillaume,

 

Hi, Konrad.

 

> I tried a future from the first site you presented below. And you can load

> futures prices in the same way you use for "normal" assets:

> 

> from.dat <- as.Date("01/01/03", format="%m/%d/%y")

> to.dat <- as.Date(Sys.Date(), format="%m/%d/%y")

> 

> getSymbols("^XAU", src="yahoo", from = from.dat, to = to.dat)

> 

> regards

> Konrad

 

It seems that this depends on the specific future:

 

> > from.dat <- as.Date("01/01/03", format="%m/%d/%y")

> > to.dat <- as.Date(Sys.Date(), format="%m/%d/%y")

> > getSymbols("^XAU", src="yahoo", from = from.dat, to = to.dat)

> [1] "XAU"

> > getSymbols("^DJS2", src="yahoo", from = from.dat, to = to.dat)

> Erreur dans download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=",
from.m,  : 

>   impossible d'ouvrir l'URL
'http://chart.yahoo.com/table.csv?s=^DJS2&a=0&b=01&c=2003&d=11&e=07&f=2009&g
=d&q=q&y=0&z=^DJS2&x=.csv'

> De plus : Message d'avis :

> In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :

>   ouverture impossible : le statut HTTP était '404 Not Found'

 

Perhaps yahoo's policy prevents from downloading the Dow Jones 

Industrial Average, but not less common futures... (getQuote works fine 

though, so I'm a bit surprised).

 

Anyone knows, or knows how to know?

 

-- 

      Guillaume Yziquel

http://yziquel.homelinux.org/


	[[alternative HTML version deleted]]

