Code Monkey home page Code Monkey logo

vba-challenge's Introduction

VBA Challenge

VBA script to create a summary of stock price data provided in an excel file

Following information is summarized for all the stocks

  • 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.

Following information is computed based on the summarized data

  • Stock with greatest % price increase
  • Stock with greatest % price decrease
  • Stock greatest total volume

Assumptions

  • Each worksheet contains data for one year

  • Header column exists and input data is provided in the following order

    • ticker (COL A)
    • date (COL B)
    • open price (COL C)
    • high price (COL D)
    • low price (COL E)
    • close price (COL F)
    • volume (COL G)
  • No Empty rows exist in between the data

  • Stock price data is sorted by ticker symbol and date (ascending order)

Files

  • Source code:

    • scripts/StockQuoteAnalysis.bas
  • Data:

    • data/alphabetical_testing.xlsx
  • Results screenshots:

    • results_screenshots/2018.png
    • results_screenshots/2019.png
    • results_screenshots/2020.png

Run Instructions

  • Open Excel file containing the data.

  • Click on 'Developer' tab and open 'Visual Basic'

  • From 'Project Explorer', Right click on 'This Workbook' and click on import

  • Select scripts/StockQuoteAnalysis.bas file to import the VBA code

  • Click on 'Run' button to create the summary

Sample screenshot

plot

Disclaimer

This repo was published for educational purpose only. Copyright 2023 edX Boot Camps LLC. All rights reserved.

vba-challenge's People

Contributors

ramkumarpj 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.