Skip to content

A stock web application with display metrics for live data, machine-learning based predictions and options strategy visualizer.

License

Notifications You must be signed in to change notification settings

mh2rashi/StockPeer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

StockPeer: Crafting Alpha through Data and Strategies

A stock web application with display metrics for live data, machine-learning based predictions and options strategy visualizer.

Table of Contents
  1. About The Project
  2. Major Technologies Used
  3. Installation
  4. Usage
  5. Next Steps
  6. License
  7. Contact
  8. Acknowledgments

About The Project

The goal of this project was to create a full-stack web application where users could leverage live stock data to accomplish three tasks:

  1. Stock Analysis (Dashboard page): By entering the appropriate stock ticker or company name in the search bar, there will be 6 dashboards populated, giving the trader a comprehensive view of the company, starting column-wise:
    • Profile: This box displays live stock data subject to open market days with the investor website and phone number. In addition, there will be a summary of the company as well.
    • Holders: The next two boxes display the top 5 institutional and mutual fund holders with the number of shares and their respective values.
    • Balance Sheet: This box gives you a visual breakdown of the Balance Sheet using a simple radar chart, where Total Assets = Total Liabilities and Stockholder's Equity.
    • Revenue & Earnings: This box gives a visual breakdown using a bar chart for the company's revenue and earnings for the most recent years.
    • Risk Ratings: This box gives you the Environment, Social, and Governance ratings for the company provided by Sustainalytics. The individual risk scores are out of 10.
    • Price Movements: The last box shows the latest high, closing, and low price for the stock.

Logo

  1. Revenue Predictions (Predictions page): Using a simple linear regression model, we predict the revenue for the next 4 years for a particular stock.

Logo

  1. Options Strategy Visualizer (Options Builder page): This page allows you to build a custom options strategy using live stock data and calculates option price and Greeks.

    • The first row allows you to add and remove as many options as you want with the ability to customize components (direction, amount, kind, strike, and expiry). Changing any one component automatically updates the price and Greeks according to the Black-Scholes formula.

    • The second row shows two boxes. The first is for Stock Data with adjustable price (live price using a toggle button) and interest rate. The second box shows a list of sample strategies with explanations to help the investor get started.

    • The last row displays the payoff graph for the options strategy built using the first two rows. It also lets you save your strategy and access it upon sign-up.

Logo

Logo

(back to top)

Major Technologies Used

Front-End:

React Vite TypeScript Recharts Material UI MongoDB

Back-End:

Express.js Axios Node.js Cheerio Websockets

(back to top)

Installation

Please follow instructions below to install and run the project on your local device.

  1. Clone the repository.

    git clone https://github.com/mh2rashi/StockPeer.git
  2. Install NPM packages in client and server folders.

    cd server && npm install
    cd client && npm install
  3. Get a free API Key at Finnhub Stock API.

  4. Enter your API in client/.env.local file.

    API_TOKEN = 'ENTER YOUR API'
  5. Run the the development server on your local machine.

    cd server && npm run dev

(back to top)

Usage

Please access the Live Demo for this project. Enter an appropriate ticker to view real-time stock prices subject to US market hours.

(back to top)

Next Steps

  • Integrate real-time stock prices into the price graph on the Dashboard page.
  • Integrate a more interactive price graph with zoom-in/zoom-out functionality, custom time horizon, and candlestick patterns.
  • Add a new page with backtesting functionality to test custom option strategies.
  • Add more advanced machine-learning models to predict other metrics for the stock, such as price, etc.
  • Add functionality to compare two or more stocks simultaneously.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Hamza Rashid

Bilal Rashid

(back to top)

Acknowledgments

I would like to thank Ed Roh for inspiring the project idea, and my heartfelt gratitude goes to my brother and partner for this project, Bilal Rashid.

(back to top)

About

A stock web application with display metrics for live data, machine-learning based predictions and options strategy visualizer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published