1

I'm trying to use Yahoo's YQL to find a stock price on the Madrid stock exchange.

I have a query that works for looking up ARM's price on the London Stock exchange:

select * from yahoo.finance.quotes where symbol="arm.l"

but when I try a similar query for a Spanish company on the Madrid exchange it fails (Telephonica in this example):

select * from yahoo.finance.quotes where symbol="tef.mc"

I can see Yahoo list Telephonica's stock information on the Madrid exchange, so I'm wondering if there is something wrong with my syntax?

Any suggestions would be much appreciated.

Many thanks, Chris

  • I'm wondering why nobody (on the internet and in SO) would give a clear answer to this question. Its obviously just a parameter like `symbol = "arm"`, but what is it called!? I'm getting really frustrated with this – Velimir Tchatchevsky Jun 20 '16 at 10:30

1 Answers1

0

You can use investpy, a Python package to retrieve historical data from World Stocks, Funds and ETFs. I do not know if you are familiar with Python or even if you use it, but I will give you the information because it can maybe solve your problem or help anyone that seeks retrieving historical data using investpy.

In this case, the following example is proposed: 'as Telefónica is an equity from Spain stock market', you can use investpy to retrieve its historical data as it follows:

import investpy

df = investpy.get_historical_data(equity='telefonica',
                                  country='spain',
                                  start='01/01/2010',
                                  end='01/01/2019')

For further investpy usage please read the docs! I hope this helped you solve your problem!

alvarobartt
  • 453
  • 5
  • 15