Giter Site home page Giter Site logo

stock_analysis's Introduction

stock_analysis

An Analysis on Green Energy Stock.

Wall Street Picture

Stock Analysis

Overview of Project

Purpose:

Steve's parents are interested in investing in Green Energy Stock, they are looking at putting all their money in to DAQO New Energy Corp. (ticker DQ), they have not done any research on DQ and have asked Steve to help them with their decision. Steve has data for 12 Green Energy Stocks for the years 2017 and 2018. Steve is going to use this data to determine the Total Daily Volume and Yearly Return, based on this he can give his parents an informed recomendation.

Results:

Definations (referenced from Module 2.2.1)

  • Total Daily volume is sum all the total number of shares traded throughout the day in the year; it measures how actively a stock is traded.
  • Yearly return is the percentage difference in price from the beginning of the year to the end of the year.

DQ Analysis (2018):

The data from 2018 was used to determine the Total Daily volume which was almost 108M as well as the yearly return of -63%. Steve decided to do an analysis on all 12 of the stock for 2017 and 2018 since the 2018 return on DQ was so poor.

All Stock Analysis (2017-2018):

The analysis on the 2017 and 2018 yearly return shows that only EPNH and RUN performed better in 2018, all other stock had poor performanses in 2018 vs. 2017. (see screenshots for results)

All Stock Analysis (2017)

Screen Shot 2021-12-05 at 11 11 21 PM

All Stock Analysis (2018)

Screen Shot 2021-12-05 at 11 11 34 PM

Refactored Code:

Steve has determined that he could use this workbook to analyse data for future years and has asked to refactor the VBA code so that it runs faster.

The orginal code took almost 0.30 seconds to run for 2017 and 0.296 seconds for 2018. (see screenshots below)

Screen Shot 2021-12-05 at 9 41 04 PMScreen Shot 2021-12-05 at 9 42 02 PM

After the code was refactored it took 0.085 seconds to run for 2017 and .078 seconds to run for 2018.

VBA_Challenge_2017VBA_Challenge_2018

Summary:

What are the advantages or disadvantages of refactoring code?
  • Advantages of refactoring code is that it improves readability, the code is cleaner and much easier to comprehend. When working with big sets of data, you can save a considerable amount of time as the code runs faster.

  • Disadvantages of refactoring code if there is a lack of understanding of what the code does you risk creating bugs, refactoring is also very time-consuming.

How do these pros and cons apply to refactoring the original VBA script?
  • Pros: The time to run the code has decreased by almost 300%, this is useful when using this workbook to analyze massive amounts of data.

  • Cons: It was time-consuming to debug the modified code. Debugging would be challenging and time-consuming if there were thousands of lines of code.

stock_analysis's People

Contributors

java2509 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.