I Made Claude Run 100 Trials to Beat My 0DTE Strategy Pt4
I used Claude Code and Optuna to run 100 machine learning trials optimizing 10 parameters of my Kalman breakout strategy — Part 4 of 7 building my first 0DTE options algo bot from scratch. In this video: • Optuna ML optimizer setup: TPE sampler, 10 parameters, 100 trials • Walk-forward validation structure: train 2023, validate early 2024, test late 2024 • How Kalman filters, KNN smoothing, and MAE bands work together visually • Finding and fixing a scoring bug where the objective mis-calculated drawdown • Vectorizing the data loader to eliminate a bottleneck slowing each trial to 3+ min • 100 trials kicked off at the end — results coming in Part 5 After the Part 3 backtest, the next question is: can we do better? Optuna answers that by intelligently searching the parameter space instead of brute-force grid search. With 10 parameters — lookbacks, band multipliers, VIX thresholds, delta targets, take profit levels — the number of possible combinations is too large to test manually. Optuna's TPE sampler finds high-performing regions of that space efficiently, pruning bad trials early to focus compute on promising configurations. The walk-forward structure is critical here. Training on 2023 data and validating on 2024 data means the optimizer never sees the test set during training — the same discipline that separates a real edge from an overfit. Any configuration that looks great on 2023 but falls apart on early 2024 gets cut before it ever reaches the live test window. This episode also covers a real debugging session: the objective function had a bug mis-scoring account balance vs drawdown, giving false confidence to aggressive configs. Claude identifies it, we fix it, run a smoke test, then kick off the full 100-trial run. Part 5 is where the optimized parameters come back. 🔗 Open an Alpaca paper trading account (free): https://alpaca.markets 🔗 Part 1 — The Foundation: • 0DTE Options Backtesting Pt1: The Part Mos... 🔗 Part 2 — Building the Strategy: • I Made Claude Code a Kalman Breakout Bot —... 🔗 Part 3 — Backtest Results: • I Made Claude Backtest My 0DTE Options Bot... TIMESTAMPS: 0:00 - Intro: Optimizing the AI Breakout Strategy with Optuna 1:00 - Trading Journey + Indicator Breakdown Request 2:03 - Kalman Filter Explained (Noise-Cancelling Headphones Analogy) 3:08 - KNN Smoothing and MAE Breakout Bands Explained 4:13 - Visualizing How All Three Work Together for Entry Signals 5:17 - Reviewing Strategy and Current Results 6:20 - Optuna vs Manual Tuning — Why ML Wins 7:28 - Optuna Setup: TPE Sampler, 10 Parameters, Walk-Forward 8:29 - Walk-Forward Structure: Train 2023, Validate 2024, Test Late 2024 9:30 - Vectorized Implementation for Speed 10:34 - What Optuna Actually Does (Hyperparameter Tuning Explained) 11:37 - Seeding Optuna with Existing Parameters 12:38 - Running First 3 Trials — Speed and Alignment Check 14:47 - Verifying Optimizer Aligns with Live Backtest Behavior 15:56 - Reviewing 2023 and 2024 Baseline Curves 17:03 - Finding the Scoring Bug (Drawdown Miscalculation) 18:05 - 100 Trials Reveal: Baseline Is Too Aggressive 19:11 - In-Sample Overfitting Risk Analysis 20:13 - Fixing the Bug and Rerunning 21:18 - Smoke Test: Single Trial to Verify the Fix 29:13 - Identifying and Vectorizing the Data Bottleneck 31:43 - Single Trial QA Pass Before Full Run 34:59 - Loading 2023 + 2024 Data, Pre-Indexing for Speed 36:01 - 100 Trials Running — Results in Part 5 🔔 Subscribe — Part 5 brings back the optimized parameters. ──────────────────────────────── ⚠️ DISCLAIMER ──────────────────────────────── Educational content only. NOT financial advice. I am NOT a financial advisor. All trading involves substantial risk of loss. Past bot performance does not guarantee future results. You are solely responsible for your own financial decisions. 📺 Full Series (watch in order): • Build a 0DTE Options Trading Bot with Pyth...

Why AI Tokens are so Expensive - Computerphile

The World's Most Important Machine

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

Full App Building Course with Cursor (3+ Hours)

Keynote: After the AI Hype – What’s Real, and What’s Next - Richard Campbell - 2026

Billionaire's WARNING: I'm SELLING. The Crash Is Already Here!
![I Built a Gold RL Trading Bot With 60% OOS Returns [Free Code]](https://i.ytimg.com/vi/R4GXZKkWCcI/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCXq0f_O_-Fklhmh_0yK-HJVClRCA)
I Built a Gold RL Trading Bot With 60% OOS Returns [Free Code]

Databricks Live Bootcamp | Day1: Introduction & Data Analytics

Andrej Karpathy: From Vibe Coding to Agentic Engineering w/ Stephanie Zhan

I got a private lesson on Claude Cowork & Claude Code

But what is quantum computing? (Grover's Algorithm)

Full Walkthrough: Workflow for AI Coding — Matt Pocock

Something is jamming GPS over Europe. Here's what we found

Inside the Mind of Anthropic CEO Dario Amodei | The Circuit | Extended Interview

Claude Tested Over 9,000 Trading Strategies (Here's What Works)

I Made Opus 4.8 and Fable 5 Build the Same App (RAW RESULTS)

How To Build A Self-Improving AI Trading Agent (Insanely Cool)

Learn RAG From Scratch – Python AI Tutorial from a LangChain Engineer

Build a Full-Stack GenAI Project in 4 Hours (FastAPI, React, Supabase)

