[R-SIG-Finance] [R-sig-finance] oanda and yahoo get.hist.quote

Bernd Stampfl Bernd.Stampfl at Sparinvest.com
Mon Oct 15 10:50:12 CEST 2007



Hi Jeff,
just tried to install the quandmod package. But unfortunately I got the
error message:

package 'quantmod' successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation
'C:\Data\R\R-2.5.1\library\file14291417\quantmod' to
'C:\Data\R\R-2.5.1\library\quantmod'
updating HTML package descriptions

And nothing happened. Any idea why this happens?

Cheers, Bernd



Jeff Ryan wrote:
> 
> If you need 7 day data - skip this.  If you want data to match
> weekdays - available from the St. Louis Fed's FRED system are Daily
> Exchange Rates that have dates that match standard trading days in the
> US - rates as of noon if I remember correctly...
> 
> Using quantmod:
> 
>>library(quantmod)
>>getSymbols("^GSPC",src="yahoo",from="1999-01-04")
>>getSymbols("DEXUSEU",src="FRED")
>>showSymbols()
> GSPC DEXUSEU
> "yahoo" "FRED"
> 
>>all.data <- cbind(GSPC,DEXUSEU)  # through the magic of zoo
>>all.data
>            GSPC.Open GSPC.High GSPC.Low GSPC.Close GSPC.Volume
> GSPC.Adjusted
> 1999-01-04   1229.23   1248.81  1219.10    1228.10   877000000      
> 1228.10
> 1999-01-05   1228.10   1246.11  1228.10    1244.78   775000000      
> 1244.78
> 1999-01-06   1244.78   1272.50  1244.78    1272.34   986900000      
> 1272.34
> 1999-01-07   1272.34   1272.34  1257.68    1269.73   863000000      
> 1269.73
> 1999-01-08   1269.73   1278.24  1261.82    1275.09   937800000      
> 1275.09
> 1999-01-11   1275.09   1276.22  1253.34    1263.88   818000000      
> 1263.88
>            DEXUSEU
> 1999-01-04  1.1812
> 1999-01-05  1.1760
> 1999-01-06  1.1636
> 1999-01-07  1.1672
> 1999-01-08  1.1554
> 1999-01-11  1.1534
> 
> ....
> 
> The downside is that, at present, the FX data is *not* fetched with a
> 'from' or 'to' argument - so you get the full record from FRED.  The
> default for yahoo data with getSymbols is only from 2007 onward - so I
> conveniently fetched matching time periods for both data.
> 
> If you want to get rid of non-matching dates na.omit(all.data) works well.
> 
> Anyway, my 2 cents.
> 
> quantmod is on CRAN and at http://www.quantmod.com
> 
> There are many other data methods implemented for getSymbols as well
> (database and local files), with many more planned (including oanda,
> economagic, and some others...) in the coming weeks.
> 
> St.Louis Fed is at: http://research.stlouisfed.org/fred2/
> 
> Jeff Ryan
> 
> On 10/14/07, Alexander Moreno <alexander.f.moreno at gmail.com> wrote:
>> Hi,
>>
>> I have S&P index data (^gspc) that I got from get.hist.quote from yahoo,
>> and fx data from the same function from Oanda.  The Oanda data has
>> 7-days, and the S&P data has 5.  Anyone know how to get them to match up
>> for the same time period?
>>
>> Best,
>> Alex
>>
>> _______________________________________________
>> 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.
>>
> 
> _______________________________________________
> 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/oanda-and-yahoo-get.hist.quote-tf4623110.html#a13208854
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list