VBA scripting - Excel

image

VBA to Analyze generated stock market data

image

Created VBA script that loops through all the stocks for one year and outputs the following information, the ticker symbol,

yearly change from the opening price at the beginning of a given year to the closing price at the end of that year, the percentage change from the 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,

image

added functionality to the script to return the stock with the "Greatest % increase", "Greatest % decrease", and "Greatest total volume".

image

Made the appropriate adjustments to VBA script to enable it to run on every worksheet (that is, every year) at once (for year 2020, year 2019 and year 2018), used conditional formatting that will highlight positive change in green and negative change in red by VBA script.

Screenshots of work, VBA script and statement file are attached with this Repository.

Final Statement for Provided Data

Based on the given data analysis for the years 2018, 2019, and 2020, the following conclusions can be drawn:

Greatest Percentage Increases:

Throughout the course of the three years, the ticker symbol "YDT" continuously showed the largest % gain in value, demonstrating exceptional performance in comparison to other stocks in each year. This implies that "YDT" may have benefited from significant expansion prospects or favorable market perception.

Greatest Percentage Decreases:

The ticker symbols "VNTO" in 2020, "RKY" in 2019, and "RKY" once more in 2018 on the other hand, displayed the biggest percentage declines in value. Significant losses were seen in these equities, which may have been brought on by subpar financial results, market turbulence, or other unfavorable elements influencing investor mood.

Greatest Total Volume:

Over the course of the three years, the ticker symbol "QKN" continuously had the highest total stock volume traded. This suggests that there is a lot of trading activity and liquidity for "QKN" which makes it a desirable choice for investors seeking actively traded assets.

Consistency in Top Performers:

Even if the performance of some stocks may have varied from year to year, some patterns became apparent. For example, "YDT" had robust growth every year, whereas "RKY" saw notable decreases in two of the three years.

Market Dynamics:

The data illustrates how the stock market is dynamic and how equities move in both good and negative directions over time. These swings are influenced by a number of variables, including investor mood, industry trends, corporate performance, and macroeconomic situations.

Diversification and Risk Management:

Using these insights, investors may adjust their investing strategy to emphasize diversity as a means of reducing the risks associated with the performance of particular stocks. Investors can more effectively manage market volatility and seize growth opportunities by diversifying their holdings across a range of assets and industries.

Ultimately, the data analysis emphasizes how critical it is to keep an eye on stock performance, spot trends, and make well-informed investing decisions based on past performance as well as current market conditions.