Price Editor changed currency basis?

David Reiser dbreiser at earthlink.net
Fri Jan 13 00:30:48 EST 2012


On Jan 12, 2012, at 10:53 PM, FireFly wrote:

> I have a couple of UK stocks, until recently the prices were reported from FQ in pounds, i.e. a share worth 20p would have a price as 0.20
> 
> Today I ran Price editor and got qutes, I was, "shocked" to see the totals in my accounts, but then found that it was now reporting a share worth 20p as 20.00, so my shares looked like they'd increased 100 fold, which would be nice but!
> 
> Anyone know why this might have happened (or how I might be able to resolve it)?
>  
> - James Duerr
> 
Yahoo is broken. Again.

If you go to either the US or the UK Yahoo finance site and ask for a quote for Barclays (BARC.L), at the bottom of the main basic quote block, in small gray letters it will say "Currency in."

If you ask for a quote for IBM.L (IBM traded on the London Exchange still trades in dollars), you'll get "Currency in USD."

If you capture the output from the URL that finance-quote uses for BARC.L (or I suspect any quote denominated in pence), you can determine that Yahoo is returning a null value -- "" in a csv stream -- in response to the request for the currency of the stock in question. Pretty unusual, because normally if you ask for a piece of data that isn't present, yahoo returns "N/A" rather than a null value.

Because the "Download Data (delayed)" link at the far bottom right of the yahoo uk quote page points to download.finance.yahoo.com instead of uk.finance.yahoo.com, I have a feeling that Yahoo is consolidating their stock quotes databases. They're probably doing something like sanitizing the data on the way into the main database. Since all ISO currency symbols are three capital letters, when the system sees "GBp" coming from the UK (indicating pence instead of pounds) that currency symbol gets purged as an invalid entry.

About the only thing you could do until Yahoo fixes this (which might break finance-quote again...) is to hack the file Base.pm in the Yahoo folder of your copy of finance-quote to recognize "" as well as "GBp" or "GBX" as quotes in pence.

Dave
--
David Reiser
dbreiser at earthlink.net







More information about the gnucash-user mailing list