An open API service indexing awesome lists of open source software.

https://github.com/pablodieaco/quant-drl-web

quant-drl-web is a Streamlit-based interactive dashboard for visualizing and interacting with DRL-driven portfolio management models.
https://github.com/pablodieaco/quant-drl-web

deep-reinforcement-learning quantitative-finance quantitative-trading streamlit yfinance

Last synced: about 2 months ago
JSON representation

quant-drl-web is a Streamlit-based interactive dashboard for visualizing and interacting with DRL-driven portfolio management models.

Awesome Lists containing this project

README

          

# ๐Ÿ“Š quant-drl-web

**quant-drl-web** is a Streamlit-based interactive dashboard for visualizing, evaluating, and simulating Deep Reinforcement Learning (DRL) models applied to portfolio management.

It serves as the frontend for the [`quant-drl-core`](https://github.com/pablodieaco/quant-drl-core) research framework, providing a user-friendly interface for financial data exploration, model comparison, and portfolio decision analysis.

> ๐ŸŽ“ Developed as part of my **Final Degree Project (TFG)** in the **Double Degree in Mathematics and Computer Engineering** at the **University of Seville**.

---

## โœจ Features

- ๐Ÿ“ˆ **Model evaluation & metrics explorer**
- ๐Ÿ’ก **Portfolio simulation and strategy testing**
- ๐Ÿง  **Deep RL integration** (PPO, SAC)
- ๐Ÿ”Œ **Database-backed** via PostgreSQL
- ๐ŸŽจ **Streamlit** multipage navigation
- ๐Ÿณ Docker & Docker Compose for deployment
- ๐Ÿ“‚ Examples and demo models included

---

## ๐Ÿ–ผ๏ธ App Preview

### ๐Ÿ“Š Financial Information
An overview of each company's economic and financial data.

Financial Info

---

### ๐Ÿ“ Evaluations

#### ๐Ÿงช Batch Evaluation
Evaluate multiple simulation at once, and analyse the performance of your model.

Batch Evaluation

#### ๐Ÿ” Individual Evaluation
Dive deep into the analysis of a single simulation.

Individual Evaluation

---

### ๐Ÿ“ˆ Metrics Analysis
Explore key performance indicators of your trained models.

Metrics Analysis

## ๐Ÿ“ Project Structure

```bash
quant-drl-web/
โ”œโ”€โ”€ web/ # Streamlit app (modular)
โ”‚ โ”œโ”€โ”€ app.py # Main entry point
โ”‚ โ”œโ”€โ”€ pages/ # UI Pages (Streamlit multipage)
โ”‚ โ”œโ”€โ”€ commons/ # Session & layout
โ”‚ โ””โ”€โ”€ db/ # DB scripts and seeders
โ”œโ”€โ”€ examples/ # Sample models and evaluation results
โ”‚ โ”œโ”€โ”€ models/ # Pretrained DRL models
โ”‚ โ””โ”€โ”€ results/ # evaluation_results.csv
โ”œโ”€โ”€ docker-compose.yml # Launch web + PostgreSQL
โ”œโ”€โ”€ Dockerfile # Web app container
โ”œโ”€โ”€ build.sh # Script to copy core + build
โ””โ”€โ”€ requirements.txt # Python dependencies
```

---

## โš™๏ธ Requirements

- Docker & Docker Compose
- Python 3.10+ (optional for local runs)
- `quant-drl-core` available locally (used during build) (TODO: It will not be necessary in future releases)

---

## ๐Ÿš€ Quickstart

### 1. Clone the repo
```bash
git clone https://github.com/pablodieaco/quant-drl-web.git
cd quant-drl-web
```

### 2. Create a `.env` file using the sample file `.env.sample`
```bash
cp .env.sample .env
```

Then edit the `.env` file:
```env
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=

RESULTS_CSV=examples/results/evaluation_results.csv
MODEL_HIERARCHY=examples/models/metadata/hierarchy.json
```

### 3. Run using the latest Docker image (recommended)
This will pull the latest published image from GitHub Container Registry and run the app.

```bash
make run
```

Once running, the app will be available at http://localhost:8501

### 4. Local development mode (with local quant-drl-core)
If you're modifying `quant-drl-web` and want to test changes locally:

```bash
make build
make run-local
```
This will

- Build the Docker image with your local changes
- Launch the app using the new built image

Once running, the app will also be available at http://localhost:8501
---

## ๐Ÿงช Example Models

Weโ€™ve included pretrained models and example evaluation results inside the `examples/` folder:
- `examples/models/` โ†’ PPO and SAC agents
- `examples/results/evaluation_results.csv`โ†’ model evaluation scores

---

## ๐Ÿง  About this project

This dashboard is part of a broader research framework:

๐Ÿ‘‰ Check out `quant-drl-core` for:
- DRL training pipelines (PPO, SAC)
- Custom Gym environments
- Evaluation and visualization logic
- Experiment reproducibility

## ๐Ÿ“ License

This project is licensed under the **MIT License**.
See the [LICENSE](./LICENSE) file for details.

---

## ๐Ÿ™‹โ€โ™‚๏ธ Author

Made with โค๏ธ by **Pablo Diego Acosta**

- ๐Ÿ’ผ LinkedIn: [linkedin.com/in/pablodiegoacosta](https://www.linkedin.com/in/pablodiegoacosta)

---

## โœจ Todo / Ideas

- [ ] Embed live charts from financial APIs
- [ ] Auto-refresh evaluation dashboard with scheduled updates
- [ ] Live inference from trained DRL models
- [ ] Add functionalities for managing saved portfolios