Building a Profitable Strategy w/ Claude - Day 20: THIS GONNA BLOW YOUR MIND! — Transcript
Full transcript
- 0:00Hello guys, and welcome back to a new
- 0:01video in the series of me trying to
- 0:03build a profitable trading algorithm
- 0:05using AI.
- 0:07>> [music]
- 0:07>> In today's video, I'm going to share
- 0:09with you something that's going to blow
- 0:11your mind away. By the end of it, the
- 0:13way you think about using AI to find
- 0:15trading strategies is going to
- 0:17completely change.
- 0:19Also, we're going to address and clear
- 0:21one of the biggest misconceptions people
- 0:24[music] have about this whole thing. So,
- 0:26here's where we are. In the last video,
- 0:28I showed you two strategies, one trend
- 0:30following and one mean reversion. But,
- 0:33here's the thing. Those were just two
- 0:35ideas, two hypotheses out of literally
- 0:39hundreds we could test.
- 0:41>> [music]
- 0:41>> And on the backtest, both of them failed
- 0:43as I told you. I didn't show you the
- 0:46metrics and the results, but they both
- 0:48failed.
- 0:49Now, after that video, a lot of people
- 0:52asked me in my DMs about how does the
- 0:56backtest actually work? All right?
- 0:58Because we get how the AI comes up with
- 1:01the hypothesis I showed you, it reads
- 1:03the research online, [music]
- 1:06scans thousands of papers. We get how
- 1:08the data works, all right? We pulled it
- 1:11from a vendor like Data Bento, or you
- 1:13can get from any kind of source. But,
- 1:15the backtest itself, the conditions, the
- 1:18parameters, the filters, the indicators,
- 1:22does it optimize the strategy while it
- 1:24runs? Does it go and find other
- 1:26variations of the strategies? I want you
- 1:28to focus on the word variations because
- 1:31this is exactly where this is going to
- 1:33get crazy.
- 1:34Today, I'm going to take you under the
- 1:36hood, okay? And show you exactly what
- 1:38happens when we run a backtest.
- 1:41>> [music]
- 1:42>> So, not just on the strategy, but on any
- 1:44strategy. And I promise you, this is
- 1:47going to open your eyes. All right? Now,
- 1:49before we start, make sure to check the
- 1:51current discount Balonkus running, one
- 1:53of the best and most reliable futures
- 1:55pro firms out there. You can use a
- 1:57coupon code STRANGER or just click on
- 2:00the link down below.
- 2:01Now, let's get started.
- 2:04So, we're going to start with this
- 2:06picture that's going to
- 2:08explain every single thing about how the
- 2:10back test works. Okay?
- 2:12So, this tree right here, we're going to
- 2:14start from the root. All right?
- 2:17We're going to start from a strategy
- 2:18idea, a hypothesis. This is how AI goes
- 2:22to, like I showed you, how it got that
- 2:24PDF. It's going to go online and it's
- 2:27going to choose for us a hypothesis that
- 2:30we need to test. Okay? This is just a
- 2:33simple one, all right? A strategy idea.
- 2:36This strategy idea is based on the
- 2:37moving averages. All right? So, a trend
- 2:40following strategy that uses moving
- 2:43averages.
- 2:44Simple. Everybody knows what the moving
- 2:47average is.
- 2:48So, we're going to start from here, the
- 2:50root.
- 2:51Now,
- 2:51>> [music]
- 2:51>> we need to understand that moving
- 2:53averages, we have two types. Okay? I
- 2:55want you to look at the left. This is
- 2:57the first layer and basically these
- 3:00right here are just conditions for the
- 3:01strategy. Okay? Let's start with layer
- 3:04one.
- 3:05For the averaging, there is two types.
- 3:07There is the simple moving average and
- 3:09there is the exponential moving average.
- 3:11Now, instead of guessing which one is
- 3:12better for this strategy, we're going to
- 3:15test both of them. So, from the root,
- 3:18we're going to have the simple moving
- 3:20average and we're going to have the
- 3:21exponential moving average. We're going
- 3:23to test both and see which one is
- 3:24better. Okay?
- 3:27Now, after that, we need fast moving
- 3:30average.
- 3:31Okay? This going to catch like
- 3:34um recent break of structures or an
- 3:38early um
- 3:39So, let me show you on the chart. As you
- 3:41can see, this red moving average right
- 3:44here, this is the exponential moving
- 3:45average, it has a length or period of
- 3:48nine. Okay? So, as you can see, it's
- 3:50going to catch those um break of
- 3:53structures like here, like shifts in
- 3:55trends.
- 3:56E- even if they they fail, for example,
- 3:59this one didn't fail because you can see
- 4:01that it did provide some uh movement
- 4:04after this uh up close candle here. Of
- 4:07course, we're not going to use this one
- 4:10fast moving exponential moving average
- 4:12to catch a big shift in trend. It
- 4:13doesn't work like that. We're going to
- 4:15see how we can catch this
- 4:17uh using this strategy alongside with
- 4:19other conditions. So, we're going to
- 4:21need this, all right? So, we need a fast
- 4:24moving average. Now, fast moving
- 4:26averages,
- 4:27there is different periods or different
- 4:30parameters. [music]
- 4:31There is a 2 3 5 8 9 and 13. We can go
- 4:35all the way to 10 and 12, but there is
- 4:37not big difference between. So, it's
- 4:39better to keep uh some distance between
- 4:41the parameters.
- 4:43And we don't know which one is better.
- 4:45Which one is going to give us a strategy
- 4:47that works. So, we're going to test both
- 4:49of them.
- 4:50So, on the SMA is we're going to test
- 4:52all of these.
- 4:53And for the EMA, which is which is here,
- 4:56we're going to test all these periods,
- 4:58as you can see. So, five here we have
- 5:00five on each side, okay?
- 5:04Now, for this strategy, we also need a
- 5:06slow moving average. A slow moving
- 5:08average basically the same thing as this
- 5:11one, but we're going to use higher
- 5:13values, 20 30 45 60 and [music] 90. So,
- 5:17as you can see on the chart, for
- 5:18example, this one is the EMA 50. And you
- 5:22can see why it is a slow because it
- 5:24doesn't react and change to
- 5:27uh these kind of uh shifts in structure.
- 5:30Okay, it catches or it gives you the big
- 5:32the bigger picture, all right? So, you
- 5:34can see
- 5:36from here to here we are on we are in a
- 5:38downtrend, okay? Here we were in an
- 5:41uptrend, and then price broke below the
- 5:44EMA 50 and also the nine. so both the
- 5:48slow and and the fast moving average and
- 5:51we had a nice run to the downside and
- 5:53here you can use this one as directional
- 5:55bias and only look for shorts. Okay? So
- 5:58basically this
- 6:00um temporarily shift in structure,
- 6:01you're not going to take it seriously
- 6:03because we're still overall down
- 6:06um in a downtrend based on the slow
- 6:09moving average. Okay? This is how it
- 6:10looks like in the chart.
- 6:12Now,
- 6:14after that,
- 6:16we're going to need a filter or a
- 6:17directional bias. So think of it like
- 6:20the higher time frame. For that we're
- 6:21going to use either none, we're not
- 6:24we're not going to use that,
- 6:25or we're going to use the moving average
- 6:27of 100,
- 6:29200, and the ADX above 20 or ADX above
- 6:3325.
- 6:35Now, here's the thing.
- 6:36For example, a strategy
- 6:39it's going to use the EMA.
- 6:41Okay?
- 6:43For the fast EMA it's going to use the
- 6:44five.
- 6:46For the slow
- 6:47EMA it's going to use the 60 and for the
- 6:50filter it's going to use the moving
- 6:52average of 200. This is one strategy.
- 6:55Another one it's going to use the SMA
- 6:57with three, with 20, and then ADX.
- 7:00Another one is going to use
- 7:02SMA of eight. So these are all
- 7:05combination. Okay? This is why we have
- 7:07multiplier here.
- 7:08All [music]
- 7:09possible combinations of a strategy. So
- 7:12based on just these first four layers,
- 7:15we have like two times five times five
- 7:18times five. Like we have 250 [music]
- 7:23possible and different combination,
- 7:26different strategies with different
- 7:28parameters.
- 7:30Moving on to the stop, stop loss, which
- 7:33is based on the ATR. ATR is very simple.
- 7:36Let me show you in the chart. So we can
- 7:39add the ATR from here.
- 7:43So, basically, suppose that we are here,
- 7:46okay? We want to take a trade
- 7:49here.
- 7:52All right? We're going to take a short.
- 7:54Or maybe take a long. Let's take a long.
- 7:57So, [music] how does this strategy uses
- 7:59the stop loss?
- 8:01Okay? It's going to use this ATR, the
- 8:04average true range. I showed you what
- 8:06the ATR is. It's going to It's going to
- 8:07basically take the last 14 candles right
- 8:10here. We can change the volume as well,
- 8:12but we're going to use the 14. It's
- 8:14going to calculate or it's going to take
- 8:17the last 14 candles. It's going to
- 8:19calculate their sizes, sum them, okay?
- 8:22So, add them all together, and then
- 8:24dividing my by 14. And it's going to
- 8:26give us this volume right here. For
- 8:28example, on this, it is
- 8:29>> [music]
- 8:29>> 76. Let's say 75. So, um if we go back
- 8:34to the picture,
- 8:36if we're going to use 1.5,
- 8:39or let's use the stop of two two ATR,
- 8:43all right?
- 8:44That's going to give us basically
- 8:45hundreds and [music]
- 8:4850.
- 8:49So, the stop loss is going to be right
- 8:51here. So, the stop loss is going to
- 8:53change based on the ATR. So, if the ATR
- 8:56is like 100, as you can see here,
- 8:58because uh as you can see, the candles
- 9:01are bigger and the volatility is higher
- 9:03than this, it's going to be 100. For
- 9:05example, if we take trade long
- 9:08right here,
- 9:10so, the the ATR is going to be 200 like
- 9:12this. As you can see, it's based on the
- 9:14volatility. Now, we don't know which ATR
- 9:18uh stop is stop loss is better, so we
- 9:20need to test different volumes. Okay?
- 9:22So, we're going to use tight stop loss,
- 9:25only 1.5 times the ATR.
- 9:27Uh we're going to use moderate stop
- 9:29loss. We're going to use wide stop
- 9:31losses. Okay? Times six.
- 9:33All right?
- 9:34So, we know which stop loss is better.
- 9:37Same thing for the trailing, we can use
- 9:39ATR, so trailing the stop loss, and also
- 9:41the max hold to the TP, and the
- 9:43direction long and short. Okay, I spoke
- 9:45a lot,
- 9:47I know,
- 9:48but
- 9:49here's what's going to blow your mind
- 9:50away.
- 9:52Based on these parameters,
- 9:54we we're going to have 15,000
- 9:58strategy combination.
- 10:01Imagine this.
- 10:01>> [music]
- 10:02>> 15,000
- 10:04Each leaf right here, as you can see,
- 10:07this is a leaf,
- 10:08is going to have one unique [music]
- 10:10strategy combination. Unique.
- 10:14Different, completely different. So,
- 10:1515,000
- 10:17strategy or variation that came out of
- 10:19this one simple idea.
- 10:22And this 15,000 strategy,
- 10:25okay?
- 10:27We're going to use it
- 10:29on nine different markets, as you can
- 10:31see here. We have the US 100, US 30, we
- 10:34have gold, we have Brent,
- 10:36uh we have USD uh some forex pairs.
- 10:39We're going to test it, so that's times
- 10:41nine.
- 10:43Also, we're going to use it on different
- 10:44time frames, or five different time
- 10:46frames. I didn't include this. We're
- 10:47going to use it on the five-minute, the
- 10:4915-minute, the 30-minute, the one-hour,
- 10:51and the four-hour. So, times four.
- 10:55That's going to give us 540,000
- 11:00back test.
- 11:02That means 63.6
- 11:04billion [music] candle evolution.
- 11:07And that's going to be running
- 11:09simultaneously,
- 11:10okay?
- 11:11On seven CPU cores. In my laptop, I have
- 11:15eight, okay? You might have way more.
- 11:19So, basically,
- 11:21it's going to run all this back test.
- 11:24It's going to run
- 11:25540 simultaneous back test.
- 11:29Just imagine, guys.
- 11:31It is literally insane.
- 11:34And
- 11:35it's going to take around
- 11:3750 minutes.
- 11:39If you have a better laptop, it's going
- 11:41to take less. For me, here's how much it
- 11:44took. So, as you can see here, this is a
- 11:45picture that I took earlier.
- 11:47Uh this is a sweep. The sweep is is
- 11:50basically what's happening here,
- 11:51sweeping across all this. This is the
- 11:53back test. Okay? And as you can see, it
- 11:57is first of all trying um
- 11:59gold on the M15.
- 12:02So, basically, gold, we're choosing
- 12:04gold, and we're choosing M15.
- 12:08Now, it's running 15,000 back tests.
- 12:1015,000 strategy is running on the
- 12:1415-minute time frame on gold.
- 12:17This is what this represent.
- 12:20And this
- 12:22And out of those 15,000, only six
- 12:26survived.
- 12:27Only six strategies survived.
- 12:30And the best the best profit factor was
- 12:321.12. Now, here's the thing.
- 12:351.12 profit factor and only six per
- 12:37survived out of those 15,000, it's not
- 12:40good.
- 12:41Okay, let me tell you why.
- 12:44You want to see something bigger,
- 12:45something like this. It tells you that
- 12:48that particular strategy on this
- 12:51M15 on US 100 here,
- 12:54it actually works.
- 12:55Because a lot of them actually passed um
- 13:00the current metrics like profit factor
- 13:01and so on above one and couple of other
- 13:04uh standards that I set. We can talk
- 13:06about them later.
- 13:08But it tells you that this strategy
- 13:10right here is real on this one.
- 13:13Okay, it also passed the cost and the
- 13:17slippage and spread and so on. Okay? And
- 13:20the best profit factor, the best
- 13:22strategy, best uh leave like this one,
- 13:26It has this 1.22
- 13:29profit factor. Now, this is on M15.
- 13:33Remember that on M15 is going to have
- 13:35spreads and a higher cost.
- 13:38Um I'm pretty sure that on the 1 hour
- 13:41it's going to be even better, even
- 13:42better profit factor and better metrics
- 13:45overall. So, this is just to show you
- 13:48how does this work. Okay? Now, imagine
- 13:51trying to run this all alone. If we take
- 13:53only one leaf out of 15,000 um
- 13:58possible,
- 13:59how much it takes that you can
- 14:02to backtest it. And here's the thing,
- 14:05I'm running I'm running it on for
- 14:06example on this one this on Forex.
- 14:09I have 16 years of data
- 14:12from 2010 all the way to 2026
- 14:17running on running at the same time. And
- 14:20this one 40 minute and it was estimated
- 14:24time to finish 70 minutes. So, it's
- 14:26going to take you around two two and a
- 14:28half hours
- 14:30to three hours based on
- 14:33the power of your laptop. Okay?
- 14:36Or computer. So, as you can see here,
- 14:38you don't find robust strategies by
- 14:40guessing, you find them by exploring the
- 14:43space. Okay?
- 14:45This is how powerful backtesting with AI
- 14:48[music] is.
- 14:50Okay, guys? So, for example here here's
- 14:52an active path. Here's an active leaf or
- 14:54a
- 14:55a single
- 14:56um
- 14:57strategy out of those 15,000 possible.
- 15:01Choosing for layer one, we choose the
- 15:04What is this? Uh the simple moving
- 15:06average.
- 15:07For the fast one,
- 15:09we can choose the input of
- 15:11uh five the period. For the slow one,
- 15:14okay? I'm using uh these layers. Okay?
- 15:1945 for the slow one. And for the
- 15:21directional bias you're going to use the
- 15:23moving average of 100.
- 15:25For the stop loss, we can use three
- 15:27times the ATR. For the trailing, we're
- 15:29going to use four times ATR. And [music]
- 15:32seven layer is um max hold two, okay?
- 15:36And we're going to test long because of
- 15:38course we're going to test both long and
- 15:40short. And say for example in US 100, um
- 15:44longs tend to be better, okay? Since it
- 15:46is a trending um
- 15:49instrument trending to upside. So this
- 15:51is just one single path out of 15,100.
- 15:56Okay? And this, ladies and gentlemen,
- 15:59how powerful trading and finding
- 16:02strategies with AI is. Now make sure to
- 16:05like and subscribe the video so you
- 16:06won't miss the next one. I want [music]
- 16:08you to be active with me in this journey
- 16:11not just what by watching but actually
- 16:13uh trying it yourself, okay? So go to
- 16:16the lab and
- 16:18give your um Claude or ChatGPT or
- 16:22whatever you're using
- 16:24this picture, feed it this picture and
- 16:26it's going to create the engines to
- 16:28actually
- 16:30uh sweep the space like this, okay?
- 16:33Now, happy trading and good luck.
About this transcript
This page contains the full transcript of Building a Profitable Strategy w/ Claude - Day 20: THIS GONNA BLOW YOUR MIND! by Strange ICT, generated from the public captions YouTube serves with the video. The transcript has 2,612 words across 431 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.