Skip to content

ekcm/Smart-Portfolio-Optimiser

Repository files navigation

Smart Portfolio Optimiser

Contributors MIT License


Smart Portfolio Optimiser

A Fully Managed Portfolio Analyzer and Optimiser

Table of Contents
  1. About The Project
  2. Getting Started
  3. License
  4. Contributors

About The Project

App Overview

Project Features

  1. Portfolio Creator and Editor
  2. Portfolio Analyzer for Standard Metrics
  3. Portfolio Optimiser for Risk and Return
  4. Portfolio Interactive Charts
  5. Portfolio Rules
  6. Porfolio Rules Logs

Built With

Key Libraries Used (Frontend)

  1. Shadcn/ui
  2. Recharts
  3. Zustand
  4. Socket.IO

Key Libraries Used (Backend)

  1. PyPortfolioOpt
  2. LangGraph
  3. Tavily
  4. OpenAI

(back to top)

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

Before you can run the application, you must have the following installed:

  • Node
  • NPM
  • Python3

Caveats and Notes

  1. This project uses MongoDB, and will not run unless the proper Environment Variables have been loaded.
  2. This Project consists of both a frontend and backend, as well at some microservices. The Frontend runs on http://localhost:3000 while the Backend runs on http://localhost:8000.

Installation

  1. Clone the repo

    git clone https://github.com/ekcm/fyp.git
  2. Configure environment variables

    • There are several environment files required for the application to run
    • Duplicate copies of .env-example in the respective directives and rename it to .env
        cd frontend
        cd nestjs-backend
        cd python-backend
        cd python-backend/optimiser_service
    • Fill in the required information
  3. Running the entire application with Docker

    docker-compose up

This will start the entire application, including the frontend, backend, and microservices.

Running the Front End

  1. Change Directory to the Frontend (/frontend)
  2. Install NPM packages
    npm install
  3. Duplicate a copy of .env-example in the same directory, and rename it to .env.
  4. Run the Frontend
    npm run dev
  5. The frontend can be accessed at:
    http://localhost:3000/

Running the Monolithic Back End

  1. Change Directory to the backend (/nestjs-backend)

  2. Duplicate a copy of .env-example in the same directory and rename it to .env.

  3. Fill in all the necessary details.

    1. MongoDB Details can be from when creating an Atlas Account.
  4. Run the following to compile and run the application.

    npm run start
  5. Documentation: To get an overview of all available APIs, head to:

    http://localhost:8000/api

Running the Python Microservices

If you are not using docker-compose, you can run the python services individually.

Finance News Service:

cd python-backend/finance_news
docker build -t finance-news-service .
docker run -p 5004:5004 --env-file ../.env finance-news-service

Market Commentary Service:

cd python-backend/market_commentary
docker build -t market-commentary-service .
docker run -p 5003:5003 --env-file ../.env market-commentary-service

Optimiser Service

cd optimiser_service
docker build -t optimiser-service .
docker run -p 6969:6969 --env-file ../.env optimiser-service

Report Generator Service:

cd python-backend/report_generator
docker build -t report-generator-service .
docker run -p 5002:5002 --env-file ../.env report-generator-service

Stock Service:

cd python-backend/stock_service
docker build -t stock-service .
docker run -p 5001:5001 --env-file ../.env stock-service

Steps to start the python workflow:

  1. Edit the .env file with the required environment variables according to the .env-example
  2. Run the stock data service to populate the database with stock data
  3. Start the other python services
  4. The frontend will connect to the python services and call them accordingly

To read the docs for the python services

  1. Run the services
  2. Open the docs in a browser using the following links

(back to top)

\

Screenshots

Dashboard

App Overview

Portfolio

Create Portfolio Create Order Transaction

Finance news

Finance News Dashboard Individual Finance News

License

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

(back to top)

Contributors

This project was built by the following contributors:

Ang Wei Sheng - Github
Bryan Lee - Github
Chester Chia - Github
Elijah Khor - Github
Japheth Leong - Github
Klement Goh - Github

(back to top)

About

A Smart Portfolio Optimiser that utilises quantitative finance techniques and LLMs on top of a portfolio management application to help portfolio managers make faster, better, and more reliable decisions

Topics

Resources

Stars

Watchers

Forks

Contributors