An Introduction to Google Finance

How to Obtain Stock Quotes on the Internet

Google Finance Stock Quotes - Mark Alexander Bain
Google Finance Stock Quotes - Mark Alexander Bain
Google Finance is still in Beta mode, but it's an excellent source of finacial data. This article shows how programmers and analysts can access that on-line and free data

In today's global economy financial data is a necessity, and when that financial data is free, on-line, accurate and up to date then it is invaluable; and that's why Google Finance is so important - with Google Finance anyone can access current stock quote information for any company on every stock market around the world.

Accessing Google Finance

Google Finance is, of course, available on Google's web site at http://finance.google.com, and once there the potential financial wizard can start using Google Finance's company search box to start looking for stock quotes.

Viewing Stock Quotes with Google Finance

Google Finance has a simple input box into which the use types the name of the company to be viewed - it's an intelligent input box and will give suitable alternatives for the possible company names, for example when typing in vod a drop-down will appear showing (amongst others):

VOD Vodafone Group plc
VODOF VODONE LTD
0FCJ MINERALNE VODY ORD SHS

It's then just a matter of selecting the required company.

Google Finance's Stock Quote Display

Google Finance's stock quote display shows live data for the selected company - or rather is shows nearly live data, the stock quotes are actually 15 minutes behind real time; but here's the nice touch - the stock quote is automatically updated every few minutes.

The stock quote screen contains the key things that any would be investor might want to know:

  • the (almost) live stock quote
  • the day's open, high and lows
  • the amount of change since the stock market's open

The page also displays a chart showing the historical stock quotes for the company - as well as a lot of information, everything from a list of related companies to the age of the chairman of the board.

Comparing Stock Quotes with Google Finance

The stock quotes of more that one company can be viewed on the stock quote chart - and for this an 'Add' button is included on the chart itself.

Google Finance's Historical Stock Quotes

The current stock price can only be viewed - it can't be downloaded - which is fine for many people, but programmers or anyone wanting to do any in-depth analysis will need to turn to Google Finance's historical data.

Google Finance's stock quotes are accessible via the Historical Prices link - which, when clicked on, shows a years worth of stock quotes (only for the main company selected - not for any comparisons). The page also contains two date boxes so that more or less data can be displayed.

The historical data can also be downloaded as a csv (comma separated variable) file and it's this, of course, that's of particular interest to any programmers or analysts.

Downloading Google Finance's Historical Prices

If Google Finance's historical stock quotes are to be used in Microsoft Excel or OpenOffice.org Calc then the data can be loaded into a spreadsheet by clicking on 'Download to spreadsheet'; however, the URL behind that link can be accessed directly by any programmer for use in their own applications.

The csv file can be accessed directly by adding a few variables to the Google Finance historical data URL; these are:

  • q (the symbol for the market and company)
  • startdate (with the format month+day,year)
  • endate (again with the format month+day,year)
  • output (which will be csv)

So, the url will be something like:

http://finance.google.co.uk/finance/historical?
q=LON:VOD&startdate=Oct+1,2008&enddate=Oct+9,2008&output=csv

This url can used by the programmer in a number of different ways, for example:

  • download the csv file with wget and use AWK to format it
  • read the data as a stream within a PHP script

Conclusion

Google Finance is still in Beta mode - which is to say that Google Finance has been tested by its developers and it's now up to World to do the same; well this is one application that's well worth the time to test - whether the tester is a financial analyst or an application developer, everyone will benefit from this powerful product.

Additional Reading

Using Yahoo! Financial Stock Quotes

An Introduction to AWK

Accessing Yahoo! Finance from PHP

Mark Alexander Bain - Mark Alexander Bain is a writer, Mo Bro and consultant for all aspects of software development at dsquared. He has also written regularly ...

rss
Advertisement

Comments

Oct 19, 2008 9:55 PM
Guest :
I use Google Finance on a daily basis.. and I *LOVE* it.. Congratulations to Google for giving the websurfing public yet another indispensable app!!!
Sep 1, 2009 3:49 PM
Guest :
There is a free script to automatically download and parse google finance csv file
http://reboltutorial.com/blog/parse-csv/
Sep 4, 2009 7:49 AM
Mark Alexander Bain :
If you're a REBOL programmer then you may also be interested in my article: Google, Yahoo! Finance and REBOL Programming (http://computerprogramming.suite101.com/article.cfm/google_yahoo_finance_a nd_rebol_programming)
3 Comments
Advertisement
Advertisement