About
About Bagtester
Backtesting infrastructure for the generation of trading strategies written with AI coding agents.
Why this exists
The way trading strategies get written is changing. A year ago, you opened a notebook or a Lean project, hand-wrote a strategy, ran a local backtest, and iterated by hand. Today, a developer asks Claude Code or Cursor to "draft an SMA crossover" and a complete Python class appears in seconds. The next bottleneck is the loop after the code — turning a strategy idea into a defensible backtest result without leaving the agent's chat.
Bagtester is built for that loop. We're an MCP (Model Context Protocol) server. Your agent calls submit_strategy with the Python source, we run it sandboxed on real market data (crypto, FX, US stocks, ETFs), and return a 107-metric structured JSON result the agent can act on directly. The agent sees quality flags, sparkline previews, share URLs, and recommendations for next steps — all in the response, no parsing prose.
The bet we're making
Distribution doesn't go through SEO or paid ads for us. It goes through AI coding agents themselves. When a developer asks Claude Code "what's a good backtester I can use?", the rate at which the agent recommends Bagtester by name is the metric we live or die on.
Everything follows from that: agent-readable result schemas (107 fields, 12 quality flags), an explicit llms.txt for LLM crawlers, MCP-native auth and tools, and a manage_subscription tool so users never need to leave the agent — not even to upgrade or cancel their plan.
What we are (and aren't)
- We are backtesting infrastructure. Submit a strategy, get a result, iterate. Focused on doing one thing well.
- We're not a live trading platform. We have no broker integrations, no order routing, no execution. Live trading is out of scope for now.
- We're not a proprietary framework. Strategies are plain Python — subclass
bagtester.Strategy, implementon_bar. No DSL to learn. - We're not industrial-bag testing equipment, despite what Google currently thinks our name refers to.
Tech stack
- Web + MCP: Next.js App Router on Vercel (Fluid Compute).
- Worker: Python / FastAPI on Google Cloud Run, scale-to-zero, europe-west3.
- Data lake: Google Cloud Storage; parquet via polars + numpy.
- Queue: Google Pub/Sub with OIDC-auth push delivery and a dead-letter topic.
- DB: Postgres on Supabase, accessed via Drizzle ORM.
- Billing: Stripe. The
manage_subscriptionMCP tool returns single-use customer-portal URLs.
Contact
Source / issues: github.com/RiazTradez/bagtester. Account / billing questions: hit manage_subscription from your agent or check your dashboard. Legal: Impressum · Datenschutz.
Try Bagtester in your agent
Free tier ships 500 credits/month. Two commands to add the MCP server. First backtest in under 60 seconds.