Online quotes for Invesco Perpetual Funds

David Reiser dbreiser at earthlink.net
Wed Dec 21 21:03:17 EST 2011


On Dec 21, 2011, at 2:50 PM, Lloyd wrote:

> Having turned verbose on, I see that Yahoo Europe does recognise this, but
> just returns insufficient or erroneous information:
> 
> Finance::Quote fields Gnucash uses:
>    symbol: GB0033028225.L       <=== required
>      date: 03/10/40108          <=== required
>  currency: SIC                  <=== required
>      last: 0.00                 <=\
>       nav:                      <=== one of these
>     price: 0.00                 <=/
>  timezone:                      <=== optional
> 
> All fields returned by Finance::Quote for stock GB0033028225.L
> 
> stock           field  value
> -----           -----  -----
> GB0033028225.L        ask:
> GB0033028225.L    avg_vol: 0
> GB0033028225.L        bid:
> GB0033028225.L        cap:
> GB0033028225.L      close:
> GB0033028225.L   currency: SIC
> GB0033028225.L       date: 03/10/40108
> GB0033028225.L  day_range: N/A - N/A
> GB0033028225.L        div:
> GB0033028225.L   div_date:
> GB0033028225.L  div_yield:
> GB0033028225.L        eps:
> GB0033028225.L     ex_div:
> GB0033028225.L       high:
> GB0033028225.L    isodate: 40108-03-10
> GB0033028225.L       last: 0.00
> GB0033028225.L        low:
> GB0033028225.L     method: yahoo_europe
> GB0033028225.L       name: GB0033028225.L
> GB0033028225.L        net:
> GB0033028225.L       open:
> GB0033028225.L   p_change:
> GB0033028225.L         pe:
> GB0033028225.L      price: 0.00
> GB0033028225.L    success: 1
> GB0033028225.L     symbol: GB0033028225.L
> GB0033028225.L       time: 03:34
> GB0033028225.L     volume:
> GB0033028225.L year_range: N/A - N/A
> 
There are a couple problems, maybe neither of which is readily solvable.

First of all, Finance-quote doesn't claim to retrieve fund quotes. From a practical perspective, if the fund has a 'convenient' or 'generally used' ticker symbol, you may be able to retrieve quotes. However, since European funds switched to using ISINs instead of ticker symbols, finding quotes for European/Asian funds has gotten much more difficult.

Three years ago, I was agitating for changes to finance-quote in a thread on their bug list
https://rt.cpan.org/Public/Bug/Display.html?id=40169
At the time, I even wrote a patch for the existing perl modules and then an extra module just for European quotes. I think both of them worked back then, but neither works now. Somewhere in that thread is the response of the maintainer that my request had been classified as an enhancement request rather than a bug.

Finance quote hasn't had a release in over 2 years. There are some fixes on the bug tracker, but users are pretty much on their own to implement them.

Even if finance-quote started more frequent releases, we'd have to deal with Yahoo changing their web sites with disturbing frequency. And it looks like the fund companies may be working hard to make performance quotes difficult or impossible to download.

If you go to Yahoo Europe and search for the above fund, and then request a quote, Yahoo serves its answer from the URL
http://uk.finance.yahoo.com/q?s=GB0033028225&ql=1

The page that comes up has only the most recent quote. There is no chart, and if you try to go to Historical Prices, you get the response that no data is available for any date range.

If you scroll down to the bottom right of the page and hover over the link for "Download Data (delayed)" you can see in the status line that yahoo is going to follow the link
http://download.finance.yahoo.com/d/quotes.csv?s=GB0033028225.L&f=sl1d1t1c1ohgv&e=.csv

Not even the same base web site. And if you follow that link, you get a file with no valid data in it -- just the symbol, a zero, a bogus time, and a bunch of "N/A"s. My experience is that download.finance.yahoo has never had ISIN keyed data. For a while, for some funds, you could trick yahoo Europe into giving you data for ISIN funds.

If someone were skilled and interested, it should be possible to write a screen scraping finance-quote module for European funds. It won't be fun. The currency of the quote is stuffed in a table footer that would have to be parsed. During the day, you get a time for the Trade Time field. After hours you get just the day and month without a year. Simple Matter of Programming, but the fund companies want you to pay for your quotes by having your eyeballs exposed to several ads.

And then Yahoo seems to change its quotes sites several times a year.

Sorry to be so negative, but the situation seems to have gotten worse since the last time I tried to work around Yahoo's web design.

Dave
--
David Reiser
dbreiser at earthlink.net







More information about the gnucash-user mailing list