The aim of the project is familiarize with Excel VBA. This Excel file containes VBA code to compute simple information based on series of data. The program is them improved using a refractd method to decrease the number of for-loops used.
By decreasing the number of for-loops and number of time to check in a database, we have effectively decreased the run time of the code by 85%. The specific runtime are provided in the supplimented screenshots. The code is also proved for methodolgical references.
A macro program is written to compute statistics of each stock data on file for an user-inputed year. This macro is then embedded onto a butten for simpler execution. The statistics include volumes as well as returns, which depends on the beginning and ending price of the stock. In refracting the code, we can run through the dataset fewer times than un-refracted algorithm, which consequentially means less runtime. However, potential downside could be the frexiblity and readability of the code for future user in difference context. Accesssbility suffers when code is tuned too much to a specific set of data. It is harder for programmers to manuver the code inside the for-loop.