FinMem-LLM-StockTrading  by pipiku915

LLM agent for stock trading, research paper

created 1 year ago
686 stars

Top 50.5% on sourcepulse

GitHubView on GitHub
Project Summary

FinMem-LLM-StockTrading provides a Python framework for an LLM-based autonomous trading agent designed for financial decision-making. It addresses the need for a rational architecture to process multi-source information, establish reasoning chains, and prioritize tasks in financial markets, targeting researchers and developers in quantitative finance and AI. The agent aims to boost cumulative investment returns through enhanced performance via layered memory and character design.

How It Works

FinMem employs a three-module architecture: Profiling for agent characteristics, Memory for layered processing of hierarchical financial data, and Decision-making for converting insights into investment actions. The memory module mimics human cognitive structures, offering interpretability and real-time tuning with an adjustable cognitive span to retain critical information beyond human perceptual limits, thereby improving trading outcomes.

Quick Start & Requirements

  • Installation: Build and run via Docker.
    • Build: docker build -t test-finmem finmem/.devcontainer/
    • Run: docker run -it --rm -v $(pwd):/finmem test-finmem
  • Prerequisites: Python 3.10 (in Docker), OpenAI API key, Hugging Face token (if using Hugging Face models).
  • Configuration: Requires setting OPENAI_API_KEY and HF_TOKEN in .env and configuring config/config.toml with model endpoints and names.
  • Resources: Requires sufficient resources for LLM inference and data processing.
  • Documentation: PDF

Highlighted Details

  • Layered memory system designed to align with human cognitive structures for financial data.
  • Adjustable cognitive span for retaining critical information over extended periods.
  • Supports training and testing modes, with checkpointing for resuming interrupted processes.
  • Demonstrated leading trading performance on real-world financial datasets compared to algorithmic agents.

Maintenance & Community

The project has been presented at AAAI Spring Symposium, ICLR Workshop LLM Agents, and participated in the IJCAI2024 "Financial Challenges in Large Language Models - FinLLM" challenge.

Licensing & Compatibility

The repository includes a LICENSE file, but the specific license type is not detailed in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README does not explicitly state the license type, which may impact commercial adoption. The system relies on external LLM APIs (OpenAI, Hugging Face TGI), making it dependent on their availability and stability.

Health Check
Last commit

11 months ago

Responsiveness

1 week

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

ai-hedge-fund by virattt

1.2%
39k
AI-powered hedge fund proof-of-concept for educational use
created 8 months ago
updated 3 days ago
Feedback? Help us improve.