Giter VIP home page Giter VIP logo

stockviewer's Introduction

A Viewer for Stock Market Data

This is a Java project that retrieves stock price data for a ticker from Wall Street Journal and visualise data in the UI.

Screenshot of the demo

Demo

The project is implemented with Core Libraries of Java 1.8, including JavaFX. Please make sure the correct version of Java SDK to consume the product.


How to consume the project

The main class of the project called MarketGUI.java. To begin with, you need to compile the project using the following command in the terminal:

javac MarketGUI.java

Then, use the following command to start the project:

java MarketGUI

Introduction

When the program starts, a dialog should be displayed as below:

Dialog

This dialog is consist of input components for user to query specific market data for a ticker, including:

  • A drop-down box for selecting a ticker symbol from a list.
  • Two drop-down boxes for selecting the start and end dates respectively.
  • A submission button that allows user to submit input data to retrieve correspond stock market data.

There are some restrictions regarding user input before hitting the "Submit" button:

  • All input fields should not be empty.
  • The start date cannot be ahead of the end date, and the end date cannot be behind the start date.
  • The device should connect to the internet to hit the WSJ endpoint.

Otherwise, a dialog will pop up to show error message, and the query process will not be able to proceed.

If the input fields are valid, and the internet is connected, the endpoint provided by WSJ will be hit. Then, data retrieved from the API should be displayed in a separate window. This window draws two graphs showing the ticker data within the selected date range:

  • The stock’s open and closing values for each day displays via the deep or light grey lines in the upper diagram.
  • The stock's high and low value for each day displays via red or green bars in the upper diagram.
  • The stock's trade volume for each day displays yellow area in the lower diagram.
  • The horizontal axis represents dates, the vertical axis in the upper diagram shows stock prices, while the vertical axis in the lower diagram shows stock trade volume.

The UI:

Demo

The diagram discription:

Description

The window is responsive. User is able to interact with the diagram:

  • By clicking the top button "User Guide", a user guide dialog will pop up to inform user of how to parse the data from the diagram.
  • By hovering over the dots on the diagram, the user is able to check the date and the open and close prices and the volume of the stock trading.

Limitations

  • The user can only select specific tickers from the drop-down menu.
  • Due to the limitation of the endpoint of WSJ, only 5 days data will be retrived.

stockviewer's People

Contributors

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