[R-sig-finance] Currency data on the web

Ajay Narottam Shah ajayshah at mayin.org
Sun Feb 5 18:41:40 CET 2006

> Has anybody written R-code that calculates
> FX option prices?
> Also, I'm curious about what historical databases
> that people are using with R.

That's an ambiguous question: Do you want to know about historical
_currency_ databases? If so, read on.

A while ago, I had asked questions here about data sources on the
currency market. I got enormous help from folks on this mailing
list. A summary of what I found is:

1. There are 3 good sources I know of: oanda.com, US federal reserve,
   and Bank of England. The first (oanda.com) is integrated into
   tseries::get.hist.quote(). The other two, you have to do
   yourself. Send me mail if you want shell scripts which do the

2. The currency market trades 24 hours a day. It isn't like the stock
   market, where the official closing price on a main exchange is the
   well defined notion of "the price of the day". The US Fed and the
   Bank of England each report currency prices at a point in time in
   the day. oanda.com reports the volume weighted average (VWA) over a
   24 hour period (roughly the GMT day). So the measurement concepts
   used are rather different. That is particularly troublesome when
   mixing data from multiple sources. See some of my postings on this
   mailing list for how confounding it can get.

3. In terms of number of currencies covered, it's oanda.com > Bank of
   England > US Fed. oanda.com has any currency you can think of, and
   some you can't think of (e.g. gold). But the US Fed has long
   historical series for all the currencies that they do, while the
   Bank of England doesn't always have these.

In the event, after thinking about all this, my co-authors and I
plonked for US Fed data for a recent project
(http://www.mayin.org/ajayshah/papers/CNY_regime) which uses currency
data for a few major countries (US, UK, Japan, Euro, China).

Ajay Shah                                      http://www.mayin.org/ajayshah  
ajayshah at mayin.org                             http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.

More information about the R-sig-finance mailing list