Chapaty
Chapaty is a high-performance, async-first Rust library for training and evaluating reinforcement learning agents in financial environments. Inspired by OpenAI Gymnasium, Chapaty brings the rigor of standardized simulation interfaces to real-world financial markets.
Getting Started
Chapaty supports two primary workflows: High-Performance Backtesting for evaluating strategy grids, and Standard Reinforcement Learning for training agents step-by-step.
1. High-Performance Backtesting (1M+ Agents)
For massive grid searches, Chapaty leverages rayon to evaluate millions of agents in parallel, automatically tracking the top performers without memory overhead.
Run this example: examples/news_breakout_grid.rs
use Path;
use *;
use CsvWriterOptions;
async
2. Custom Reinforcement Learning (Gym Interface)
For researchers needing fine-grained control over the observation-action loop, Chapaty implements a standard API similar to OpenAI Gym.
use Path;
use *;
async
Note: Environments are async because they stream large financial datasets from cloud storage (e.g. GCS, BigQuery, S3, etc.).
For practical, ready-to-run agents, check out the examples to get started quickly.
Related Projects
| Project | Description |
|---|---|
| Gymnasium | RL API standard for Python environments |
| DeepMind Control Suite | Physics-based simulation and RL environments |
| Burn | Deep learning framework in Rust |
Chapaty Platform
To access hosted market data, simply log in at chapaty.com to obtain an API key. End-of-day OHLCV data is free to use. Prefer your own data? You can bring your own market data and start using Chapaty at no cost.
Disclaimer
Trading and investing involve substantial risk. You may lose some or all of your capital.
Chapaty is an open-source software project provided for research and educational purposes only. It does not constitute financial, investment, legal, or trading advice.
This software is provided “AS IS”, without warranties or conditions of any kind, express or implied, as stated in the Apache License, Version 2.0. The software may contain bugs, errors, or inaccuracies.
In no event shall the authors or contributors be liable for any direct or indirect losses, damages, or consequences, including but not limited to financial losses, arising from the use of this software.
By using Chapaty, you acknowledge that you are solely responsible for any trading decisions, strategies, or outcomes.