Inspiration
We were up for a technical challenge at Hack Princeton and wanted to fully show the powers and capabilities of AI agents. We also looked at Alpaca (https://www.ycombinator.com/companies/alpaca), a YC startup that is a stock and crypto API brokerage service. Our goal was to build on this idea and provide our users with more than just data. We wanted to provide our users with data, a research agent to help build strategies, and an agent that runs tests in a sandbox environment to validate strategies. This would manually take a lot of time, but now you can build and test a strategy within a minute.
What it does
We have 3 main agentic services. The first one lets you describe a strategy or thesis in natural language to the agent, which then understands and builds your strategy. Then, it will backtest it against historical data and benchmarks over multiple simulations, after which it will return metrics and a graph. The next service is a research agent. Talk to an agent that helps you crawl the web, scrape websites, and make complex, natural language queries on X to get the latest news. Lastly, talk to our research agents to set up signals. Once the agent sets up your signal conditions, it waits for X to return a signal, after which it returns its analysis on the signal.
These services help you develop and test strategies faster than ever before!
How we built it
We used Dedalus for our AI agents and workflows, and X API for data on financial news and signals. A Dedalus agent uses tools from yfinance and other tools, like code generation and execution in a subprocess, to backtest a strategy. We build an agent using MCP servers for web search and scraping, as well as our own X MCP server that lets users invoke tools to carry out complex queries for research. Finally, we built a webhook architecture so that users can get real-time signals from X, which invoke Dedalus agents to carry out a signal analysis for the user.
Challenges we ran into
We struggled with setting up webhooks for two main reasons. Firstly, X does not provide webhook endpoints unless you have the enterprise version. Secondly, AI agents made with the Dedalus SDK can only be invoked upon user input, not signals. Thus, we had to find a workaround and build a makeshift webhook-like architecture.
Accomplishments that we're proud of
We are very proud of how error-free our backtesting pipeline is. It requires 4 services within one agent to complete this pipeline, but due to smart tool chaining and the Dedalus SDK, we were able to make sure that the tools communicate with eachother effectively to get the task done.
We are also proud of our signal service. One of the main reasons we built this is that it is very useful for users to have real-time data, and it was also a technical challenge for us. Because of the nature of the X API and Dedalus SDK, this was not straightforward, and we had to build a smart workaround to implement real-time signals.
What we learned
We learned a lot about backtesting engines and how we can implement one from the ground up. We also developed skills in building AI agents with multiple capabilities for niche use cases. No matter how long or complicated a task seems, a smart way of chaining tools used by an AI agent can get the job done.
What's next for Backtest Baby
Better data, Monte Carlo Simulations, more complex signals, and additional data sources for research and signals. We would also love to integrate this with Alpacas brokerage API to let users trade their strategies and signals after a thorough backtesting.

Log in or sign up for Devpost to join the conversation.