TensorTrade — RL framework for trading agents
An open-source Python reinforcement-learning framework for algorithmic trading agents: build, train, evaluate, and deploy RL agents that aim to beat buy-and-hold. It is the strategy / policy-learning layer of this wiki’s founding trio — distinct from a hand-coded strategy in a bot like banbot, the strategy here is learned by an agent interacting with a simulated market. T3: a well-starred (~6.4k★), actively maintained open-source framework, but author-published and without an independent results benchmark.
What it is
A modular, Gym-compatible RL toolkit. A trading task is decomposed into swappable components:
- Action schemes — the agent’s move set (buy / sell / hold, position sizing).
- Reward schemes — the training signal (e.g. position-based returns).
- Observers — what the agent sees each step (feature observations of the market).
- Portfolio / wallets — account and position state.
- Exchange simulation — fills, commissions, the market the agent trades against.
- Data feeds — the price/feature streams driving the episode.
Agents are trained via Ray RLlib. Apache-2.0; active (v1.0.4, Feb 2026; Python 3.11+).
Why it matters here
TensorTrade is the canonical example of the RL-for-trading approach: rather than predict prices (Kronos) or execute a fixed rule set (banbot), it learns a trading policy from reward. Its exchange-simulation + data-feed design shares the same anti-lookahead concern as event-driven backtesting — the simulated market must not leak the future into the agent’s observation.
Library vs platform — the TradeMaster contrast
trademaster (NTU) explicitly positions itself against TensorTrade: it calls TensorTrade a “lightweight backtesting library focused on data pipelines” and itself a holistic ecosystem (bundled simulators, a trading-specific algorithm zoo, systematic evaluation). The two mark the ends of an RL-for-trading spectrum — TensorTrade the composable toolkit you assemble, TradeMaster the batteries- included platform. Useful complement: TensorTrade’s modular components teach the anatomy; TradeMaster’s zoo offers ready algorithms.
Cluster note
TensorTrade was the second financial-ml source parked in the hub _inbox (after Kronos); its
park record flagged that one more quant/ML-for-trading source would hit the ≥3 spin-out trigger.
banbot was that source — this spoke is the result.
Related
reinforcement-learning-trading · trademaster · algorithmic-trading · banbot · kronos-financial-foundation-model · synthesis