I lost $559 (-2.8%) across two accounts in a single week running an Avellaneda–Stoikov market making algorithm that I built using Claude.
heard about the strategy from a Youtube video, and I had a decent understanding of how it worked conceptually from my CFA quant studies (L3 candidate btw)
I had Claude look at the underlying stock and market bid-ad spreads to tune the variables for the Black-Scholes model and the inventory adjustment.
I asked Claude to backtest on NBBO data from the stock/option chain and it was predicting positive results so I decided to give it a go.
Results
fill rate was 2% vs 20% in the backtest and nearly every fill was adverse selection.
first day I ran it lost $150 in an hour long session. I fed Claude the trade log for further tuning.
lost $50 the next day. rinsed and repeat. feed Claude data, tune, lose money. finally cut the cord but after reflecting on this experience vs my experience with my successful bot, I’ve realized a few important things.
Realizations
- I didn’t really understand the strategy.
I was looking for a turn key solution from something I had just heard about, asking Claude to code and implement a strategy I didn’t fully understand.
compare this to my other bot, built on a strategy I had been running for 15 months. I knew every rule by the books and I could clearly communicate those rules to Claude.
imo, the ability to fully understand and communicate your strategy clearly is the most valuable skill to build a trading bot with AI. obviously having a winning strategy to begin with helps too.
2. I never asked Claude to check itself for biases/hallucinations
I never used agents for code reviews. compared to my other bot, I had it use two agents. one agent for reviewing the rule sheet against the code, the other for checking bugs in the code.
any mistakes the agents found were corrected by the main Claude interface? not sure what to call it but I didn’t use the agents to rewrite the code. just asked claude fix the issues the agents found.
I should have at the very minimum asked for an agent to review the variables it chose for the AS MM bot against the market data, and possibly have an agent test its assumptions for backtests.
3. I didn’t have a worthwhile strategy
I’m sure there are thousands of other traders with similar programs since AS is one of the most common MM strategies there are.
if you’re using the same trading strategy as everyone else, there’s no edge left for you to make a profit. there are only so many market inefficiencies that haven’t been exploited yet.
meanwhile the strategy I converted from manual > automated had already made me over $500,000 realized profit in 15 months. that size p/l and the consistency of the strategy (profits between $5,000-30,000 per month with no negative months) shows I found a real market inefficiency.
tl;dr
don’t let Claude build you an algorithm you don’t fully understand. if your understanding matches Claude’s understanding of how the strategy works that’s the ideal place to be.
have it check its work and assumptions via agents before you start losing $100s a day on bad parameters and back tests.
finally, have a strategy that you know works. there’s no magic prompt you can put in Claude to build a profitable trading bot make no mistakes. it’s trained on data from traders on the internet and we know 90% of traders lose money.