Home / LLM agents & research
Yvictor/TradingGym
Gym-style environment for reinforcement learning trading and backtesting
What it is
A Python toolkit, inspired by OpenAI Gym, for training and backtesting reinforcement learning trading agents or simple rule-based algorithms. The environment is designed for tick data but also supports OHLC data, with configurable parameters such as fee, max position, and feature columns, and it produces detailed transaction logs during backtests. It fits researchers and developers experimenting with RL-based trading strategies in Python. The project is a work in progress, with several listed training methods and a realtime trading environment still unimplemented.
At a glance
Research onlyOur rating, based on popularity, maintenance and how ready it is for real use.
| Best for | Developers |
|---|---|
| Used for | Backtesting, Strategy research |
| Markets | Multi-market |
| Stack | Python |
| Learning curve | Moderate learning curve |
| Practical value | Medium practical value |
| Cost | Free and open source |
| Hardware | No GPU needed |
| Maintenance | No commits in over six months |
GitHub stars, last 30 days
Daily snapshots since 2026-09-12 (up to 30 days): +3 over the period, now 1,923. Gaps mean no snapshot was taken that day.
Trading and Backtesting environment for training reinforcement learning agent or simple rule base algo.
Similar tools
Deep reinforcement learning library for automated quantitative trading
Python algorithmic trading framework with machine learning support
Python backtesting and live trading platform for strategies
Fast limit order book simulator for trading strategy research
Python reinforcement learning framework for training trading agents
Modular schedule-driven backtesting engine for equities and ETFs