Home > Forum Home > Building Market Trading Systems > Downloading Market Data For Free | Share |
Forum Topic | Post Reply Login |
Downloading Market Data For Free | Rate this: (3.8/5 from 6 votes) |
Financial market data can be downloaded into Excel for free by using Excel web queries. The market data can be automatically extracted from financial web sites that provide such data for free. This example uses Yahoo Finance; however similar approaches could be made with MSN Finance, Google Finance or other such web sites. Download a free Excel program that uses a variation of the code below here. Update - 07 January 2012: Given the high popularity of this solution, we have developed an updated version that resolves the issues raised in the posts here and adds the following features:
This example will download both real-time quotes and historical price data for a specified stock or index ticker symbol. Suppose we have the following Excel spreadsheet. Excel Spreadsheet:
Cells B2 and B3 specify the start and end dates for the historical data. Cell E2 specifies the stock or index ticker symbol. Cell E3 specifies the historical data frequency. This can be either Daily, Weekly, or Monthly or even D, W or M as only the first letter is used in the web query. The following VBA macro code can then be loaded through the VBA editor and executed from the spreadsheet to return the data. VBA Code:
By simply changing the input cells, the same macro can be run to extract new data. This is a basic example and there are several enhancements which could be made to suit requirements such as:
| |||||||||||||||||||||||||||||||||
Excel Business Forums Administrator | |||||||||||||||||||||||||||||||||
Posted by Excel Helper on |
Replies - Displaying 11 to 20 of 48 | Order Replies By: Most Recent | Chronological | Highest Rated |
Rate this: (3/5 from 1 vote) The VBA code in the original post has been modified to now work correctly with the layout of the web page. Should the layout change again, the solution is to record a macro by creating a new web query with the full URL and parameters and select the area in the web page for the historical data (Data > Import External Data > New Web Query). This will populate the ".WebTables" parameter with the correct value which can then be replaced in the original code. | |
Excel Business Forums Administrator | |
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) Thanks alot that makes sense. Oz | |
cano geel | |
Posted by Oz on |
Rate this: (3/5 from 1 vote) Otherwise, the code is working fine. Also I am seeing no matter daily monthly or yearly. I can only get 3 months worth of data. Do i need to change my excel setting? I read the code no where to modify. Thanks Dalmar | |
Posted by dalmar on |
Rate this: (4/5 from 2 votes)
We liked it so much that we decided to host it and it can be downloaded freely here. For interest, the first issue was not so straight forward. This is because the dates differ for each security due to availability, dividends etc. To overcome this, we first calculated the dates required and then matched the results of each web query to the dates. We even took into account public holidays. To overcome the second issue, we broke the date range into chunks and execute the web query multiple times to get the full date range specified. The VBA code is open and commented. Any feedback is much appreciated. Enjoy. | |
Excel Business Forums Administrator | |
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) | |
Posted by BodyworkeR on |
Rate this: (3/5 from 1 vote) Thanks Admintrators and those who contributed making it happen. The macro works fine and does just what I wanted. Yes it takes little while going through looping each stock at the time, but hey, it is awsome to sit back with your arms folded behind your kneck and watch macro at work. You guys rock! I got another problem bit more complex than this, I will let you know next time if it is even doable. Regards, | |
cano geel | |
Posted by Oz on |
Rate this: (3/5 from 1 vote) VBA Code:
| ||
Excel Business Forums Administrator | ||
Posted by Excel Helper on |
Rate this: (3/5 from 1 vote) You gave wonderful information which is useful for me... Thanks for sharing information.. | |
[url=http://www.checkthatcompany.co.uk/]credit check company[/url] | |
Posted by haik on |
Rate this: (3/5 from 1 vote) 1) I need quotes on the OPTION, not the STOCK. So, for instance, the Feb $113 Call on SPY has an opra code .SPYBI. I need the Bid, Ask and Mark on that option to stream over into excel. Don't care too much for a lot of historical data, just delayed-20 minutes would be perfect. 2) I also need the option greeks (especially delta) on .SPYBI I couldn't find option pricing on Yahoo! Finance, and while MSN-Money gave me option pricing, I couldn't find delta's there. I'm hoping the wizards here have an answer to my dilemma... Thanks! | |
Posted by fxsunny on |
Rate this: (3/5 from 1 vote) http://niftyprediction.blogspot.com/2009/06/options-greeks-calculator-excel.html If you just want to look at the greeks outside of Excel, go to the Option Industry Council site, http://www.optionseducation.org/ Hope this stuff helps. BodyworkeR | |
Posted by BodyworkeR on |
Back | Displaying page 2 of 5 | Next |
Excel templates and solutions matched for Downloading Market Data For Free:Solutions: Download Market Data Download Stock Quotes Complete Trading System Real Time Stock Quotes Options TradingCategories: Market Data Access |