Forex data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Forex data

Aaditya Nanduri
Hello All,

I cant find any good methods to get currency data into R.

The method I'm using right now is collecting data through
getSymbols("",src="oanda") from quantmod.
But its limited to only 500 lines of data so I have to give time frames
(from="", to="") and that gets to be very tedious when I have to get data
for about 40 currencies for the last 10 years (and I have to refresh this
process everyday...very very annoying).

Does anyone know of better methods? Any help would be appreciated.

Sincerely,
Aaditya Nanduri

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Forex data

Wolfgang Wu
I think something like this might do what you want:

library(xts)
library(quantmod)
EURGBP <- xts(get(getFX('EUR/GBP', from = Sys.Date() - 499, to = Sys.Date())));
for (iDate in seq(500, 2000, by=500)){
    EURGBP <- rbind.xts(EURGBP, get(getFX('EUR/GBP', from = Sys.Date() - iDate - 499, to = Sys.Date() - iDate)))
}
colnames(EURGBP) <- "Close";
chartSeries(EURGBP)



 Wolfgang Wu



----- Urspr√ľngliche Mail ----
Von: Aaditya Nanduri <[hidden email]>
An: R-Finance <[hidden email]>
Gesendet: Freitag, den 2. Juli 2010, 7:43:53 Uhr
Betreff: [R-SIG-Finance] Forex data

Hello All,

I cant find any good methods to get currency data into R.

The method I'm using right now is collecting data through
getSymbols("",src="oanda") from quantmod.
But its limited to only 500 lines of data so I have to give time frames
(from="", to="") and that gets to be very tedious when I have to get data
for about 40 currencies for the last 10 years (and I have to refresh this
process everyday...very very annoying).

Does anyone know of better methods? Any help would be appreciated.

Sincerely,
Aaditya Nanduri

    [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.




_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.