Steve is wanting to do additional research for his parents and wants to expand the dataset to include the stock market over the last few years. The purpose of the analysis was to refactor the original code to loop through all the data one time in order to collect the same information in a faster amount of time. In order to accomplish this, Visual Basic Application (VBA) in Excel was used to find the total daily volume and return.
Using images and examples of your code, compare the stock performance between 2017 and 2018, as well as the execution times of the original script and the refactored script.
- What are the advantages or disadvantages of refactoring code?
- How do these pros and cons apply to refactoring the original VBA script?