1

I am having trouble with what seems like an inconsistency of units with Yahoo Finance API data.

The issue relates to whether I'm getting the current price or historic price. The current price is almost always quoted in GBX (aka. GBp/ or pence) as expected. However, the historic price is quoted in GBP (pounds) for some tickers.

E.g 1: The following work to the same units GBX (note: prices will have minor differences due to date difference):

http://download.finance.yahoo.com/d/quotes.csv?s=DLG.L&f=sl1d1t1c1hgvbap2 http://ichart.yahoo.com/table.csv?s=DLG.L&a=0&b=1&c=2016&d=0&e=26&f=2016&g=d

E.g 2: The following (for a different company, but also LSE) differ by a factor of 100 (note: prices will have minor differences due to date difference):

http://download.finance.yahoo.com/d/quotes.csv?s=DIG.L&f=sl1d1t1c1hgvbap2 http://ichart.yahoo.com/table.csv?s=DIG.L&a=0&b=1&c=2016&d=0&e=26&f=2016&g=d

I then created a program to check how many were like this.

Of approx 1,400 London (.L) tickers on Yahoo Finance:

  • Approx 19.5% had the historic price in GBP(!) and the current price in GBX (pence) - e.g.DIG.L
  • Approx 0.675% had the current price 100x greater than the correct value - e.g. CZB.L
  • Approx 78.39% correctly matched (woo hoo!). - e.g. PFC.L

The remaining approx 1.4% didn't fit my algorithm, but could be explained as one of the above 3 categories when reviewed manually.

So it seems that the current price is nearly always right, but the historic data can be inaccurate.

My question is: 19.5% is a bizarre number to be out. Is there something going on at Yahoo to change the units from pounds to pence for the Historic data, or will I always have to account for this inconsistency?

NOTE: I tried the Yahoo forum a few days ago, but it's almost unused. I'm hoping a StackExchange community will be more active.

  • Why DLG vs DIG? Two different securities, no? – barrycarter Feb 2 '16 at 22:15
  • Exactly - inconsistency across securities. One has the same units for both current and historic data, but the other is out by a factor of 100. This means if you are comparing a current price to a price gained by historical means, the figures will be wrong. E.g. A simple moving average good case might be 40+60+50+60+40=> SMA=50, compare to the current price of 55 - that makes sense. But if the historic data is the 19.5% in pounds, the result is 0.4+0.6+0.5+0.6+0.4=> SMA=0.5 - compare to a current price of 55 and the figure is completely wrong. Would expect unit consistency across all. – HockeyJ Feb 3 '16 at 9:31
2

You might have better luck using Quandl as a source. They have free databases, you just need to register to access them. They also have good api's, easier to use than the yahoo api's

Their WIKI database of stock prices is curated and things like this are fixed (www.quandl.com/WIKI ), but I'm not sure that covers the London stock exchange. They do, however, have other databases that cover the London stock exchange.

  • It's not quite an answer to the question, but it is a valuabe answer. The LSE database on quandl would be $50/month, whereas yahoo is free, so will stick with yahoo for now. Have upvoted. Thank you. – HockeyJ Feb 4 '16 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .