BTC Backtesting Engine
In DevelopmentAn AI product builder project
Astro Case Study
> What if you could have autonomous AI teams research, code, and evaluate trading strategies around the clock -- and then tell you which ones are actually worth your attention?
## The Problem
Evaluating crypto trading strategies is tedious and time-consuming. You read about a strategy, manually translate it into code, run it against historical data, interpret the results, and then do it all over again for the next one. Most strategies underperform a simple buy-and-hold benchmark, so the vast majority of that effort is wasted. I wanted to compress weeks of manual research and backtesting into hours of automated, repeatable evaluation.
## My Role
I designed the system architecture, built the backtesting engine and data pipeline, and developed the AI agent skills that automate strategy research, implementation, and visualization.
## The Approach
I started with the data foundation -- a large historical database of BTC and ETH prices along with common technical indicators. That gave me a reliable, consistent baseline to test any strategy against. From there, I focused on making the backtesting loop as frictionless as possible: define a strategy, run it against the data, and immediately see how it performed.
The key insight was that each step of this loop (research a strategy, document it, write the backtesting code, visualize results) could be handled by a specialized AI agent. Instead of building one monolithic tool, I built modular skills -- some generic, some strategy-specific -- that could be composed and orchestrated. Trade-offs were intentional: I prioritized speed of iteration over production polish, because the point was to evaluate as many strategies as possible, not to ship a trading platform.
This project also served as a proving ground for a multi-agent orchestration pattern I plan to apply to a harder problem: optimizing the shot recommendation algorithm in Burrfect, my espresso tracking app. The backtesting domain was a cleaner sandbox to work out the coordination patterns first.
## What I Built
- **Historical data pipeline** -- BTC and ETH price data with pre-computed technical indicators, structured for fast querying and backtesting
- **Backtesting engine** -- Strategies defined as configurable modules, executed against historical data with consistent benchmarking against buy-and-hold
- **Auto-diagramming skills** -- AI-powered skills that generate Plotly dashboards on a local HTML server, visualizing strategy performance with key indicators (returns, drawdowns, Sharpe ratio, win rate)
- **Strategy documentation system** -- Each researched strategy gets a structured writeup before code is written, so the "why" is captured alongside the "what"
- **Multi-agent orchestration layer** (in progress) -- Teams of AI agents that autonomously research new strategies from public sources, translate them into backtestable code, run them, and surface only the ones that beat the benchmarks
## The Result
The backtesting engine and visualization pipeline are functional -- I can take a strategy from concept to visual dashboard in a fraction of the time it would take manually. The auto-diagramming skills alone cut the analysis-to-insight loop from hours to minutes.
The autonomous multi-agent research loop is still in development. What's been proven so far: the individual agent skills work reliably in isolation, the orchestration pattern is sound, and the approach scales. The ambitious endgame -- unsupervised teams of agents grinding through strategies until statistically significant winners emerge -- is the next milestone.
More importantly, this project validated the multi-agent orchestration architecture I'll apply to Burrfect's recommendation engine, where the stakes are higher and the problem space is messier.
## Tech Stack
- **Language:** Python
- **Data:** Historical BTC/ETH prices + technical indicators (large local database)
- **Backtesting:** Custom engine with configurable strategy modules
- **Visualization:** Plotly dashboards served via local HTML server
- **AI Orchestration:** Claude-based agent skills (generic + strategy-specific)
- **Architecture pattern:** Multi-agent teams with specialized roles (researcher, coder, evaluator, visualizer)