Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Chapaty
Chapaty is a Rust engine for building and evaluating quantitative trading agents. Designed with a familiar Gym-style API, Chapaty brings the rigor of standardized simulation interfaces to event-driven financial backtesting.
Getting Started
Fast Track: Use the Chapaty Starter Template to instantly bootstrap a new project. It includes pre-configured AI prompts for backtesting with a LLM of your choice and built-in dashboard setups with QuantStats. For a library of ready-to-run strategies, including the top TradingView setups backtested across million-agent grids, see chapaty-zoo.
Chapaty supports two primary workflows: Parallel Backtesting for evaluating agent grids, and the Canonical Gym Loop for step-by-step control over the environment.
1. Parallel Backtesting
For grid searches, Chapaty leverages rayon to evaluate agents in parallel, automatically tracking the top performers.
Run this example: examples/quickstart.rs
Under the hood, the parallel path builds the environment, generates a grid of agents, and evaluates them in one call:
use *;
async
2. The Canonical Gym Loop (Fine-Grained Control)
For custom integrations or those who prefer full control over the observation-action transition loop, Chapaty implements a standard API inspired by OpenAI Gym.
use *;
async
Note: Environments are async because they stream large financial datasets directly from cloud storage (e.g. GCS, BigQuery, HuggingFace).
The examples/quickstart.rs file demonstrates both workflows end to end for a single-agent baseline, a parallel grid, report export, and logging setup. For real, ready-to-run strategies, see chapaty-zoo.
Related Projects
| Project | Description |
|---|---|
| Gymnasium | Standard API for Reinforcement Learning environments |
| DeepMind Control Suite | Physics-based simulation environments |
| Burn | Deep learning framework in Rust |
Community
If you are excited about the project, don't hesitate to join our Discord! It is the perfect place to ask questions, file data requests, discuss new features, and share what you have built with the community.
Contributing
Contributions are welcome! Before submitting a pull request, please make sure to run the pre-build script to verify your changes:
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.