FinMem LLM StockTrading
Basic Information
This repository contains the Python implementation and resources for FINMEM, a research LLM trading agent introduced in the paper "FinMem: A Performance-Enhanced LLM Trading Agent with Layered Memory and Character Design." It provides source code, configuration files, data folders, figures, and scripts to reproduce the agent and simulation workflows described in the paper. The project is structured around an entrypoint run.py and supports building and running in a Docker container. The agent integrates an LLM backbone (HuggingFace models served via TGI or OpenAI models such as GPT-4) together with a fixed embedding model (text-embedding-ada-002). The repo implements training and testing modes, checkpoint save and resume functionality, and configuration via config.toml and environment variables (OPENAI_API_KEY and optional HF_TOKEN). The implementation is intended to recreate the experiments and trading simulations reported in the paper.