PrimoGPT  by ivebotunac

Trading system research using NLP and reinforcement learning

created 5 months ago
281 stars

Top 93.7% on sourcepulse

GitHubView on GitHub
Project Summary

PrimoGPT is a modular trading system integrating NLP and DRL for enhanced capital market decision-making, targeting researchers and developers in quantitative finance. It aims to minimize risk and maximize returns by analyzing financial texts and executing adaptive trading strategies, demonstrating superior performance in experimental evaluations.

How It Works

The system comprises two core components: PrimoGPT, a custom RAG-based Transformer model fine-tuned on Meta-Llama-3.1-8B-Instruct for extracting NLP features from financial texts, and PrimoRL, a DRL framework built on Gymnasium and FinRL, utilizing Stable Baselines 3 algorithms. PrimoRL integrates technical indicators and NLP features into its state space and reward function, balancing portfolio return and Sharpe ratio for adaptive trading.

Quick Start & Requirements

  • Install: Primarily through notebooks for experimentation.
  • Prerequisites: Python, libraries like Unsloth, QLoRA, LangChain, Gymnasium, FinRL, Stable Baselines 3. Data sources include Finnhub and Yahoo Finance. GPU recommended for model training.
  • Resources: Fine-tuning PrimoGPT and training RL agents can be computationally intensive.
  • Links: Project structure and experimentation are detailed in the notebooks/ directory.

Highlighted Details

  • Leverages a custom RAG system for flexible NLP feature generation from financial news and reports.
  • PrimoRL integrates NLP features into the state space and reward function for improved trading decisions.
  • Experimental results show PrimoRL (SAC) outperforming benchmarks like Buy & Hold, Momentum, and FinRL variants on specific tech stocks.
  • Built upon and extends the AI4Finance Foundation's FinRL and FinGPT projects.

Maintenance & Community

This project originated from doctoral research and is presented for research and educational purposes. Future development is outlined in a roadmap focusing on library creation and user interface development. No specific community channels or active maintainer information are provided beyond the research context.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The code is experimental and intended for educational purposes; it does not constitute financial advice. Real-world trading requires professional consultation.

Limitations & Caveats

The system is not a ready-to-use application and requires significant technical expertise to set up and operate. It is designed for research exploration, and usability improvements are planned for future iterations. The experimental nature means it has not been validated for live trading.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
21 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.