I have the following problem:
I have around 1000 unique ISIN numbers of stock exchange listed companies.
- I need the historic prices of these companies starting with the earliest listing until today on a daily basis.
However, as far as my research goes, yahoo can only provide prices for stock ticker symbols, which I do not have.
Is there a way to get for example for ISIN: AT0000609664
, which is the company Porr
the historic prices from yahoo automatically via their api?
I appreciate your replies!
I found a Web-Service which provides historic data based on date range. Please have a look
http://splice.xignite.com/services/Xignite/XigniteHistorical/GetHistoricalQuotesRange.aspx
The Answer:
To get the Yahoo ticker symbol from an ISIN, take a look at the
yahoo.finance.isin
table, here is an example query:This returns the ticker
ADS.DE
inside an XML:I am afraid your example ISIN won't work, but that's an error on Yahoos side (see Yahoo Symbol Lookup, type your ISINs in there to check if the ticker exists on Yahoo).
The Implementation:
Sorry, I am not proficient in Java or R anymore, but this C# code should be almost similar enough to copy/paste:
where
GetQuery(string isin)
returns the URI for the query to yahoo (see my example URI) andGetHttpResult(string URI)
fetches the XML from the web. Then you have to extract the contents of theIsin
node and you're done.I assume you have already implemented the actual data fetch using ticker symbols. Also see this question for the inverse problem (symbol -> isin). But for the record:
Query to fetch historical data for a symbol
where you may pass arbitrary dates and an arbitrary list of ticker symbols. It's up to you to build the query in your code and to pull the results from the XML you get back. The response will be along the lines of
This should get you far enough to write your own code. Note that there are possibilities to get data as .csv format with
&e=.csv
at the end of the query, but I don't know much about that or if it will work for the queries above, so see here for reference.