Getting the transcript
Reading the captions from YouTube. A video nobody has opened here before takes 10 to 30 seconds; this page fills in on its own.
Getting the transcript
Reading the captions from YouTube. A video nobody has opened here before takes 10 to 30 seconds; this page fills in on its own.

AI Pathways · @AIPathwaysChannel
This video has no Most replayed graph yet: YouTube shows one only once a video has enough views. These are the moments viewers replayed most in AI Pathways's most watched videos.
Most replayed moment at 2:02
5.4x that video's typical replay level
you in the beginning of the video, we'll use Telegram. So, go ahead and select on message. And I've typed in test on Telegram. So, if we test this step, we should see test as the text right here. Now, what we need to do is get live market data for that stock ticker. And the way we do this is through an API called the
Said at 1:55
Most replayed moment at 18:55
10.0x that video's typical replay level
to just edit all your code, make changes to the code base, and continually update it as well. So, here's the data and strategy library. So, simply copy and paste this directly to Claude Code. Then we have the backtest and the funnel. So, this is where we do the walk-forwards, out-of-sample, and the six-filter funnel.
Said at 18:47
Most replayed moment at 17:46
6.9x that video's typical replay level
essentially analyze their own versions of stops and targets for your positions as well. So, these are all the things that you can just add in depending on what you personally want out of the system. Plus, it'll be super accessible, so there's like an optional Telegram or iMessage push if you want to get alerts
Said at 17:38
The graph counts replays. It does not show where viewers stopped watching.
Words
4,621
Runtime
21:05
Speaking pace
219wpm
Reading time
19min
219 words per minute, above the 201 75th percentile of 349 measured videos. That distribution comes from the 349-video hook study.
Opening (first 30 seconds)
In today's video, I'm going to show you how to actually find profitable trading strategies with Claude. I'll go over the entire methodology step-by-step, so you'll know what to trade, where to get the data, and how to test properly. And make sure to stick until the end of the video as I'll take that same exact strategy and show you how to turn it into your own automated trading bot with Claude, so that the whole thing runs completely on its own. I'll run this entire process step-by-step, so you'll see my actual results, what failed, what succeeded, and then the final strategy portfolio that this turned into. Now,
110 words, the words spoken in the first 30 seconds at 219 words per minute.
Free, no signup. See how the first 30 seconds hold attention, with rewrites.
Sentence shape
| Measure | This transcript |
|---|---|
| Sentences | 219 |
| Average words per sentence | 21.1 |
| Longest sentence | 82 words |
| Questions asked | 1 |
| Sentences containing a number | 26 |
Most used terms
Filler phrases
51 in total: actually 19 · like 15 · basically 10 · literally 3 · uh 2 · kind of 1 · right? 1.
A literal whole-word count of the same phrase list the Prepublish browser extension uses, so a phrase inside another word is not counted and a phrase used in its ordinary sense still is. It is a count and not a judgement.
Free, no account. See where attention is likely to drop, with a rewrite for each weak line. The free check shows the scores and the one issue costing the most. Or run it on the words above first.
Free · No login · See a sample audit first if you prefer.
What this transcript is
Every word below is the caption track YouTube publishes for this video, pulled from the video itself and reproduced unchanged. It is not Prepublish's writing, not a summary, and not a re-transcription: it is the video's own published captions. English captions, generated automatically by YouTube, in the video’s original language. Source: the video on YouTube. A channel that would rather this page did not exist can ask for its removal through the contact page, and it is removed.
In today's video, I'm going to show you how to actually find profitable trading strategies with Claude. I'll go over the entire methodology step-by-step, so you'll know what to trade, where to get the data, and how to test properly. And make sure to stick until the end of the video as I'll take that same exact strategy and show you how to turn it into your own automated trading bot with Claude, so that the whole thing runs completely on its own.
I'll run this entire process step-by-step, so you'll see my actual results, what failed, what succeeded, and then the final strategy portfolio that this turned into. Now, if it's your first time on the channel, my name is Brendan. I studied math and econ at UCLA, spent 3 years in investment banking, and have been building out these custom AI trading systems for my clients for the past 2 years. And as always, this isn't financial advice and I'm not guaranteeing any profits in this video, just showing you the data and methodology here.
Now, before we find profitable strategies with Claude, I want to cover three main points. The first is that finding a strategy that looks profitable isn't the hard part. Claude can literally hand you 10 profitable backtests in an hour, but the hard part is finding ones that are worth running. Now, this comes down to two things that are in here. First is beating what you could do with zero effort at all, which is buying and holding spy, and then the second is doing this consistently over a long period of time through completely different types of markets.
So, the entire methodology and process in this video is built around these two components. Now, the next thing to know is that the number of trades in a strategy isn't the most important thing. Some of the best strategies only fire a few times a year, and they survive backtesting. And secondly, but more importantly, why this doesn't matter is because our ultimate goal here is a portfolio of all uncorrelated strategies.
So, even if we had, for example, a strategy that fires a few times a year, we would combine that with strategies that do trade more often, perhaps every single day or intraday, so that way the whole portfolio combination does have a healthy mix. So, here on the end goal, it's a portfolio, not just one single strategy. This is where beating the market actually comes from and later on in the video you'll see why this is so important to combine strategies.
So, moving on before we even touch any strategies or data, we need to figure out one, what we actually want to trade and then two, what time frame we want to trade it on. Now, this choice here matters because at the end of the video if you are interested in automating your strategy and turning it into a trading bot, a daily system here is going to be the most simple, right? It's going to wake up once every day after close, check the signals, place orders for you if your strategy's hit, and then go back to sleep until the next open.
Basically, almost nothing can break inside this daily trading bot, but once we run into intraday, there's a lot more moving components. It has to run live all day, every day. Needs a live data feed coming in. It needs a server that never sleeps, so you can either host this directly on your local computer or use a VPS, which I've covered in my previous videos as well. Both are doable, but I'd recommend daily if it is your first time building a trading bot since there's less things that could theoretically break.
Now, the last thing we need to consider before finding strategies with Claude here is data. Now, data is probably the most important backbone for not only testing strategies, but also running automated strategies as well. Claude by itself can't generate data for you. It needs to connect to an external service like Yahoo if you're using free data or any of the paid data providers like massive and data bento. So, if your data is bad, you're not going to be able to reliably test the strategies that Claude gives you.
So, if you were to, for example, test like a daily swing strategy on big ETFs, the data is completely free. And then for crypto specifically, if you need just daily data or data throughout the day, so intraday data, it's all free and that's just because exchanges basically give it away. Now, if we go to intraday data, whether you want minute level data or hour level data, futures is paid only, but paid just means like a few dollars from a professional vendor.
As you'll see later in the video, one of the surviving strategies that Claude gives us that we're actually running is running on NQ futures data that literally just cost me a few dollars. And then for the most expensive data, we have this bottom most scalping. And this is where we'll need tick data, which is a record of every single trade and quote, and it has to be high-quality. So at this speed, whether you make money is mostly about fees, whether you can get filled at the price you think.
Now, if you want to use the same high-quality data sources that I have for free, I have all these resources plus step-by-step guides on building trading bots and strategies across any asset class in my community. I currently run the largest AI-focused trading community on Skool, where we have hundreds of members all building out their own trading bots and systems ranging from stocks, crypto, options, and even futures.
So make sure to click the link in the description if you're interested. Now that we know the time frames and the type of data that we need for our potential strategies, the next step is where we're going to ask Claude to actually find candidates for us. So the idea here is that we're going to have Claude go through three checks that I'll show you the exact prompt for, where it's going to take into account the type of things you want to trade, where your goals are.
So the first check that's going to be built into the prompt is to make sure that the strategy candidates are old, simple, and published. This video is meant to be accessible for people at every level, so we're starting from tried and true strategies as the baseline. Everyone knows them, there's decades of research attached to them as well. But if you do want to get into more advanced strategies, the exact same process that I'm doing here and the prompts I'll show you can be tweaked or adjusted so that you have more variations test with.
So you can think of the candidates that we're finding right now as the baseline, and then you can layer on any more advanced properties like machine learning on top if you need to. Now the second check that's going to be built into the prompt is just to make sure that the strategy makes sense. There's a reason it pays, we don't want to just find random patterns. And then finally, but most importantly, is that it fits the asset.
So all assets pretty much trade differently. Gold trends, it barely mean reverts, whereas if you were to trade like spy, an ETF index, you're going to see mean reversion across a few days. This diagram goes into a bit more detail about how spy, QQQ, gold, NQ and NQ futures, single stocks or sector ETFs trade. And because these underlying assets all trade differently, the strategies that you're going to run on top of it is going to be different as well.
So that's why you need to first figure out the market. So which market you want to focus on and then the time frames which I talked about earlier. Now this is the prompt that connects everything we've talked about together. You can just run this on the web, so claw.ai. And then what we're going to do is propose 10 trading candidates and you can up this number it's 20, 100 if you want to on and then your market. So this is where you decide if you want to find strategies on gold, combination of gold and like QQQ, if you want to focus on futures.
And then on top of the market we'll also need to know the time frame. And then these just build in all the checks that I just talked about. So what we're doing here is kind of nudging claw in the right direction and making sure it gives us a pretty well thought out and reasonable list of candidates based on more tailored information like the markets, time frames. And this way you'll get a much better output than just what are some potential trading strategies.
And just to show you how simple yet effective this can be, uh by the end of the video I have a portfolio of five separate strategies. So this is only example of the simplest one there that claw found for us as a candidate. So the rule here is simple, if QQQ is above its 200-day moving average, you would just hold QQQ. And then if it's below, you would just hold gold. This only trades about five times a year, super low volume, but highly effective at around 153% returns and beat buy and hold QQQ significantly through all of our robust testing.
And then obviously with just five trades a year, we had to go through more robust testing. So we went through the past 50 years of history, not just five, to make sure that there were enough trades to validate this specific subset of strategies. So the whole goal of this step is just to find five to 10 testable, concrete trading strategy candidates. And you don't know yet which of them will survive. So this is obviously the final filtered version.
But, if you were to run that prompt and found 10, 20, or even 50 strategies, you would then use the next steps to actually test and validate those before getting to your final portfolio. So, after you run that first prompt through Claude on the web, you get your list of candidates, whether it's 10, 20, or 50. We'll take those candidates, build a whole testing system around them, find out which ones are worth running, and then creating a portfolio at the end.
Now, this is going to be a bit more complex than just using Claude on the web, since we're going to have it create this entire system for us. So, what you'll first need to do is start up Claude Code. The easiest way to do that is just with VS Code. It's an IDE. You would just add Claude Code as an extension. So, from the beginning of the video, if you find out that you do want to go for intraday data or paid data, this is where you would drop the data into your project folder.
So, with the first two steps done, you already have your project created. You already have the data dropped in before we're using Claude Code to do anything. And then after this, this is where we're going to start actually building the project. So, we're going to set rules, create the testing engine to find out which strategies we should include in the portfolio, find the run and results, and then finally automate everything with the trading bot.
Now that we have a Claude Code project created, we can begin building our system. So, this is the very first prompt that you'll run inside your Claude Code project, and it's probably the highest value prompt in this whole entire video. All it's saying is that before any testing happens, Claude write down what you're about to test. So, the idea, the exact rules, the settings, and what counts as a pass. And then Claude's going to keep all these files automatically, so you don't have to manage anything yourself.
This gets super helpful once you start testing tens to hundreds of different parameters of your strategies. So, here in this prompt, you can see we have brackets where we actually paste in all the list of candidates that we got from the last step. So, from that first prompt where we got our list of either 10, 20, or 50 trading candidate strategies, this is where you're going to paste it in. And then at the end, we're going to indicate what data sources we're using.
So, for all of my trading strategy candidates that I got from Claude, these were all on daily time bars, so we're just going to use Yahoo Finance as the free data source. But if you do want to use intraday premium data sources, just drag in all the data, and then you're just going to say at the end of the prompt what data source you're using, so they're able to pull the right data for you. Now that we inputted our candidates to the Claude code project and then set the initial rules, we can now have Claude code build a testing engine.
Now this is going to take one prompt, which I'll show, but before I show you that, I want to go over the rules for the actual testing engine. Now the first rule for testing is called splitting your data, and that just means that Claude splits all history into two chunks. So the idea here is that there's an older chunk, in my case 2010 through 2022, and that's where all the building and picking of strategies happen, and then there's a newer chunk of 2023 up to today, and this is basically completely sealed off until the very end, and it's only used for scoring.
Now the reason for this is because any strategy can look perfect on data it's already seen before, but what we need to do is test on data that it's never seen before. This is basically called out of sample testing, where the data the strategy builds on is called in sample, and then you test it out of sample with sealed data. So basically you build on old data, and then you test on new data. Now the second rule here is that costs are always on, so this includes transaction fees, financing and dividends.
So like a couple basis points per side on ETFs, few dollars round trip on futures, and financing costs whenever there's leverage. And then this is also where we're going to be modeling slippage as well. Now this might not be as relevant if you're trading daily bars, but if you're scalping or you're using a more intraday data, then costs basically scale with volume. So if you have a strategy that's trading like 250 times a year, you need to model all those costs, which is what we're doing here.
And then finally the third rule is no seeing the future, so the strategy only uses information that it would have had at the time. So it decides on yesterday's close and then trades at the next open to eliminate any look ahead bias. And it's important to explicitly state all these three rules inside your prompt, because if you don't, Claude can show you tens to hundreds of successful back tests that if you take to the live market, they wouldn't actually be profitable because one, you're not doing out-of-sample testing, so it's already seen the data before, or two, you're not modeling any costs associated with making those transactions, and then three, it's actually peeking ahead to data that it shouldn't have seen yet.
So, this is the next prompt you would copy and paste into your Claude code project right after the one you pasted before. Now that we've built the backtesting engine, we can now start actually running the strategy to see what is and this is the fun part. We already have all the rules written down, so the prompt here is super simple. All we want to do is run every single idea logged inside the ideas file that Claude created for us, and then we want to add every variant tested to the running count.
You want to report the tables. This way, it'll give you a whole rundown of all the strategies, variants, and how they performed. Now, here you can see the dashboard it created. So, my search ended up being around 155 ideas. Running everything through the sealed test windows that we created pretty much removed almost all of them. And then after we added in extra filters, which I'll show you in the next step, we only have around five strategies left standing.
And then these five strategies here is what got combined into the final portfolio. Now, our survival rate here is pretty low, 3%, which is good since we do want to filter out all of the potential candidates that Claude gave us to find the ones that are actually profitable and worth running. So, if you were to scroll down, we can actually see the survival rates by strategy family. So, out of intraday, there is only one strategy that survived, and that's the strategy on NQ, which I mentioned we'd have to pay a few dollars in data for.
Claude also gave us some single name momentum strategies that really only worked on one. We have two trend and momentum strategies, two mean reversion strategies, and then one crypto strategy as well. So, this is what basically all got combined into our portfolio. If you scroll down more, we can even see what caused most of these strategies to fail. So, out of the trend and momentum family, almost all of them failed except for two.
And because of all the rules we set, it's nice that we can have a reason as to why we shouldn't run these strategies. This way, we can see the individual issues with each of these strategies. If you go to mean reversion, same thing, only two out of the around 12 did work. And then we also covered intraday, calendar events, as well as pairs, so futures, cross assets, crypto, and overlays. Now, like I mentioned, we added additional filters.
So, just surviving the test window wasn't enough. We wanted to make sure that the winner of the surge was pretty much well verified and validated. So, put plainly here, we have another prompt that adds three additional filters. The first is stress testing on a different era, basically finding the worst decade you can. For us, that was 2000 to 2009. This included the dot-com crash plus the financial crisis. And that decade pretty much removed almost all the strategies that looked fine recently.
From our initial Quad Trading candidates, there's actually a leveraged QQQ idea that pretty much drew down 85% here. The second is family consistency. We want to make sure that the whole neighborhood of settings work and not just one lucky combination. And then finally, we have a plateau test here. And this is how you tune parameters without it turning into curve fitting. So, the idea here is that you only trust an optimized setting if the performance is smooth across the nearby settings and then the ranking on training data roughly matches the ranking on test data.
So, this is the exact prompt that you would again run inside your Quad Code project right after the last one. This is how you're going to run those same three exact checks that we just talked about. So, if you were to scroll through our filters, we can see that after the first filter, which is 2000 to 2009, it pretty much removed almost all strategies except for these. And then if we scroll down, we also have this plateau test here.
Now, here are the five final strategies that survived. All of them, again, old, published, and simple. So, the first is the exact strategy I showed you back in step three, which is the trend core. So, QQQ above the 200-day, hold QQQ, below it hold gold. On the test window, did 33.8% a year at a sharp of 1.66. Now, the second strategy here is momentum rotation. So, once a month you hold the five ETFs out of a universe of 50 that are closest to their 52-week highs, and then you go to cash when spy is below its 200-day average.
Then we have a dip buyer on spy. So, when the close lands in the bottom 10% of the day's range index is still above its 200-day average, you buy. And then you exit on a strong close or after 3 days. And then next we have this NQ opening range breakout. So, you trade the break of the first 30 minutes is range. And then this final strategy here is actually more so a sizing layer. The idea is that you would scale positions so that the portfolio runs around 20% volatility.
Now, this last prompt here is where we take all of our survivors and then combine them into a portfolio. So, when you have strategies, there's obviously stretches of times where it wins and stretches of times where it either does nothing or loses. So, from our portfolio of five, the trend strategy struggles basically when the market is choppy. Uh the choppy markets are when the dip buyer probably does the best. The futures NQ strategy is pretty isolated from what stocks are doing.
So, this step here is basically going to blend them together, figure out the correlations. Then we want to weight certain strategies to get either less money or more money to have a more balanced and well-performing portfolio. So, the idea here is that we're not really adding anything new. There's no new signal or tuning. All we're doing is taking strategies that win and lose at different times and then smoothing them out with one another.
And then more importantly too is obviously as you add more strategies to your portfolio, you would essentially repeat this combining step forever. So, each time you add a new strategy and it makes it through to this final process, whether it's a simple one or something more advanced, you would essentially just run this again to figure out first what the correlations are with your current strategies. And this way it can just be another leg inside the portfolio.
So, here in our dashboard, you can see the leg correlation. And then if we scroll down, we can see how our leverage version of the three-legged blend actually beats buying and holding QQQ and SPY. Now, to finish rounding out our portfolio of strategies, we need to figure out risk management and position sizing. So, first we want to find out how much we want to risk per individual trade. Second, we want to look at the portfolio as a whole.
If we have like a target volatility like 20%, and then third, we have leverage, so we need to figure out and floor of leverage in the portfolio. So, here we're utilizing more of Claude's general intelligence more rather than telling it exactly what to do. So, first we're hard coding the individual trade, but then we're going to have it then build a leveraged version of our portfolio and then give us an honest read on when the leverage helps or when it hurts.
And then for the very, very last part of this whole entire process is something called strategy decay. So, all this means is that strategies stop working over time. Whenever you find successful strategies, they get crowded out and then arbitraged away. This just means that once enough people are trading the same edge, that edge goes away. So, the best way to think about this is that any specific strategies that you get from Claude are temporary, but the more important thing is this whole entire process that we went through in this video because this way you can just continue to find new edges and continually test.
Once the strategies start performing, if it's worse than random or the drawdowns start increasing, you would then repeat this whole exact process again with finding new strategies from Claude. So, this is the final prompt. It is something just writes shut off rules before the system goes live, so it halts new entries and alerts if rolling performance drops below either what random entries would produce or if the drawdown just goes past the worst backtested drawdown.
And then the idea here is that you would run this daily check every single day. Now that we finished building out our strategy portfolio, this last part, if you're interested, is probably the most value add since most people don't want to be staring at a screen all day. And this is where you can actually automate the strategies and build a trading bot with Claude around the strategies you just created. So, the good news is you already did most of the hard work.
This is literally the easiest step. All you need to do now is connect to a broker that actually allows for automatic trades via API. And the top two I'd recommend are either Alpaca or IBKR Interactive Brokers. Alpaca is the easier one to get started for beginners since it's free and it covers stocks, ETFs, and crypto. So, all you would really need to do is head over to Alpaca's website, sign up for a free account, get your API keys, and then come back here and then run this final prompt.
With this prompt, Claude will essentially wire everything up and then store all your information inside a settings file in the project. And then finally, you would just paste your API key directly inside the project file. That way Claude doesn't actually read your own API keys and you can get hooked up right away. So, once this is connected, if you have a daily bot, just make sure your local machine or your computer is turned on every single day.
It's going to wake up after the close, check signals, submit orders for the next open, log everything, and then go back to sleep. So, you don't have to touch anything. The only thing you have to make sure is that Claude is in hard limits, so that's why we had the risk and sizing. Want to make sure there's a cap on position size, a cap on how many positions can be open at once, and then a kill switch if something looks wrong.
Ideally, you'd want to paper trade for at least a month or two just to make sure your strategy is working in the live markets before you ever connect it to a live account. Now, if you found this video helpful, make sure to like, comment, and subscribe as I cover everything regarding trading with AI, whether you're trading stocks, options, crypto, and futures. And like I mentioned in the beginning of the video, if you are interested in diving a bit deeper and getting full in-depth guides for building out these trading systems and bots, make sure to click my link in the description for my AI trading community.
The words are the caption track's own and nothing is reworded or re-transcribed. Paragraph breaks are placed between sentences so the text reads as prose.
Free tools for your own script: paste a draft and see where it stands before you record it.
Paste your draft and see where viewers are likely to drop off, with a rewrite for each weak line.
Paste the first 30 seconds of your own draft for a hook score and rewrites.
Check your draft against YouTube's advertiser-friendly guidelines before you record it.
Read this channel's public videos and transcripts, and download a writing brief for it.