[R-SIG-Finance] [R-sig-finance] Downloading data from Yahoo

megh megh700004 at yahoo.com
Tue Apr 28 14:46:30 CEST 2009


Thanks everyone for answering my query. I need one more extension. Suppose I
want to download GE, Intel and CTS data from Yahoo-finance and "USD/CAD"
exchange rate data from Oanda. Obviously I can do that by writing two
separate lines of codes, one for Yahoo and another for Oanda. My question
is, are there any privilege wherein I can download all four data in a single
go?

Thanks,
 

statone wrote:
> 
> The o in oanda should be lower case.
> 
> 
> Erin M. Hodgess, PhD
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: hodgesse at uhd.edu
> 
> 
> 
> -----Original Message-----
> From: r-sig-finance-bounces at stat.math.ethz.ch on behalf of Khanh Nguyen
> Sent: Mon 4/27/2009 10:29 PM
> To: Jeff Ryan
> Cc: r-sig-finance at stat.math.ethz.ch; megh
> Subject: Re: [R-SIG-Finance] [R-sig-finance] Downloading data from Yahoo
>  
> I have a related question. Does quantmod still support oanda?
> 
> I got the following message when I tried
> 
>> getSymbols("XPT/USD",src="Oanda")
> Error in do.call(paste("getSymbols.", symbol.source, sep = ""),
> list(Symbols
> = current.symbols,  : could not find function "getSymbols.Oanda"
> 
> Thanks
> 
> -k
> 
> On Mon, Apr 27, 2009 at 11:19 PM, Jeff Ryan <jeff.a.ryan at gmail.com> wrote:
> 
>> Try and remove the ^
>>
>> > getSymbols("GE", src="yahoo", from = from.dat, to = to.dat)
>> [1] "GE"
>>
>> > str(GE)
>> An 'xts' object from 2008-01-02 to 2009-02-19 containing:
>>  Data: num [1:286, 1:6] 37.1 36.8 36.5 36.2 36.4 ...
>>  - attr(*, "dimnames")=List of 2
>>  ..$ : NULL
>>  ..$ : chr [1:6] "GE.Open" "GE.High" "GE.Low" "GE.Close" ...
>>  Indexed by objects of class: [POSIXt,POSIXct] TZ: America/Chicago
>>  xts Attributes:
>> List of 2
>>  $ src    : chr "yahoo"
>>  $ updated: POSIXct[1:1], format: "2009-04-27 22:18:22"
>>
>> HTH
>> Jeff
>>
>> On Mon, Apr 27, 2009 at 10:06 PM, megh <megh700004 at yahoo.com> wrote:
>> >
>> > Hi, I am having problem downloading quote from Yahoo (historical stock
>> quotes
>> > from GE) using Quantmod package. I have following quote :
>> >
>> > from.dat <- as.Date("01/01/08", format="%m/%d/%y")
>> > to.dat <- as.Date("02/19/09", format="%m/%d/%y")
>> > getSymbols("^GE", src="yahoo", from = from.dat, to = to.dat)
>> >
>> > Error is :
>> > Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=",
>> from.m,
>> > :
>> >  cannot open URL
>> > 'http://chart.yahoo.com/table.csv?s=
>> ^GE&a=0&b=01&c=2008&d=1&e=19&f=2009&g=d&q=q&y=0&z=^GE&x=.csv'
>> > In addition: Warning message:
>> > In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :
>> >  cannot open: HTTP status was '404 Not Found'
>> >
>> > Can anyone please point out that what is the wrong here? How can I
>> download
>> > data from Yahoo efficiently?
>> >
>> > Regards,
>> > --
>> > View this message in context:
>> http://www.nabble.com/Downloading-data-from-Yahoo-tp23269331p23269331.html
>> > Sent from the Rmetrics mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > R-SIG-Finance at stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only.
>> > -- If you want to post, subscribe first.
>> >
>>
>>
>>
>> --
>> Jeffrey Ryan
>> jeffrey.ryan at insightalgo.com
>>
>> ia: insight algorithmics
>> www.insightalgo.com
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
> 
> 

-- 
View this message in context: http://www.nabble.com/Downloading-data-from-Yahoo-tp23269331p23276393.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list