TradingGym is a toolkit (in Python) for creating trading and backtesting environments, especially for reinforcement learning agents, but also for simpler rule-based algorithms. It follows a design inspired by OpenAI Gym, offering various environments, data formats (tick data and OHLC), and tools to simulate trading with costs, position limits, observation windows etc. Licensed under MIT. This training environment was originally designed for tickdata, but also supports OHLC data format. WIP. The list contains the feature columns to use in the trading status.

Features

  • Environments for RL training, with “step”, “reset”, “render”, etc., following Gym-style API
  • Support for both tick data and OHLC data input formats for observations
  • Fee/cost modeling, max position constraints, features for bid/ask pricing etc.
  • Ability to inspect transaction details, reward, state, etc., for debugging/training
  • Simple installation via python setup.py install and integration with standard data tools (pandas, numpy)
  • Visualization/rendering support to see how trades/actions evolve over steps/environment episodes

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow TradingGym

TradingGym Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of TradingGym!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Python

Related Categories

Python Algorithmic Trading Platform

Registered

2025-09-19