TorchTrade/torchtrade
Modular reinforcement learning framework for algorithmic trading
What it solves
TorchTrade is a machine learning framework designed to make the deployment of reinforcement learning (RL) and other AI methods for algorithmic trading more accessible. It bridges the gap between research and production by providing a unified codebase for both offline backtesting and live trading across multiple major exchanges.
How it works
Built on TorchRL, the framework provides modular environments that can be configured for spot or futures trading. It supports a wide range of RL methodologies (online, offline, model-based, and contrastive learning) and integrates modern AI actors, including local and frontier LLMs. The system allows for multi-timeframe observations (e.g., training on 1m, 5m, and 1h bars simultaneously) and includes built-in support for technical indicators and custom feature engineering.
Who it’s for
It is designed for quantitative traders, AI researchers, and developers who want to build, train, and deploy RL-based trading agents that can operate on real-time market data.
Highlights
- Multi-Exchange Integration: Direct support for live trading on Alpaca, Binance, Bitget, Bybit, and OKX.
- Diverse AI Actors: Supports PPO, DQN, IQL, GRPO, and DSAC algorithms, as well as LLM-based agents that can use tools (like Google News) for sentiment analysis.
- Flexible Environments: Offers both sequential and one-step trading environments with support for bracket orders (Stop Loss/Take Profit).
- LLM Fine-Tuning: Ability to train or fine-tune local LLM actors using GRPO or SAO.
- Research-Ready: Includes pre-processed OHLCV datasets on HuggingFace and pretrained encoder transforms for time series.
相關
- 專案
- 專案
- 專案
- 專案
- 專案