Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Incorrect data #30

Closed
nickray opened this Issue · 6 comments

3 participants

@nickray

It seems sometimes you give currency in USD, and sometimes USD in currency (i.e., the inverse).

The example below is from my Python wrapper, it's RUB and CHF on 2012-01-03 and 2010-01-03.

In [36]: fxrates.alternative("RUB", date=120103)
RUB = 31.687000, CHF = 0.932150, base USD
Out[36]: 33.993455988842996

In [37]: fxrates.alternative("RUB", date=100103)
RUB = 0.032990, CHF = 1.035750, base USD
Out[37]: 0.03185131547188028

@currencybot
Owner
@currencybot
Owner
@nickray

I sent you a pull request for my Python wrapper, use at your own convenience.

The problem is that in fact the latest values are incorrect, at least for RUB and CHF.

Here's some data for RUB:
2011-11-05 00:00:00 0.03255
2011-11-06 00:00:00 0.03255
2011-11-07 00:00:00 0.03275
2011-11-08 00:00:00 31.4657
2011-11-09 00:00:00 0.03278
2011-11-10 00:00:00 0.03265
2011-11-11 00:00:00 0.03301
2011-11-12 00:00:00 0.03301
2011-11-13 00:00:00 0.03301
2011-11-14 00:00:00 0.03271
2011-11-15 00:00:00 30.75605
2011-11-16 00:00:00 30.76028811
2011-11-17 00:00:00 30.81582305
2011-11-18 00:00:00 30.93696145
2011-11-19 00:00:00 30.80805633
2011-11-20 00:00:00 30.86879322
2011-11-21 00:00:00 31.14126565

Your scraper script should definitely do some plausibility checks (e.g, is the number different than the last, has the price not moved by more than say twice the median daily price move).

Let me tell you, financial data is always dirty ;-). That's why the vendors can afford to charge ridiculous prices.

Cheers

@currencybot
Owner
@josscrowcroft
Collaborator

Hey, didn't realise I was writing from CurrencyBot's account! (was replying in Gmail) ... he won't be happy about that for sure.

I've checked out the latest files and looks like the realtime data is grabbing the correct values:

CHF: 0.91356,
RUB: 29.576,

CHF: compare 0.914101849 from https://www.google.com/search?q=1+USD+in+CHF
RUB: compare 29.577923 from https://www.google.com/search?q=1+USD+in+RUB

But you're right about the historical values (and implementing sanity checks nonetheless) so I'm leaving this one open until I can get the historical data figured out.

tl;dr for speed-readers:

latest.json rates and historical daily rates going back to 2011-11-16 are unaffected.

affected currencies: RUB and CHF (so far) in historical data before 2011-11-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.