# Yvictor/TradingGym

Trading and Backtesting environment for training reinforcement learning agent or simple rule base algo.

Repository: https://github.com/Yvictor/TradingGym
Canonical: https://ross.abutalabs.com/products/tradinggym
Language: Python
License: MIT
License Family: permissive
Topics: trading, python, reinforcement-learning, trading-bot, trading-platform, trading-simulator, trading-strategies, trading-api, backtesting-trading-strategies, backtest
Last push: 2024-02-11T11:53:21+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3411, "days_push": 934, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1910, forks 370 (observed 2026-08-28T04:05:53.123726+00:00)

## What it is
TradingGym is an OpenAI Gym-style Python toolkit providing trading environments for training reinforcement learning agents and backtesting rule-based or RL trading strategies. It supports tick data and OHLC data with configurable fees, position limits, and feature columns.

## Use cases
- train a reinforcement learning agent for trading
- backtest trading strategies in python
- simulate trading on tick data
- gym environment for financial trading
- test rule-based trading algorithms
- backtest strategies on ohlc data

## When to choose
- you want an OpenAI Gym-style environment for trading RL research
- you need to backtest on tick-level or OHLC market data
- you want configurable fees and position limits in a trading simulator

## When to avoid
- you need production live trading with broker integration
- you want a maintained framework with active development
- you need built-in RL training algorithms, which are still work-in-progress

## Facets
- artifact type: library
- maturity: maintenance
- function: reinforcement-learning, simulation, trading, benchmarking
- domain: reinforcement-learning, fintech, machine-learning, simulation
- platform: python, cross-platform
- tags: openai-gym, backtesting, trading-environment, tick-data, rl-environment

## Member repositories
- Yvictor/TradingGym (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:53.123726+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:11:03.666459+00:00, confidence not recorded.
  - readme: https://github.com/Yvictor/TradingGym (fetched 2026-08-28T04:05:53.123726+00:00, sha 6a25e5bc4bc4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
