Analysis of stock market data using VBA
Stock Market data, in Microsoft Excel format, for multiple years. Each tab represents a different year of data and contains daily company stock information as follows:
- Ticker symbol
- Date
- Opening Price
- Highest value
- Lowest value
- Closing value
- Trade Volume
- Create a VB script that will loop through all the stocks for one year for each run and take the following information.
- The ticker symbol.
- Yearly change from opening price at the beginning of a given year to the closing price at the end of that year.
- The percent change from opening price at the beginning of a given year to the closing price at the end of that year.
- The total stock volume of the stock.
- You should also have conditional formatting that will highlight positive change in green and negative change in red.
- Your solution will also be able to return the stock with the "Greatest % Increase", "Greatest % Decrease" and "Greatest Total volume".
- Make the appropriate adjustments to your VBA script that will allow it to run on every worksheet, i.e., every year, just by running the VBA script once.
SMU DS Boot Camp - VBA Scripting Challenge
- Download the Excel workbook vba-challenge/VBAStocks/Multiple_year_stock_data_analysis.xlsm.
- Open the downloaded workbook. This may take a few seconds given the file's size.
- Enable Macros.
- See the Instructions' tab in the workbook for VB script execution.
Multi Year Stock Data Screenshots
Individual execution scripts can be found in the vba-challenge/VBAStocks directory.
- Microsoft Excel 2016