Skip to content

(Hackathon project) Stockr.io is an application that allows new traders to make informed decision about stock trading.

License

Notifications You must be signed in to change notification settings

raihahahan/intuition-hackathon-helloWorld

Repository files navigation


Logo

Stockr.io

Stockr.io is an application that allows new traders to make informed decision about stock trading through Sentimental Analysis using Natural Language Processing. This was a submission for iNTUITION v9.0 Hackathon 2023 (https://intuition.ieeentu.com), but contributors are welcomed to continue developing this project.

**Disclaimer: This is just a project for fun. DO NOT solely use this for financial advice.**

Explore the docs »

View Demo · Report Bug · Request Feature

Stockr.io

Stockr.io is an application that allows new traders to make informed decision about stock trading through Sentimental Analysis using Natural Language Processing.

About The Project

demo-main

Usage

  1. Under "Pick a symbol", type in any stock ticker symbol.
  2. Click submit. The page will load for awhile.
  3. The results will shortly be shown on your screen: BUY, SELL or HOLD

Purpose

It is not uncommon for common folks like you and I to be interested in dabbling in the stock market, eager to flip a profit. But for most of us, we do not know where to begin. With that in mind, the team at Stockr.io decided to implement an interactive application that allows users to input a ticker symbol of their choice and obtain relevant data about how valuable the stock is perceived through various news sources.

Implementation

This project hacks various libraries and frameworks together in order to create a functioning application that is user-friendly. Read below for an explanation for an explanation of the overarching system behind this project:

  1. User visits web client, enters their input and clicks the "Submit" button.
  2. This sends a POST request to the backend web API.
  3. The web API routes this data into a message queue.
  4. The Python NLP project listens to this queue, and removes the first item of the queue to process it.
  5. Once done processing, the Python program sends the output to the result queue.
  6. A web socket connected to both the web client and the result queue listens to this queue, and broadcasts the output back to the web client.

diagram

(back to top)

Built With

  • Backend: C# .NET 6
  • Frontend: React Nextjs
  • Database: SQL Server (SQLEXPRESS)
  • NLP: Python
  • Message Queue: RabbitMQ

(back to top)

Getting Started

There is a total of four programs to be run in the CLI at the same time for this project to work properly. They may however run independently on its own:

  1. Web API: Server/WebAPI
  2. Web socket: Server/WebSocket
  3. Web client: Client/helloworld-client
  4. Python NLP project: sentiment-analyser/

You may also run the telegram bot (telegram/), but this runs independently on its own.

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/raihahahan/intuition-hackathon-helloWorld.git
    cd intuition-hackathon-helloWorld
  2. C# dotnet server

cd Server
dotnet restore
  1. Nextjs Web client
cd Client
npm install
NEXT_PUBLIC_RAPID_API_KEY=YOUR_API_KEY
NEXT_PUBLIC_RAPID_API_HOST=YOUR_API_HOST
  1. Python NLP project
cd sentiment-analyser
pip install -r requirements.txt
  • Get your newsapi API keys from https://newsapi.org/register. This is to retrieve the news sources to be added as arguments to the NLP model.
  • Add a .env file to the root of this Python project and add the following lines:
apiKey=YOUR_NEWSAPI_KEY
  1. Telegram bot
cd telegram
pip install -r requirements.txt
API_KEY=YOUR_TELE_API_KEY

Running local environment

  • Open four terminals (5 if with Telegram bot. We will improve this as part of the roadmap using docker compose) and run the following commands for each:
  1. .Net Web API
cd Server/WebAPI
dotnet run
  1. .Net Web Socket
cd Server/WebSocket
dotnet run
  1. React Nextjs
cd Client/helloworld-client
npm run dev
  1. Python NLP project
cd sentiment-analyser
python3 src/main.py
  1. Python Telegram bot
cd telegram
python3 main.py
  • Go to localhost:3000 to access the local environment of the web client.

(back to top)

Roadmap

  • Fix dockerization (issues with CORS)
  • Fix non-deterministic behaviour of state in Web Client (loading state sometimes doesn't change upon receiving message from RabbitMQ via SignalR)
  • Tidy up Models in backend so that we can wire up to a database (most likely SQL Server (Community)). We are currently using in-memory database.
  • Authentication (OAuth2)
  • Improve message queue implementation.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

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

(back to top)

About

(Hackathon project) Stockr.io is an application that allows new traders to make informed decision about stock trading.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages