GOOGLEFINANCE - How to get Amsterdam data? - google-finance

I want to get market data for the shares listed in Euronext Amsterdam (for example 'Royal Dutch Shell plc (RDSB.AS)'). Google's Finance Data Listing says that for the Euronext Amsterdam the symbol 'AMS' needs to be used as a prefix for a ticker.
When I am using the following command...
=GOOGLEFINANCE("AEX:RDSB"; "price")
...then I am getting the error message:
"When evaluating GOOGLEFINANCE, the query for the symbol: 'RDSB' returned no data."
So, what's wrong with my code? Isn't it possible to get the Amsterdam Stock Exchange market data? If so, then why the Euronext Amsterdam is listed in exchanges list?
Everything works fine for the London Stock Exchange:
=GOOGLEFINANCE("LON:RDSB"; "price")

You gave your own answer: "Google's Finance Data Listing says that for the Euronext Amsterdam the symbol 'AMS' needs to be used as a prefix for a ticker."
Use AMS instead of AEX.
=GOOGLEFINANCE("AMS:RDSB"; "price")

Related

Ticker symbols supported by googlefinance function

The GOOGLEFINANCE function in Google Sheets allows you to lookup the price (or other attribute) of a stock or instrument.
https://support.google.com/docs/answer/3093281?hl=en
However, the documentation for which symbols it supports is sparse.
For example, this fund has a symbol "GB00B59G4Q73", and searching for this in Yahoo finance works.
But neither this nor the symbol "0P0000KSP6.L" works in Google Sheets, giving the error "When evaluating GOOGLEFINANCE, the query for the symbol: 'GB00B59G4Q73' returned no data."
How can I determine if I am using the correct symbol, or if the function does not support this symbol?
here is your "official documentation":
ticker - The ticker symbol for the security to consider.
Note: Reuters Instrument Codes are no longer supported. For example, ticker 123.TO or XYZ.AX would not work. Instead, use TSE:123 or ASX:XYZ.
Recommended: Add an exchange to avoid discrepancies. For example, use “NASDAQ:GOOG” instead of “GOOG." If an exchange is not specified, GOOGLEFINANCE will use its best judgement to choose one for you.
meaning that the best you can do is to go to https://www.google.com/finance and search for your ticker there instead of yahoo or other suppliers that are not supported
but you can always scrape it from yahoo:
=SUBSTITUTE(SPLIT(REGEXEXTRACT(QUERY(IMPORTXML(
"https://uk.finance.yahoo.com/quote/0P0000KSP6.L?p=0P0000KSP6.L&.tsrc=fin-srch", "//*"),
"select Col1
where Col1 contains 'Vanguard FTSE Dev World ex UK Equity Index AccLSE - LSE'
limit 1
offset 8", 0), "GBp(.*)"), "-"), ",", )*1

How to specify the currency for GoogleFinance historical data

I'm having a problem using Google Finance historical data. I need to know the price a particular stock had on a particular date (Usually within the last month).
The problem is, when I use a URL such as https://finance.google.com/finance/historical?q=abx I get different results depending on where I issue the query from.
At home I'm in Argentina and my production server is in the US... when I run the query locally I get the prices in AR$, but when run from the server I get USD (Which is what I actually need).
I tried using a X-Forwared-For header but didn't make a difference...
Ideally I'd like to send an extra parameter (something like cur=USD) to explicitly ask for USD... is there such a thing?
Thanks
I use, currency conversion along with the price of the stock.
For Example:
Price of ABB Ltd in SEK = GOOGLEFINANCE("ABB","price") * GOOGLEFINANCE(("CURRENCY:USDSEK"))
Then I format the cells, rows, columns with prices to local currency(i.e. SEK) as mentioned in the link: Format Numbers in excel.
You could add other parameters such as date as mentioned in below link:
Get exchange rate on a specific date from GoogleFinance

Getting stocks by industry via Yahoo Finance

i want to list all available industries ( like: http://biz.yahoo.com/p/ ) and show all corresponding stocks.
Until now I'm using YAHOO.Finance.SymbolSuggest.ssCallback for the symbol suggestion and http://finance.yahoo.com/d/quotes.csv?s=... for getting the stock's data.
Does anyone have any idea how to get all industries and corresponding stocks?
Is there another hidden Yahoo API?
Lists of all available industries are called GICS Sectors for Standard and Poor's (S&P500 will use that) and ICB for Dow Jones and FTSE. Hence it used by Nasdaq, Nyse and others markets.
It seems like Yahoo uses a third industry classification by Morning Star, but since I'm not quite sure I will give both ways of retrieving data.
Morning Star
I don't know if Yahoo really sticks to this classification, but some names were really close so let's see it:
You need to go to their Index Data and in each sector, click on it and then at the bottom View complete index holdings.
It's not as precise as in Yahoo industry list, but it's all you can do with Morning Star. Not very convincing, I know...
GICS Sectors
GICS Sectors are now a trademark of Standard and Poor's and then data have to be sought for in S&P's website.
Short answer: take a look at this page, you will need to be registered (it's free and easy) and you can download spreadsheets (xls) with stocks and corresponding sectors. Nevertheless, things aren't always easy, and you will have to do a bit of a search to retrieve all stocks with their corresponding industries. For example, the file INDICATED_RATE_CHANGE.xls will give you some companies and their sectors in each month of 2012. Using that and SP500_DividendAristocrats_2012.xls you should be able to retrieve at least a large part of S&P 500 companies.
ICB
ICB is used by NYSE, NASDAQ etc... Then it's a lot simpler than S&P and MorningStar. Here is your answer. BOOM! Direct link!
Link is dead :(
Finally
I strongly advise you to use the simpler and most-used industry classification index: the ICB. It will always be available and publicly displayed since millions of investors relay everyday on it, without having to use S&P financial services or MorningStar brokerage services...
EDIT
You can look at nasdaq.com to retrieve all companies and their corresponding sector: here for Nasdaq and here for Nyse
Get all industry-IDs from here:
http://biz.yahoo.com/ic/ind_index.html
(look at the links)
Then use YQL ( https://developer.yahoo.com/yql/console/ )
with a query like this:
select * from yahoo.finance.industry where id=912

How can I get x most valuable companies using some finance APIs?

I need to find a Web Service which allows me to retrieve the following type of data:
The 30 most valuable companies, and for each company the following information:
Company name, symbol, state and zipcode
Current market price of the stock
Change in the price of the stock since yesterday’s market close.
Beta value of the stock
Thanks in advance!
I would expect to obtain this information from Forbes. As Steve suggested, you should get it from xignite.com . Apparently, Forbes makes their data available through them:
http://www.xignite.com/News/PressRelease.aspx?articleid=86
You might also have a look at Yahoo Finance: http://www.gummy-stuff.org/Yahoo-data.htm.
Here some example This is not oficial API and there is no documentation.

Yahoo Maps Geocode

How Do I work around a problem with the yahoo map geocode result set? The result set being returned is wrong. The city field contains the city, region and postal code. As seen below.
Is there a way to work around this issue without breaking scalability.
-33.924320
151.187057
203 Coward St
MASCOT NSW 2020
Australia
AU
The Yahoo geoencoding returns usually an XML or a PHP serialized. By querying the encoding service I suppose you already have the address and you want to get the coordinates for your geoPoint. It is possible that you are feeding the maps engine with a wrong request.
If you think you found a bug you can send them an email, but I suggest you to check with other locations or to publish first here your code in order to spot the eventual errors.