YouTube2Text

I Re-Created A Quant Trading Strategy With Claude Code (Nobel Prize Method) — Transcript

by Miles Deutscher Finance · 4,633 words · 689 segments · language en · Watch on YouTube

Full transcript

  1. 0:00There's one calculation that every
  2. 0:01single quant desk on earth runs every
  3. 0:03single morning, and it's not which way
  4. 0:05the market's going. Most traders don't
  5. 0:07even know the real question that it
  6. 0:09answers. At the center of it sits an
  7. 0:11equation that won a Nobel Prize in
  8. 0:13economics. And in this video, I'm going
  9. 0:15to rebuild the way a quant actually
  10. 0:17thinks from the ground up. Here's
  11. 0:18exactly what you're going to walk away
  12. 0:19with. The full method explained properly
  13. 0:21so you don't need any sort of math or
  14. 0:22technical background. A cloud code skill
  15. 0:25which runs it for you on any asset that
  16. 0:27you trade. By the end of this video,
  17. 0:28you'll have it fully installed on your
  18. 0:30computer so you can have quant-like
  19. 0:31intelligence at your fingertips. And a
  20. 0:33custom TradingView indicator that puts
  21. 0:35the entire framework in a quantifiable
  22. 0:38data set on your chart. And here's the
  23. 0:40part that a lot of videos like this
  24. 0:41don't include. We're actually going to
  25. 0:43go backtest the data for 15 years and
  26. 0:45look at how this strategy actually
  27. 0:47performs with real market data. Oh, and
  28. 0:50all of this is for free. I'm going to
  29. 0:51show you how to install it at the end
  30. 0:52using the link in the description below.
  31. 0:54You can claim all the assets and prompts
  32. 0:56from today's video. So, let me give you
  33. 0:57some quick context as to why I'm
  34. 0:59covering this. I've been deep in the
  35. 1:00markets for the last 7 years, and I
  36. 1:02noticed a few years ago that there was a
  37. 1:04massive shift happening with AI. I was
  38. 1:06actually one of the first people to put
  39. 1:07out AI trading bot videos on YouTube.
  40. 1:10And since then, we've had an absolute
  41. 1:11explosion with the intelligence of these
  42. 1:13models, which in my opinion make them
  43. 1:15absolutely essential if you're a trader.
  44. 1:17So, the fact we have this information at
  45. 1:19our fingertips, the fact that you can
  46. 1:20now compress strategies into a single
  47. 1:23skill, into a single file that you can
  48. 1:25use over and over again, opens up a
  49. 1:27plethora of opportunities. So, in
  50. 1:29today's video, I wanted to take a
  51. 1:30concept that real quant traders use and
  52. 1:33condense it down into something that you
  53. 1:34can tangibly interact with. And that's
  54. 1:36the power of AI. You now have the power
  55. 1:38of strategies and indicators and data
  56. 1:41that quant firms used to have access to.
  57. 1:42And as a retail trader, you can now have
  58. 1:44access to the exact same stuff. So, I
  59. 1:47personally believe there's a massive
  60. 1:48edge for anyone who augments their
  61. 1:50trading with AI. But in order for you to
  62. 1:51understand what we're actually building
  63. 1:52here, let's talk about the theory behind
  64. 1:54today's video. I've basically reduced a
  65. 1:56quant's thinking down to eight ideas,
  66. 1:58and I'll walk you through in order how a
  67. 2:00quant would reason with a real trade,
  68. 2:02with each idea building on the last. I
  69. 2:04actually got inspiration for this
  70. 2:05concept from Louis Jackson, who did a
  71. 2:07great video on the Markov method. And
  72. 2:09that method, if you've seen it,
  73. 2:10basically models which direction the
  74. 2:12market is moving in. And it's a
  75. 2:13reasonable way to think about regimes.
  76. 2:15But today, I'm going to present the
  77. 2:17other half of the picture, the
  78. 2:18calculation that actually determines the
  79. 2:20stakes behind real positioning, aka how
  80. 2:23much money actually goes on the table
  81. 2:25per trade. And on a real quant desk,
  82. 2:27that decision is treated with just as
  83. 2:29much rigor as the overall direction of
  84. 2:31the market, because ultimately that's
  85. 2:32what determines profitability and
  86. 2:35survival of a trader. So, before we get
  87. 2:36into anything else, let's actually
  88. 2:37define what the word quant really means,
  89. 2:40because it gets thrown around
  90. 2:41constantly, but I rarely see it
  91. 2:43explained. A quant [music] stands for
  92. 2:44quantitative analyst. These people often
  93. 2:46study advanced mathematics, physics, or
  94. 2:49computer science, and funds will recruit
  95. 2:51top talent often on some of the highest
  96. 2:53salaries in finance. Their job is
  97. 2:55essentially to replace opinion with a
  98. 2:57real measurement. So, discretionary
  99. 2:59traders, they'll build a view on the
  100. 3:01market. Quants will build a model to
  101. 3:04represent that view. They'll test it on
  102. 3:06history, they'll model it on different
  103. 3:07variables, and they come up with a real,
  104. 3:09tangible system based on real
  105. 3:11constraints. They don't usually work as
  106. 3:13lone geniuses, although there are a few.
  107. 3:15They usually split up into different
  108. 3:17departments which handle different
  109. 3:18segments of the market. One team will
  110. 3:20typically research signals, one on risk
  111. 3:22and sizing, because every single element
  112. 3:25that comprises a trade requires a
  113. 3:26different skill set and different
  114. 3:28parameters. Now, of course, I'm
  115. 3:29generalizing here, because every single
  116. 3:31fund operates differently, but at a
  117. 3:33large scale, this is typically how you
  118. 3:34see them operate. Now, if you're a
  119. 3:36trader, here's the fundamental
  120. 3:37difference between how you might see a
  121. 3:39chart and how a professional quant
  122. 3:41trader might see a chart. Most traders
  123. 3:43just see price, so they'll look at where
  124. 3:45it's been, they'll look at where it's
  125. 3:46going, and essentially the entire read
  126. 3:48on the market is directional. A quant
  127. 3:50will often analyze violence or
  128. 3:52volatility first. They'll look at how
  129. 3:54hard the market is moving independent of
  130. 3:57direction. So, a retail trader might
  131. 3:59think, "This feels dangerous." A quant
  132. 4:01would essentially hear an incomplete
  133. 4:03sentence. They'd be thinking, "Well,
  134. 4:04dangerous is a measurable quantity. So,
  135. 4:07what's the number?" So, instead of every
  136. 4:09morning looking at a price target like a
  137. 4:11retail trader, quants will look at
  138. 4:13volatility, value at risk, position
  139. 4:15sizing, Greeks, exposure, expected
  140. 4:17moves, and they'll apply stress test to
  141. 4:19market movement and essentially try and
  142. 4:21combine all of that into a single score.
  143. 4:23In today's video, I'm going to refer to
  144. 4:25that as the violence score, but I'm
  145. 4:27aware that it's a lot more nuanced than
  146. 4:28that in practice. And underneath that
  147. 4:31system is essentially a single mental
  148. 4:33model. And it's the most valuable idea
  149. 4:35that I want to present to you in this
  150. 4:37entire video. For every trade that you
  151. 4:38ever take, you'll essentially just ask
  152. 4:41two questions. Which way, so in which
  153. 4:43direction do I think price will move,
  154. 4:45and how much? So, how much am I willing
  155. 4:48to stake on this position? And the
  156. 4:49second question from the start of the
  157. 4:50video is something traders often get
  158. 4:53wrong, even though it's the most
  159. 4:55important in terms of profitability and
  160. 4:58survival in the market. And that's how
  161. 4:59you can have traders with a really high
  162. 5:01win rate, but they're actually not
  163. 5:02profitable. And how you can have traders
  164. 5:04with a lower win rate, but they are
  165. 5:06profitable over time because they
  166. 5:07understand when to size and how to size.
  167. 5:10Retail treats which way will price move
  168. 5:13as essentially the entire game. Position
  169. 5:15size is usually an afterthought. Whereas
  170. 5:17a quant will rank those two questions by
  171. 5:19how answerable they are. Which way is
  172. 5:22barely answerable. It's actually the
  173. 5:23weakest signal in trading. Whereas how
  174. 5:25much you actually stake is fully
  175. 5:27controllable. It's the one variable in
  176. 5:30trading that's actually at your command.
  177. 5:32So, often a quant will invert energy
  178. 5:34allocation, meaning they'll put minimum
  179. 5:35effort on a question that can't be
  180. 5:37answered reliably, and then they'll put
  181. 5:39maximum rigor on the variable that can
  182. 5:41be controlled completely. So, the
  183. 5:43industry, the entire trading industry,
  184. 5:45sells you one question, and it's a sexy
  185. 5:47sell. Price is going to move up, price
  186. 5:49is going to move down, but the reliable
  187. 5:51funds over time have actually compounded
  188. 5:53their wealth answering the boring
  189. 5:55question and compiling it into a
  190. 5:57framework that they can use. And today,
  191. 5:58the really powerful thing I'm going to
  192. 5:59teach you is how to put a framework into
  193. 6:02a quant skill, and I'm going to give it
  194. 6:04to you today at the end of the video
  195. 6:05that you can repeatedly use. This, in my
  196. 6:07opinion, is the future of trading. So,
  197. 6:09let's go back to what I was discussing
  198. 6:10before, the violence score. Because in
  199. 6:12order to develop a quant-like model, we
  200. 6:14need to discuss why violence can
  201. 6:16actually be predictable. It has a
  202. 6:17property that market direction doesn't
  203. 6:19have, and you can see it clearly on the
  204. 6:21chart. Market chaos typically doesn't
  205. 6:23arrive in isolation, but instead in a
  206. 6:25series of clusters. So, for example, we
  207. 6:27can look at March 2020 in the S&P, which
  208. 6:29was absolute carnage, and then we can
  209. 6:31compare that to the FTX collapse on a
  210. 6:34different asset in Bitcoin in 2022, and
  211. 6:36it paints a similar picture, but on a
  212. 6:38completely different asset. A quant
  213. 6:40doesn't settle for just eyeballing that
  214. 6:41pattern. They want to define an exact
  215. 6:43number. So, for example, I'll walk you
  216. 6:44through the thought process. On a
  217. 6:46typical day, there's roughly a 10%
  218. 6:47chance of a violent move. On a top
  219. 6:49decile day, I actually ran this based on
  220. 6:5115 years of back-tested Bitcoin data, on
  221. 6:54a day after a violent move, that
  222. 6:56probability triples to 30%. That's the
  223. 6:59predictability I'm talking about. It's
  224. 7:01not 100%, but it's more predictable, and
  225. 7:03it's a number you can actually trade
  226. 7:05off. Then I went and checked the monthly
  227. 7:07data on the S&P 500. And if you go back
  228. 7:09to 1871, violent moves are twice as
  229. 7:11likely to follow violent months. So,
  230. 7:14that's 150 years of a completely
  231. 7:16different asset class, but it follows a
  232. 7:17similar law. So, violence isn't the one
  233. 7:19metric a quant would look at, but it is
  234. 7:21a metric [music] which can be
  235. 7:22quantified, assigned a probability, and
  236. 7:25thus developing a framework which you
  237. 7:27can trade off. What I just referenced is
  238. 7:28something called volatility clustering.
  239. 7:30It's one of the most reliable patterns
  240. 7:32in financial data, and this is
  241. 7:33essentially the quant's worldview.
  242. 7:35Direction is close to random, but
  243. 7:36violence carries genuine information
  244. 7:38about what might happen tomorrow. If
  245. 7:40you're confused, don't worry, I'll make
  246. 7:42it really simple. The cleanest way to
  247. 7:43hold this in your head is actually
  248. 7:45seismology, or earthquakes. A major
  249. 7:47earthquake tells you nothing about the
  250. 7:50specific direction a singular building
  251. 7:52might fall, but it tells you with higher
  252. 7:54confidence that more shaking might be
  253. 7:56coming. That is exactly how a quant
  254. 7:58reads a violent trading day. Zero
  255. 7:59information about direction, but
  256. 8:01substantial information about tomorrow's
  257. 8:03volatility. Stated as a rule, direction
  258. 8:05is unpredictable, whereas magnitude
  259. 8:07typically is predictable. Okay, here's
  260. 8:08where we get into the fun stuff, the
  261. 8:10Nobel Prize equation, which is an
  262. 8:12essential part of the framework that
  263. 8:13we're building today. Because we just
  264. 8:15confirmed that violence is predictable.
  265. 8:16So, the question now becomes, how do you
  266. 8:18predict it? And this is exactly where
  267. 8:20the Nobel Prize enters. In 2003, the
  268. 8:23economist Robert Engle won a Nobel Prize
  269. 8:26for solving this exact problem. His
  270. 8:28original model was called ARCH. His
  271. 8:30student Tim Bollerslev extended it to a
  272. 8:32system that trading desks still use
  273. 8:35today, GARCH. The Nobel Prize was for
  274. 8:37the discovery, but the GARCH extension
  275. 8:39is the tool that is still used in
  276. 8:41quantitative trading. GARCH stands for
  277. 8:43generalized autoregressive conditional
  278. 8:46heteroscedasticity. All right, I know
  279. 8:48that's an absolute tongue twister, but
  280. 8:49essentially it's a model that's used to
  281. 8:51predict market volatility, rather than,
  282. 8:53as we've been discussing, predicting the
  283. 8:54exact direction of asset prices. A quant
  284. 8:56models tomorrow's violence as a sum of
  285. 8:58three components: the base level the
  286. 9:00market always carries, which is the
  287. 9:02asset's personality, plus a fraction of
  288. 9:04today's shock, the aftershock component,
  289. 9:06and a fraction of today's violence
  290. 9:07level, which is the memory component. As
  291. 9:09an example, I fitted this to Bitcoin's
  292. 9:11entire 15-year history, and the weights
  293. 9:13it estimated tell you the whole story.
  294. 9:15The shock carries 15% of the weight, and
  295. 9:17the memory carries 85%. In practical
  296. 9:20terms, volatility is almost as
  297. 9:22persistent as it's mathematically
  298. 9:24possible to be. And that persistence is
  299. 9:26why the forecast works, because you're
  300. 9:28forecasting a quantity that hardly
  301. 9:30changes overnight. Note, this model does
  302. 9:32not deliberately claim directionality of
  303. 9:34an asset. It forecasts how violent
  304. 9:36tomorrow may be, but not in which
  305. 9:38direction. Any model which claims to
  306. 9:40accurately predict directionality needs
  307. 9:43to be met with a grain of salt because
  308. 9:45this model earned a Nobel Prize because
  309. 9:47it deliberately restricts its claims to
  310. 9:49what the data can actually support. And
  311. 9:51the restraint itself is a lesson in how
  312. 9:52quants actually think. Okay, so let's
  313. 9:54say you're a quant and you now have this
  314. 9:57violence forecast. Here's how it becomes
  315. 9:59deterministic of an actual position
  316. 10:01size. The reasoning runs as follows. My
  317. 10:03risk on any trade equals my size
  318. 10:05multiplied by the market's violence. I
  319. 10:07can't control the violence, so instead I
  320. 10:10control the size of my position. So step
  321. 10:12one is setting an actual limit for your
  322. 10:13account. The actual annual swing that
  323. 10:15you're prepared to tolerate.
  324. 10:16Institutional desks typically run around
  325. 10:1815%. Step two is reading the current
  326. 10:21market's level. So let me actually show
  327. 10:22you. This is the NASDAQ as I'm
  328. 10:24recording, which is moving at roughly
  329. 10:2730% annualized if you look at the storm
  330. 10:30gauge and the market violence percentage
  331. 10:32on the storm gauge. This, which I'm
  332. 10:34going to explain very shortly, is
  333. 10:36custom-built based on the entire
  334. 10:38framework. And I'm going to give it to
  335. 10:39you at the end, but let me explain. This
  336. 10:4130% number here means the market is more
  337. 10:43violent than 96% of the past year, which
  338. 10:47you could consider a storm by any
  339. 10:49reasonable definition. And notably, it
  340. 10:51began whilst the index was at all-time
  341. 10:53highs. As the next step, step three, you
  342. 10:55want to divide this number, so 15 over
  343. 10:5730, which gives you 1/2, which is this
  344. 10:59number here, this sizing number, which
  345. 11:02essentially means if a trade signal
  346. 11:04fires today, it receives half of your
  347. 11:07normal size allocation. Let's say on a
  348. 11:08$10,000 baseline, this would be around
  349. 11:11$5,000. The best analogy is like cruise
  350. 11:14control. The road's gradient changes
  351. 11:16constantly, but you can control your
  352. 11:18speed to hold steady. So in this case,
  353. 11:20the market's violence changes daily, but
  354. 11:22your account risk holds steady. And note
  355. 11:25the conditional. If a signal actually
  356. 11:26fires, the reasoning never generates
  357. 11:28entries. Entries belong to a different
  358. 11:31department, which is where you can use
  359. 11:32things like the Markov method to
  360. 11:34determine which directional environment
  361. 11:36we're in. But, you might think that
  362. 11:38[music] a strategy like this merely
  363. 11:40smooths the ride. So, it makes highs
  364. 11:42less high, and it makes lows less low.
  365. 11:45But, that's actually not true. In
  366. 11:46reality, it can produce more money.
  367. 11:48[music] And the reason is an empirical
  368. 11:50fact about markets. The worst losses in
  369. 11:52history do not occur on randomly
  370. 11:54distributed days. They cluster inside
  371. 11:57the violent periods. 2008, March 2020,
  372. 12:00the major crypto collapses. In each
  373. 12:02case, volatility was already elevated
  374. 12:05before maximum damage arrived. This is
  375. 12:08the aftershock logic. The shaking was
  376. 12:10already underway before the building
  377. 12:12eventually came down. So, by reducing
  378. 12:14size in a storm, you're refusing to
  379. 12:16carry full exposure during a period
  380. 12:18where there is a higher likelihood of an
  381. 12:20extreme event which could threaten your
  382. 12:22account. All right, we're about to
  383. 12:23build, but one final thing. I want to
  384. 12:25discuss a final piece of mindset,
  385. 12:27because I believe any serious
  386. 12:28practitioner, especially before you're
  387. 12:30about to use a model like this, should
  388. 12:31explain what a model can't do. This will
  389. 12:33never call a top or a bottom. It
  390. 12:35contains, in fact, no directional
  391. 12:37information whatsoever. You probably
  392. 12:39have many indicators, many other
  393. 12:40methods, and even your own discretionary
  394. 12:42biases to come up with those conclusions
  395. 12:44yourself. If there's a crash that erupts
  396. 12:47from a full period of calm, then even if
  397. 12:49you use this, you may still catch it
  398. 12:50with full size. That's where you need
  399. 12:52stop losses and drawdown protection.
  400. 12:54There are still shock events which can't
  401. 12:56always be predicted. And you'll see in a
  402. 12:58minute why this isn't hypothetical, it's
  403. 13:00actually in the data. If you're a trader
  404. 13:02that specifically trades breakouts and
  405. 13:04you've developed an edge during these
  406. 13:05expansionary periods, then naive
  407. 13:07volatility sizing could actually work
  408. 13:09against you. If you guys like this
  409. 13:10video, I'll make it a series, and that
  410. 13:12could be a future component. So, I can't
  411. 13:14claim that this model eliminates risk or
  412. 13:16will maximize everyone's trading
  413. 13:18strategy. But, what I can say is it's a
  414. 13:20damn good place to start if you're
  415. 13:21interested in getting more into
  416. 13:23quantitative trading, and the risk
  417. 13:25frameworks that real quantitative
  418. 13:27traders will use. I believe you can
  419. 13:29expand upon what I'm about to give you
  420. 13:31to make it even better, and in fact,
  421. 13:33that's something I'm going to bring to
  422. 13:34the channel in the future. So, of
  423. 13:36course, make sure you subscribe, and
  424. 13:37we're going to continue diving into this
  425. 13:39stuff. As AI gets better, so does our
  426. 13:41capabilities to make better tools for
  427. 13:43ourselves. All right, here we go.
  428. 13:44Everything we just walked through, the
  429. 13:46complete chain of reasoning I've encoded
  430. 13:49into a Claude skill that you can
  431. 13:51download. So, what you want to do is you
  432. 13:52want to use the link in the description
  433. 13:54below, follow the steps, and you'll get
  434. 13:55access to a GitHub. This GitHub has the
  435. 13:59entire GARCH method. So, it has the
  436. 14:01installation path, which you put into
  437. 14:04Claude code. It explains what the skill
  438. 14:06actually does. It explains the
  439. 14:08onboarding prompt, and then it has a
  440. 14:10Pine Script bonus, which I'll show you
  441. 14:12how to install on TradingView in a
  442. 14:14minute for you to get the exact overlay
  443. 14:17that I showed you before. So, what you
  444. 14:19want to do to install it is go into the
  445. 14:21installation section, click copy, then
  446. 14:23you want to go into Claude code. All
  447. 14:25right, so you want to paste it in. If
  448. 14:27you're on the terminal, {forward slash}
  449. 14:28plugin should work. If you have any
  450. 14:30issues, so if you're on the app, you can
  451. 14:32replace the {forward slash} with the
  452. 14:33word Claude if you have any errors. So,
  453. 14:35that's the route that I'm going to take.
  454. 14:37Now, it's running the plugin commands.
  455. 14:38It's installing the plugin, and the
  456. 14:40commands have successfully installed, so
  457. 14:42you now have the skill on your Claude.
  458. 14:45The other option, and this is the way
  459. 14:46that you can see the skill being written
  460. 14:48line by line, is clicking on
  461. 14:50garchmethod.md,
  462. 14:52and you can copy and paste this entire
  463. 14:54file, and you can put it into Claude
  464. 14:56code. And now, it's going to fetch the
  465. 14:58skill files from the repo. You don't
  466. 14:59need to do both methods. I'm just
  467. 15:01showing you both ways that you can
  468. 15:02install it in case you actually want to
  469. 15:04see things line by line. You can see
  470. 15:05it's installed the strategy and verified
  471. 15:07the strategy. So, what do you do now?
  472. 15:09Well, now you can just talk to it. It's
  473. 15:10a skill that you can talk to to verify
  474. 15:13against the exact method. So, let me
  475. 15:14show you an example. You could say,
  476. 15:16"What's the volatility forecast on
  477. 15:18Bitcoin?" And it's going to run directly
  478. 15:20from the skill, which is trained on all
  479. 15:22of this in the GitHub repo. And you can
  480. 15:24see that it's given me the Bitcoin
  481. 15:26volume forecast, 40.9% annualized. It's
  482. 15:29given me a calm regime. It's got the one
  483. 15:31day ahead forecast. The good thing about
  484. 15:33this is you can actually just query it.
  485. 15:34So, you could say, "Could you explain in
  486. 15:36simple terms what this means and how
  487. 15:38this should impact my Bitcoin position
  488. 15:40sizing?" So, you can actually speak to a
  489. 15:43skill that is trained on a real quant
  490. 15:44method. And you can actually just build
  491. 15:46on this over time. So, if you have
  492. 15:48refinements you want to make or
  493. 15:49improvements or if new models come out
  494. 15:51and we can refine it together even
  495. 15:53further, you can just train the skill so
  496. 15:55it gets better over time. And right now
  497. 15:57I'm creating skills for a bunch of
  498. 15:58things. I'm creating skills for
  499. 15:59different methods. I'm creating skills
  500. 16:01to help me size positions. I'm creating
  501. 16:03skills to help me execute positions,
  502. 16:05just like a real quant firm would do.
  503. 16:07Taking skills for varying parts of
  504. 16:09comprising a trade. That is really how
  505. 16:11you can get the most out of AI to be a
  506. 16:13real live trading assistant. So, it came
  507. 16:16up with a plain English version. Think
  508. 16:17about it like a weather forecast. The
  509. 16:19model says a typical day tomorrow
  510. 16:20Bitcoin moves around 2.1% which
  511. 16:22annualizes to 41%. Over the past year
  512. 16:25Bitcoin's rougher than this about 2/3 of
  513. 16:26the time. So, right now it's on the calm
  514. 16:28end. That's the calm regime. This is why
  515. 16:30it matters for sizing. Or let's say
  516. 16:31you're about to enter a position on the
  517. 16:33Nasdaq. You could say, "Help me size my
  518. 16:35Nasdaq position." And it can actually
  519. 16:37walk you through how to think of the
  520. 16:38trade like a quant. So, you can see now
  521. 16:40it's running the GARCH forecast on the
  522. 16:42Nasdaq. So, it said for the Nasdaq the
  523. 16:44model says to cut your position down and
  524. 16:47not grow it. And you can actually go
  525. 16:48back and forth and have a discussion
  526. 16:50with the model based on positions that
  527. 16:52you might want to size into. So, if you
  528. 16:54have a directional read like we
  529. 16:55discussed before, you can use this for
  530. 16:57the volatility or the risk component of
  531. 17:00sizing the trade. But let's go a step
  532. 17:01further. Let's actually test if this can
  533. 17:04make money. So, I'll test it with a very
  534. 17:06popular strategy, the same strategy,
  535. 17:07which is an EMA cross on Bitcoin, which
  536. 17:10is trained on 15 years of data, once at
  537. 17:12a fixed size and once the quant way,
  538. 17:15using the skill. So, I just asked it to
  539. 17:17download Bitcoin price history in case
  540. 17:18it didn't have access, Right run the
  541. 17:20sizing comparison on it, and then make
  542. 17:21sure the target risk matches the EMA
  543. 17:23strategy to make sure the comparison is
  544. 17:25apples to apples. All right, so you can
  545. 17:28see the growth of $1 from 2012 with the
  546. 17:32fixed size strategy on Bitcoin, which is
  547. 17:35the gray line, and then the volatility
  548. 17:37target GARCH size line, which you can
  549. 17:40see actually ends up marginally beating
  550. 17:42the fixed strategy on Bitcoin. At the
  551. 17:45same time, the volatility targeted
  552. 17:46strategy from GARCH actually took less
  553. 17:49drawdowns than Bitcoin in the meantime
  554. 17:50as well. So, whenever you run a model
  555. 17:52like this, you can actually get
  556. 17:54volatility targeted graphs generated
  557. 17:57like this, which I think are really
  558. 17:58cool, so you can map out potential
  559. 18:00trades, which I think is valuable, and
  560. 18:02it's what a quant firm would do to
  561. 18:03visually map out a trade before they
  562. 18:05enter. And obviously, Claude does this
  563. 18:07for you if you download the skill. I
  564. 18:08think the crazy part is actually the
  565. 18:10Sharpe ratio. This is essentially the
  566. 18:12risk-adjusted return of an investment,
  567. 18:14because investments aren't just about,
  568. 18:16you know, whether you made money, it's
  569. 18:18also about how much risk you took on to
  570. 18:20make that amount of money, and you can
  571. 18:22see that the volume targeted approach
  572. 18:24had a significantly better Sharpe ratio,
  573. 18:26meaning it had better risk-adjusted
  574. 18:28returns. So, even if you make the same
  575. 18:29amount of money, if you can do so taking
  576. 18:31on less risk, then that is the better
  577. 18:33approach, and that was reflected in the
  578. 18:34drawdown charts. It simply took on less
  579. 18:37drawdown. So, the max drawdown with the
  580. 18:38volatility targeted approach that used
  581. 18:40our strategy was 63%. The max drawdown
  582. 18:43with the fixed size strategy was 81%.
  583. 18:45The worst month with our approach was
  584. 18:4719%. The worst month normally was 40%.
  585. 18:50The final equity on our approach was
  586. 18:5221,000, and the final equity on the
  587. 18:54fixed size approach was 17.9 thousand.
  588. 18:56Now, I'm going to ask it, "Run the same
  589. 18:58comparison on my Nasdaq position over
  590. 19:01the last 50 years." Now, for Nasdaq,
  591. 19:03this is actually extremely interesting.
  592. 19:05It improved the Sharpe ratio. It
  593. 19:07improved every single risk number, so
  594. 19:09you took on a lot less risk, but it did
  595. 19:10cost a full point of compounded annual
  596. 19:12growth rate. So, over 50 years this
  597. 19:14would have made you 99 less dollars. So,
  598. 19:17Bitcoin won risk and absolute return.
  599. 19:19Equities didn't. Equities [music]
  600. 19:21won the risk component, which may have
  601. 19:22enabled you to size up more, which may
  602. 19:24have enabled you to, you know, end up
  603. 19:26out-returning, but that is a variable
  604. 19:28test we need to run on new numbers. But
  605. 19:29nonetheless,
  606. 19:30it did cost in this experiment less
  607. 19:33returns. Because the size of throttle
  608. 19:35mostly trend exposure during violent
  609. 19:37rallies off the lows. However, it did
  610. 19:39earn its keep in some capacity because
  611. 19:41the goal of a fund is not to blow up.
  612. 19:43So, in the dot-com bust, where fixed
  613. 19:45sizing hit its yearly worst at minus
  614. 19:4728.8%
  615. 19:49volume targeting kept it to roughly
  616. 19:51minus 13%. Same story in 2008, 28%
  617. 19:54versus 13% and 2022, 23% versus 13%. And
  618. 19:59its worst month was cut from 10.9% to
  619. 20:02only 7.7%. So, the takeaway with the
  620. 20:04Nasdaq is that volume targeting is
  621. 20:06buying insurance, not extra return. So,
  622. 20:09it helps the pain, but it costs you 1%
  623. 20:12compounded annual growth rate. And
  624. 20:14whether that trade is worth it, as Fable
  625. 20:15points out, depends on whether you'd
  626. 20:17actually sit through a minus 29% without
  627. 20:19capitulating. Most people wouldn't and
  628. 20:21capitulation costs more than the
  629. 20:22insurance premium. Very interesting
  630. 20:24thought process. Once again, this skill
  631. 20:26is not meant to be the only thing you
  632. 20:28use to trade. This is a tool for you to
  633. 20:30use to understand risk and to help
  634. 20:32understand what environment you're in
  635. 20:34and how to target. I do think a lot of
  636. 20:36people though, they struggle with this
  637. 20:38so much that if they had a tool like
  638. 20:40this, they would lose significantly less
  639. 20:42amounts of money cuz they'd be able to
  640. 20:44think in a different capacity when
  641. 20:45opening trades. Even if it is for
  642. 20:47riskier asset types, it can help a lot.
  643. 20:49And it even helps when charting. So, if
  644. 20:50you go into the GitHub and you go into
  645. 20:53Pine Script and go Storm Gauge Pine,
  646. 20:55what you can do is you can copy the
  647. 20:58entire file here. You can just either
  648. 21:00copy the raw file in the top right-hand
  649. 21:02corner or simply copy and paste. Then go
  650. 21:05into TradingView. Then click on the
  651. 21:07little pyramid logo here, then I've
  652. 21:09already got one in, but I'll clear it
  653. 21:10out and show you what it would look
  654. 21:11like. Paste it in, click enter, click
  655. 21:13refresh, and this is going to load the
  656. 21:16indicator on your screen, which is this
  657. 21:18indicator here, which goes through the
  658. 21:20metrics we discussed before. So, the
  659. 21:21market violence metric, the current
  660. 21:23percentage versus the limit, the
  661. 21:24category [music] it's in versus the last
  662. 21:26year, so we could see it's heavily in
  663. 21:27storm territory, 96% more volatile
  664. 21:31versus the past year. It has a sizing
  665. 21:33suggestion and an example on $10,000 and
  666. 21:36a suggested action based on the number
  667. 21:38above. And then you can also see the
  668. 21:40volatility bands in here as well to help
  669. 21:42you understand the movements of the
  670. 21:44market. So, this is a very helpful tool
  671. 21:46that you can use, and of course you can
  672. 21:47build upon it. The best thing about this
  673. 21:48being in cloud is that you can make
  674. 21:50tweaks and edit things over time and
  675. 21:52create your own parameters. So, if you
  676. 21:53want all of this, use the link in the
  677. 21:54description below. If you enjoyed this
  678. 21:56video, make sure to subscribe because
  679. 21:58I'm going to be doing a lot more AI
  680. 21:59trading content like this, and we can
  681. 22:01even build skills together for other
  682. 22:03areas of trading and potentially other
  683. 22:05quant strategies because there are
  684. 22:06multiple approaches here, but I wanted
  685. 22:08to touch on one of the most relevant
  686. 22:09ones today. And yeah, thank you for your
  687. 22:11time today. I'll see you in the next
  688. 22:13video. Have a lovely rest of your day.
  689. 22:14Peace out.

About this transcript

This page contains the full transcript of I Re-Created A Quant Trading Strategy With Claude Code (Nobel Prize Method) by Miles Deutscher Finance, generated from the public captions YouTube serves with the video. The transcript has 4,633 words across 689 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.