Skip to content

Rutgers-Data-Science-Bootcamp/Stock-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock-analysis

Overview of the Project

Perform analysis on Stocks to help Steve

Purpose

Refractoring the VBA code to analyze Stocks Data for Steve to make it more efficient

Background

Steve has an excel file with stock data to analyze and he needs macros to run the analysis on new data in the future. By doing this analysis he wants to convince his parents to invest green enegergy stocks which has great revenue in the future.

Result

Refractoring the provided Code to run analysis for each year for all tickers, 2017 and 2018, respectivelt. In this proccess I used code which loop through all the data one time which more efficient and takes significantly less time to execute.

  1. The main difference between the code from the macros we wrote during the module and the code for this challenge is we need to use tickerIndex to access the correct index across the arrays we created for this challenge, they are tickers array and three output arrays as below:
Dim Tickers(12) as Single
Dim tickersVolume(12) as Long
Dim tickerStartingPrice as Single
Dim tickerEndingPrice as Single
  1. Create for loops to loop through the 4 arrays to output the "Ticker", "Total Daily Volume", and "Return" columns in the spread sheet as follwoing for 2017 and 2018, respectively.

2017_Stocks

2018_Stocks

Apparently, stocks return overall was much better in 2017 as compare to 2018 where most of the stocks return are negative.

  1. I measured the perforamnce of the macro after refractoring which is much faster than previous code.

VBA_Challenge_2017

VBA_Challenge_2018

Summary

  1. Refractoring the code makes my code more neat, fewer codes, and faster exeute time.
  2. These advantages mentioned above applied to the original VBA nicely, made it significantly fater than older one, almost 10 times faster. However, disadvantage for me was to understand to use tickerIndex in the right place to go through all the indexs in the arrays, this gave me very hard time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published