Banking, Finance and Investment Industry
VBA /Software Developer: Francis Lim
Project Categories: Data-Mining, Data Cleansing, Financial Modelling, Numerical Analysis
Freeware: Download Historical Stock Data
System Requirements
Windows XP, Windows Vista, Windows 7
Microsoft Excel 2003 or above
This Excel Spreadsheet will download historical stock prices provided by Yahoo Finance. A freeware Spreadsheet. It is written in Visual Basic Applications (VBA), a macro programming language for Microsoft Office - Access, Excel, Word, FrontPage, Outlook, PowerPoint, and Visio.
To know your stock ticker quotes, please refer to yahoo.finance.com. The downloaded stock data contains Date, Open, High, Low, Close and Volume in ascending date order.
In just 3 simple steps (See below picture), you can download global stock historical data:-
Step 1: Key in the Stock Tickers in Column (A). Limited to maximum rows in excel worksheet.
Step 2: Select number of years to download (1-Year, 2-Year, 3-Year, 5-Year, All Years).
Step 3: Select frequency (Daily, Weekly, Monthly).
Just Press "Download" Button.
Office Automation with VBA
What is Visual Basic Applications (VBA)?
· Visual Basic for Applications or VBA is a macro script computer programming language which is used to control Microsoft Excel's functionality.
· VBA can also be used to control Microsoft Access, Excel, Word or other programs that come with VBA.
· VBA controls Microsoft Excel by means of macros which are also called procedures along with its program element.
Where are Excel Macros Stored and Run?
VBA code is typed in the VBA Editor in what are called modules. A module resembles a Word document in both organization and typing (see above picture). You type commands in these modules then run them to control Microsoft Excel.
The VBA modules are organized in what is called a VBA project A VBA project is defined as a collection of modules and other programming elements embedded in the application program. When a new workbook file is created in Microsoft Excel, a new VBA project is automatically created and associated with that workbook. A workbook can contain only 1 VBA project. You add VBA modules, code and other elements to a VBA project and run your macros procedures you created from the workbook.
How is VBA used in Microsoft Excel
VBA allows a user to:
Automate report generation in Microsoft Excel
Automate chart creation in Microsoft Excel
Perform task analysis and data processing in Microsoft Excel
Automate communication between Microsoft Excel and databases
Interface and build professional programs with VB.net, C#, Java to create extended application that can be executed as stand-alone applications.
The Excel program pictured on the left is a example built in VBA which demonstrates building a web data-mining program in Excel.