tradefloorStart free

Demos

Would my trading bot survive a crash?

2:15 · Recorded on the live product on 9 October 2026. The video has no sound, and a caption at the top narrates each step. Watch on YouTube

About this video

A momentum bot written in Python holds the 5 stocks with the best 20-day return, at 1.5 times its net worth. tfrun runs it on tradefloor in a market of 17 Nasdaq-100 tech stocks, built from their SEC filings, with simulated prices.

After day 40, Claude branches the market into a rate shock of +200 bp across the curve and a liquidity crisis, where order books are 40% as deep and the VIX is 3.5 times higher. Days 1 to 40 are the same on all three lines, and the same bot trades each one from the terminal for days 41 to 100.

Claude explains the loss from tradefloor's own tools, changes one line of the bot and runs it on a new branch with the same crisis.

Chapters

  1. The bot
  2. Branch
  3. Run
  4. Why
  5. Fix
  6. Result

Figures on screen

Every figure here is on screen in the video and was checked against the product's own data.

  • On day 40 the bot was down 2.1% and the index was down 4.3%.
  • By day 100 the bot was down 1.0% with no shock, 17.7% in the rate shock and 37.2% in the liquidity crisis. The index fell 25.8% in the crisis.
  • In the crisis the bot held 1.52 times leverage while the VIX was at 53.1.
  • The fix scales leverage down as the VIX rises: gross = GROSS * min(1.0, 20 / market.vix)
  • With the fix the bot lost 22.3% in the same crisis instead of 37.2%, and its worst drawdown was 28.7% instead of 43.1%. It finished 2.35 points ahead of buy-and-hold instead of 12.51 behind.

The guide

The written version is Stress testing a trading bot against a market crash. It puts a momentum bot through a liquidity crisis, a rate shock and a recession in Python, with the script on the page for you to run.

More demos

Run it yourself