← all posts

Failing at Quant Trading (and What It Taught Me)

Feels weird writing a blog, it’s almost like a diary but for old people haha. Just wanted to discuss my battles with quant trading and what I’ve learned, tried, and ultimately failed at.

I started off like many with basic research, and arrived at doing some support/resistance trading with XGBoost. Made sense at first: simple ML model, predicts where the stock is going to bounce, if it doesn’t bounce at the line, it goes through to the next one. Cool.

I saw most people doing this with take profits and stop losses, which made sense, but my smartass obviously thought I was better and smarter than that, so I thought, why not just take your money back at the flat? Essentially my idea was, let’s say the stock bounces off a resistance line, you take a long for it to hit your next line above, but if it comes back, and every time it comes back, you just sell there, and get a “flat”. So essentially the idea was even if you are shooting 1% on these bets, you are breaking even on the others so it should be profitable.

Sure enough, I did some rough testing with Claude and such, and I think I got a number like +427% YTD on 4-5 months of trading (this was back in April). Stuff was moving smoothly and I was tuning like one does until I put it on a paper trading account on Alpaca. I left it for a week, and when I checked back, the paper $100,000 portfolio had turned into $80,000.

Upon reading through it and checking out what’s up, I realized that my idea didn’t work because of something called spread. When a stock is at say $10,000, you may be able to sell it at $9,999 and buy it at $10,001, but it will never be truly even. The problem with my strategy is on those 99% of trades that ended as flats, I was losing a few cents every time. Stacked up over a few thousand over a couple days, and yea that’s gonna be a bunch of loss.

First my reaction was to try to lower that 99% number down to say, 50%, because then you can live with losing a bit on the flats, the problem with that is the XGBoost model is far too simple to be able to predict with a high certainty very high variance things like the stock market and when it will go up and down.

I also realized that the best firms in the world make max +50% on their portfolios in a year, with Sharpes around 2-2.5, so achieving anything orders of magnitude better is definitely impossible.

Over the next few weeks I attempted to salvage support+resistance-style models however I could. First, I tried a variation where instead of trying to sell/buy at the price the stock was at, I’d place orders at the line where I wanted to buy and wait for the stock to come to me in a way. The problem is that those orders would only get filled when the stock keeps going against you. And the people trading with me are the ones who already know about the movement, so you get picked off. You only fill on the losing trades and almost never the winners.

I also experimented with only using a half of the original S/R strategy, so for instance only betting on the breakthroughs of the lines or only betting on the bounces. Although sometimes you’ll get huge fills and make a bunch of money, it wasn’t nearly consistent enough and mostly just lost because the stock would revert to the S/R line as that was a trading zone.

The further testing I think was also a great lesson for me though because it was the first time I felt I correctly leveraged the power of Claude Code’s ultracode/workflows. I had specific agent assignments for skepticism, since a lot of the original falsehood testing was caused by the AI’s natural bias to follow what I say and not skepticize, so having an agent ensemble where some agents try and steelman and others fight the claims was quite effective in shutting down new time sinks quickly.

And overall this whole thing I see as a lesson. Unconscious incompetence really is a thing and when you don’t know something you need to realize how much you don’t know. Trying strategies from my head with no background knowledge was the wrong approach in the first place, where I should have been reading and building real stock trading knowledge skill, which would let me develop those ideas later.

Also in the domain of quant specifically, I learned the importance of looking out for 3 big things especially in ML-related stuff:

  1. Make sure the models aren’t peeking at the future. You get overfit models and fake results.
  2. Make sure your data is good. Data is everything. You can’t effectively test a strategy’s edge when you aren’t getting accurate fills/orders.
  3. Already mentioned before, but think and read before you just do. Claude Code and other AI tools are so powerful in the modern day that it can be easy to just prompt and let it do things without understanding them fully. That’s always a bad idea. You should always understand exactly what’s happening under the hood, not only in quant, but in any kind of software you are building.

I’m still motivated to continue with quant and find a true edge and become profitable, but now I see it as a longer journey than before, and that’s totally fine with me. I want to read and learn and become one of the 1% that succeeds in stocks. Specifically I’m really interested in looking into crypto funding arbitrage bots and futures, both of which gain edge in very different ways than a support and resistance XGBoost model does.