Skip to content

Gustaavo-404/expertinvest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExpertInvest

ExpertInvest is a web-based investment portfolio optimization platform designed to help users determine the optimal asset allocation under a set of constraints.
The system applies Linear Programming techniques using the Simplex method, implemented in Python with PuLP, and presents results through an interactive web interface.

This project was developed as the final assignment for the Linear Programming course during my undergraduate studies.


Overview

ExpertInvest allows users to:

  • Create an account and authenticate
  • Define a set of investment assets (titles)
  • Apply financial and logical constraints
  • Optimize portfolio allocation using Linear Programming
  • Visualize the optimal allocation through interactive charts

The platform focuses on educational and analytical purposes, demonstrating how mathematical optimization techniques can be applied to real-world financial scenarios.


Technologies Used

Backend

  • Node.js
  • RESTful API architecture

Optimization Engine

  • Python
  • PuLP (Linear Programming library)
  • Simplex Method

Frontend

  • React
  • Chart.js (for data visualization)

Database

  • SQLite

System Architecture

The system is divided into three main layers:

  1. Frontend (React)
    Responsible for user interaction, data input, and result visualization.

  2. Backend (Node.js)
    Handles authentication, request processing, database communication, and integration with the optimization API.

  3. Optimization API (Python)
    Receives asset data and constraints, builds a Linear Programming model using PuLP, solves it with the Simplex method, and returns the optimal allocation.


How the Optimization Works

  1. The user accesses the Optimize section after logging in.
  2. The user defines:
    • Investment assets (titles)
    • Constraints (e.g., allocation limits, total investment rules)
  3. The backend sends this data to the Python optimization service.
  4. The optimization model is solved using the Simplex algorithm.
  5. The system returns:
    • The optimal percentage allocation for each asset
  6. Results are displayed as a horizontal bar chart using Chart.js.

How to Run the Project Locally

Prerequisites

  • Node.js
  • Python 3.x
  • npm
  • pip

Step-by-step

1. Navigate to the project root

cd expertinvest

2. Start the backend

cd backend
npm run dev src/app.js

3. Start the optimization

cd api
python app.py

4. Start the frontend

cd frontend/src
npm run dev

Backend (Node.js)

The backend is responsible for authentication, request handling, database communication, and integration with the optimization API.
It is implemented using Node.js and follows a RESTful architecture.


Optimization API (Python)

This service is responsible for running the Linear Programming optimization using the Simplex method.
It receives asset data and constraints, builds the optimization model with PuLP, and returns the optimal portfolio allocation.


Frontend (React)

The frontend provides the user interface for interacting with the platform, submitting optimization parameters, and visualizing results.
Optimization results are displayed using interactive charts built with Chart.js.

After starting all services, the application can be accessed through the URL provided by the React development server.


Features

  • User authentication
  • Asset and constraint input
  • Linear Programming optimization
  • Simplex-based solution
  • Interactive visualization of optimal allocations
  • Modular backend and optimization architecture

Academic Context

This project was developed as the final project for the Linear Programming course, with the goal of applying theoretical optimization concepts to a practical software solution.


Disclaimer

This project is intended for educational and analytical purposes only and does not constitute financial or investment advice.

About

A sophisticated web platform that uses linear programming (Simplex method) to optimize investment portfolios. Users input their assets and constraints, and the system calculates the optimal allocation percentage for each asset to maximize returns or minimize risk.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors