This is a submission for the GitHub Finish-Up-A-Thon Challenge
What I Built
Chapaty is an open-source Rust backtesting framework with a Gym-style reset / step / act API for algorithmic trading. Strategy logic lives in a single act function. Order execution, matching engine, data sync, and reporting sit behind the simulation environment. A 400-point parameter grid of different parameterizations over 9 years of end-of-day market data runs in ~1 second on an 8-core laptop.
To speed up the Build-Measure-Learn loop for algorithmic trading strategies, we need two things:
- An accessible framework that people are already comfortable with and that is well-established: Gym.
- A fast programming language with fearless concurrency, so we can natively run many different strategies in parallel: Rust.
The motivation for Chapaty was to unify these worlds in an open-source project, so that everyone has access to a framework for developing algorithms without having to focus on infrastructure.
Demo

make run in the chapaty-template project executes the example strategy from this blog post and produces a QuantStats tearsheet.
The template repo has a make run quick-start that reproduces the demo above. It also ships with prompt templates for LLM-assisted development with GitHub-Copilot.
- Chapaty Template, a quick start showcasing the power of Chapaty with GitHub Copilot
- Chapaty Core Lib, the library I built over four years which has over 25k SLOC and more than 350 unit tests.
- Chapaty Blogpost, a technical write-up about the design decisions I made.
The Comeback Story
I started building Chapaty four years ago. I was driven by my vision to have a standardized framework for algorithmic trading research that everyone can use. My development was a constant nights and weekends effort next to my full-time job as a software engineer. This made the project steadily grow to over 25,000 lines of code and more than 350 unit tests. The primary motivation to finally push it across the finish line this year was the feedback I got from testers and the ability to integrate my framework into modern LLM workflows. To complete the transition from a personal codebase to a polished open-source tool, I decided to stabilize the API, finalize the core library, publish it on crates.io, and build a 60-second starter template that integrates with GitHub Copilot, so anybody can use my software out of the box.
My Experience with GitHub Copilot
With GitHub CoPilot you don't need to be a Rust expert. Describe your strategy in plain English, and instruct GitHub-Copilot to generate the Rust code. Backtesting is a process that takes traders months. With Chapaty and GitHub Copilot it is now possible in under 5 minutes. Try it yourself with the official Chapaty Template!
The process is the following:
- Pass the AI.md to GitHub Copilot.
- Describe your trading strategy in plain English.
- Let GitHub Copilot implement the trading strategy for you.
- Run
make runand have the full backtest results of your trading strategy.
Top comments (0)