YouTube2Text

I built a 24/7 Claude Code setup for trading — Transcript

by Algo-trading with Saleh · 4,972 words · 673 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Today, I'm going to show you a Cloud
  2. 0:01Code setup that I just did on my Mac
  3. 0:04mini, which is a remote machine that I
  4. 0:06have access to. In my case, that is on
  5. 0:07my home's network, but it could be
  6. 0:09anywhere in the world. And this allows
  7. 0:11me to run algo trading research for
  8. 0:1424/7. So, not for minutes or hours, this
  9. 0:17could literally be for days. And that
  10. 0:19allows me to ask for very high sharp
  11. 0:21ratio strategies. And I can even set
  12. 0:23some high criteria thanks to Monte Carlo
  13. 0:26to ensure the strategies that the agent
  14. 0:28finds for me aren't over fit. So, this
  15. 0:30is like a dream come true because until
  16. 0:32recently we did not have access to
  17. 0:34models that could do this. And thanks to
  18. 0:36Cloud Code subscriptions, [music]
  19. 0:37it's even going to be affordable for me.
  20. 0:39If you have watched my previous videos,
  21. 0:41I always say that in order to trade
  22. 0:43successfully, you're going to need more
  23. 0:45than just one good strategy. In fact,
  24. 0:47the only holy grail of trading that I
  25. 0:49have found is if you had a portfolio of
  26. 0:5120, 30, or maybe even 50 strategies. And
  27. 0:54this setup helps me to reach that goal
  28. 0:56as fast as possible. Now, before I
  29. 0:58continue, I got to say I am not advisor
  30. 1:01and this video is for educational only.
  31. 1:03So, with that out of the way, let's get
  32. 1:05right to the video.
  33. 1:07As always, I'm going to be using the
  34. 1:08Jesse framework for the algo trading
  35. 1:10side of things. But, I'm not going to go
  36. 1:12through the installation steps in this
  37. 1:14video. You can check out the
  38. 1:15documentation, which is really easy to
  39. 1:17follow, or you can watch my previous
  40. 1:19tutorials about how to set up Jesse.
  41. 1:21But, in this video, the goal is to do it
  42. 1:23inside my remote Mac mini. So, in front
  43. 1:25of me, I have the screen sharing app of
  44. 1:28macOS and I've already added my Mac mini
  45. 1:31machine. So, if I click on it, I'm going
  46. 1:32to be able to log in to it. So, I'm
  47. 1:35going to enter my password and there we
  48. 1:36go. So, in it I have the absolute bare
  49. 1:39minimum installed. And that is
  50. 1:41intentional because I just need to run
  51. 1:43Cloud Code and Python and Jesse in it.
  52. 1:46That's it. But, just in case I have some
  53. 1:48browser, some VPN app, and that's it.
  54. 1:49So, nothing that concerns you. And I
  55. 1:51could enter a terminal app inside here
  56. 1:54and continue. But, I don't want to do
  57. 1:57that. Instead, what I prefer to do is to
  58. 1:59use this via my own terminal app inside
  59. 2:02my own machine. So, I've already created
  60. 2:05an alias for this. So, when I say SSH
  61. 2:08Mac mini, it's going to enter it. In
  62. 2:09case you're interested to see what's
  63. 2:11behind this command, this is it. So,
  64. 2:13nothing fancy. SSH, then my username,
  65. 2:16and the local IP address of that machine
  66. 2:18on my home's network. So, let's enter
  67. 2:21it. And now I am logged in to that new
  68. 2:23machine. Next, I'm going to CD into my
  69. 2:25Jesse project on this machine. Now, for
  70. 2:27me, that is going to be CD Jesse, and
  71. 2:30then I'm going to go back, and then find
  72. 2:33the gym project. There we go. Now, I
  73. 2:35have also automatically activated the
  74. 2:37correct conda environment. Now, in your
  75. 2:39case, that's going to be conda activate,
  76. 2:41and then the name of that environment,
  77. 2:43which for me is Jesse 3.12. And I know
  78. 2:46it's already activated because I'm
  79. 2:47seeing it here. So, now if I, for
  80. 2:49example, say pip list, I'm going to find
  81. 2:52Jesse being installed here, right there.
  82. 2:55All right. So, very quickly, before I
  83. 2:57continue, I want to open another
  84. 2:58terminal window. So, let's first see
  85. 3:00which directory is this one. All right.
  86. 3:02So, I'm going to copy this one. I'm
  87. 3:04going to SSH into Mac mini one more
  88. 3:06time, and then I'm going to say CD, and
  89. 3:08then here. There we go. Now, the reason
  90. 3:10I did this is because now I want to
  91. 3:12firstly see if I can do Jesse run
  92. 3:15without any issues, and I can. Now, I am
  93. 3:17getting one error related to Python
  94. 3:19language server, but I don't really need
  95. 3:21this one, so I'm going to skip this. The
  96. 3:23important part is that I am getting this
  97. 3:25MCP command, and everything else seems
  98. 3:28to be working just fine. Now, before we
  99. 3:29continue, I'm going to stop this one
  100. 3:31more time, and I'm going to run this
  101. 3:34inside a tmux window. And the reason I
  102. 3:37want to do that is because I want to be
  103. 3:38able to close my local machine's
  104. 3:40terminal without this SSH window getting
  105. 3:43closed. So, for that, I'm going to say
  106. 3:45tmux new, and then I'm going to give it
  107. 3:48a name. There we go. And because I'm
  108. 3:50seeing this green line here, I know that
  109. 3:52everything is just correct. By the way,
  110. 3:55forget this line here. I'm going to have
  111. 3:57to fix this later, but for now
  112. 3:58everything seems fine. So, now I'm going
  113. 4:00to say Jesse run one more time and it's
  114. 4:03telling me that it doesn't know Jesse.
  115. 4:05That's because the correct conda
  116. 4:06environment isn't activated. So, now
  117. 4:08that that is done, it should work. And
  118. 4:11there we go. So, one more time inside
  119. 4:12this terminal window, I'm going to run
  120. 4:15the tmux window one more time. So,
  121. 4:17that's going to be tmux and then new and
  122. 4:22then dash s and I'm going to give it
  123. 4:24another name, but this time because I
  124. 4:26want to run the cloud code in it, I'm
  125. 4:28going to name it cloud. And there we go.
  126. 4:31Now, I could run the conda environment,
  127. 4:33but I don't think I need it, but it
  128. 4:34doesn't matter. Just in case I'm going
  129. 4:36to do that. And before running the cloud
  130. 4:38code, I want to ensure to add this MCP
  131. 4:41of Jesse in it. For that, I'm going to
  132. 4:43go to Jesse's documentation on the
  133. 4:46connecting cloud code and I'm going to
  134. 4:48copy this command here. Going to go back
  135. 4:51to my terminal and paste it here. But
  136. 4:53there is a catch here, guys. So, you see
  137. 4:55in this command, the MCP address has the
  138. 4:58port 9002, but in here I'm seeing it is
  139. 5:009003. So, I'm going to edit this into
  140. 5:049003 and hit enter. That's it. You see,
  141. 5:07it's telling me that this new MCP has
  142. 5:09been added. So, now next time I run the
  143. 5:11cloud in it, it's going to have access
  144. 5:13to that MCP. So, let's say cloud and
  145. 5:16then I'm going to create new session.
  146. 5:19So, I'm going to remove this continue
  147. 5:21flag here, but I'm going to leave
  148. 5:23permission mode to bypass permissions
  149. 5:25because I don't want it to keep asking
  150. 5:26me for annoying messages, but many
  151. 5:29people say this is dangerous, so you
  152. 5:31need to be careful. Feel free not to
  153. 5:32pass it, but again you're going to have
  154. 5:34to deal with so much, but I am going to
  155. 5:36do it especially because this is
  156. 5:37supposed to be an isolated environment
  157. 5:40meant for doing exactly this. So,
  158. 5:42there's not much that cloud could even
  159. 5:45mess with even if it wanted to, but in
  160. 5:47all these months that I've been using
  161. 5:49Cloud Code, I've never faced any issues
  162. 5:51with it. So, I'm just going to go with
  163. 5:52this. There we go. And you see, as soon
  164. 5:54as I ran that, in this terminal, I can
  165. 5:56see some requests being made into the
  166. 5:58MCP, and everything seems to be fine.
  167. 6:00Now, here, I'm also going to switch the
  168. 6:02model into Cloud Opus 4.8. At the time
  169. 6:06that you're watching this, maybe there's
  170. 6:08a new model out there. Who knows? But,
  171. 6:10let's go with this one just for now. All
  172. 6:12right. Now, before I move on, let's
  173. 6:14first test to see if Claude can access
  174. 6:16Jesse's MCP. So, I'm just going to ask
  175. 6:19it, "Hey Claude, how's it going? Can you
  176. 6:22access Jesse's MCP in order to create
  177. 6:24strategies, run backtests, or things
  178. 6:27like that?" There we go. So, you see,
  179. 6:28first of all, it's happy that I said hi
  180. 6:31to it, something really important that
  181. 6:33you should always do. And next, we can
  182. 6:35see that it has access to tools such as
  183. 6:38creating or editing strategies,
  184. 6:40backtesting, research and validation,
  185. 6:42optimization, Monte Carlo, significance
  186. 6:44testing, and candle data. So, this seems
  187. 6:47brilliant. Now, while that's going, I
  188. 6:49want to quickly remind you guys about
  189. 6:50our Telegram. It's the fastest way to
  190. 6:52get notified about my future work,
  191. 6:54whether it's a new tutorial or a tool
  192. 6:56that I create. Also, don't forget to
  193. 6:58check out our free Discord, where more
  194. 6:59than 5,000 members like you and I are
  195. 7:01hanging out there and helping out each
  196. 7:03other with algo trading, so we can all
  197. 7:05succeed together. The links for both are
  198. 7:07down in the description. All right. So,
  199. 7:08I cleared everything, and now we are
  200. 7:11ready to give the agent its prompt, its
  201. 7:14task to perform. And this is going to be
  202. 7:16a huge prompt, because I want it to do a
  203. 7:18lot for me, and I don't want it to just
  204. 7:21perform a quick task and just come back
  205. 7:23and give me the results. So, I want this
  206. 7:24to be fully automated, and I want it to
  207. 7:27work for hours or even days. So, I've
  208. 7:29prepared this prompt for you, so you
  209. 7:31guys can also copy and paste it, and
  210. 7:33feel free to edit it however you like.
  211. 7:35All right. So, I'm going to read it very
  212. 7:36quickly. I need it to act as a 24/7
  213. 7:38quant agent who can perform research. At
  214. 7:41the end, I am going to need 10 different
  215. 7:43strategies. Each of them must have a
  216. 7:45Sharpe ratio above 1.5 over the past 4
  217. 7:48years. So, this is a very difficult
  218. 7:50criteria for the agent, and in many of
  219. 7:53my previous tests, the model wasn't able
  220. 7:55to perform this well. So, let's see how
  221. 7:57it does now. And this is just too
  222. 7:59strict, guys. So, feel free to lower
  223. 8:01this, especially because if it can reach
  224. 8:04that number on one single strategy,
  225. 8:06that's going to be very, very difficult.
  226. 8:08All right, continuing. It doesn't matter
  227. 8:10if you try hundreds of different
  228. 8:12strategies or different versions of it.
  229. 8:13So, this is because I don't want it to
  230. 8:14just go and write like 50 strategies and
  231. 8:17come back and complain that I couldn't
  232. 8:19find it. So, I wanted to keep trying.
  233. 8:22Next, when you run a Monte Carlo
  234. 8:23simulation, I want the Sharpe ratio of
  235. 8:25the original backtest to be positioned
  236. 8:27in the middle between the median and the
  237. 8:29best 5%. So, this is to ensure that the
  238. 8:31result isn't overfit. So, this is my
  239. 8:33criteria for how I pick it. Again, this
  240. 8:35is too strict, guys. Like, usually, even
  241. 8:37if it's below 5%, that means it's good
  242. 8:40enough, but this time I'm saying it must
  243. 8:42be in the middle between median and the
  244. 8:45best 5%. By the way, guys, first when I
  245. 8:47started recording this video, I asked
  246. 8:49the agent to run multiple agents itself
  247. 8:51to take advantage of this feature of
  248. 8:54Cloud called workflows. But when I did
  249. 8:56that, the model often times would just
  250. 8:58run some stuff in the background, tell
  251. 9:00me that it's waiting for the result, and
  252. 9:02then it just silently died. And that was
  253. 9:04just horrible. So, that's why I switched
  254. 9:06into this version where I just ask one
  255. 9:09agent to do everything. So, let's remove
  256. 9:12this from before. Next, you do not have
  257. 9:14to pick only one symbol for this. It is
  258. 9:16okay to try different trading symbols.
  259. 9:18So, I've given it a list of trading
  260. 9:20symbols that I have already imported
  261. 9:22candles for, but even if I hadn't, the
  262. 9:24Jesse MCP is able to import these by
  263. 9:27itself, so that's also pretty cool. It's
  264. 9:29okay for you to find multiple strategies
  265. 9:31on the same symbol. Do not feel
  266. 9:32pressured to absolutely use all the
  267. 9:34symbols. So, this is also something
  268. 9:36else. Like, I want model two, for
  269. 9:37example, to write multiple strategies
  270. 9:39for BTC, let's say. So, it doesn't have
  271. 9:42to feel like it needs to find all the
  272. 9:4410,
  273. 9:45with each of them being on different
  274. 9:47symbols. Next, make sure to find me all
  275. 9:50sorts of trading strategies, and not
  276. 9:51just trend following. So, mean
  277. 9:53reversion, or maybe even greater
  278. 9:54strategies where we enter and exit at
  279. 9:56multiple points. Those are all fine.
  280. 9:58Notice that some of these symbols are
  281. 10:00low-cap altcoins. Some of them are so
  282. 10:03volatile or pouring quality that their
  283. 10:05prices are more likely to go down. This
  284. 10:07could be an opportunity to develop
  285. 10:09short-only strategies. So, I don't want
  286. 10:11the model to always think that the
  287. 10:13strategy must go both long and short at
  288. 10:16the same time. So, it's fine for some
  289. 10:18altcoins, for example, to only short
  290. 10:20them. So, that's also a valid scenario.
  291. 10:23You can also come up with whichever time
  292. 10:25frame that works best. However, I would
  293. 10:26prefer it if it was either 15 minutes,
  294. 10:2830 minutes, or hourly. Feel free to also
  295. 10:31use an anchor time frame, such as the 4
  296. 10:33hours, in your analysis, but not for
  297. 10:35trading time frame. The most important
  298. 10:37part is not to stop until you have found
  299. 10:39all 10 strategies. In the meanwhile,
  300. 10:41feel free to keep updating different
  301. 10:44report files in markdown format, so that
  302. 10:46I can easily monitor your progress. Keep
  303. 10:48the reports in a new folder called
  304. 10:50reports inside your project directory.
  305. 10:52This may take hours or even days, and
  306. 10:54that is perfectly fine with me. Do not
  307. 10:56interrupt to ask for permission. I trust
  308. 10:58your judgment. Only ping me if something
  309. 11:00is wrong, and you absolutely need my
  310. 11:02input. So, sorry, guys, if this was too
  311. 11:03long. It's just that I needed to be as
  312. 11:06specific as possible in the prompt, and
  313. 11:09I think this is going to perform better.
  314. 11:10So, let's go back to Cloud Code, and
  315. 11:13paste this whole thing in, and hit
  316. 11:16enter. So, let's go and come back a bit
  317. 11:18later. All right. It's been like 24
  318. 11:20hours, but it wasn't like what I
  319. 11:22expected. It wasn't exactly an
  320. 11:25uninterrupted 24 hours. The results are
  321. 11:28here, and they are acceptable, but
  322. 11:30again, they're not as good as I expected
  323. 11:33them to be. So, let's go through it. So,
  324. 11:35the first issue that I had was
  325. 11:37apparently Cloud Code these days has
  326. 11:39some sort of memory. And because as I
  327. 11:41mentioned just earlier in my previous
  328. 11:43prompt, which actually didn't work, I
  329. 11:45was using sub-agents and that wasn't
  330. 11:47working fine. So, when I asked the model
  331. 11:50to do this this time without the
  332. 11:52sub-agent, but you know, I didn't
  333. 11:53specifically mention that, it started
  334. 11:56using sub-agents again. So, I had to
  335. 11:58actually mention it that "Hey, I do not
  336. 12:01want you to use sub-agents anymore." So,
  337. 12:03that's the first thing that I had to do.
  338. 12:05By the way, I just changed the theme and
  339. 12:07now everything seems better on the dark
  340. 12:09mode. So, the first thing I needed to do
  341. 12:12was to specifically ask it, "Hey, do not
  342. 12:14use sub-agents for running things." So,
  343. 12:15that's the first thing I had to do or,
  344. 12:18you know, interruption that I faced and
  345. 12:20I had to fix. Next, it kept working and
  346. 12:23working, but it couldn't really find a
  347. 12:26strategy that would have given it the
  348. 12:28Sharpe ratio that I was asking for. So,
  349. 12:30that was a real for the model, which to
  350. 12:33be fair was expected. Like, I did not
  351. 12:36expect this to be able to find something
  352. 12:37really great in just a few minutes. So,
  353. 12:40that's why I said, "Hey, keep working
  354. 12:41for hours or days." But unfortunately,
  355. 12:44the model kept complaining. So,
  356. 12:46beginning with here, it said, "To be a
  357. 12:48straight with you, based on the evidence
  358. 12:49so far, tennis strategies each robustly
  359. 12:52with a Sharpe ratio more than 1.5 looks
  360. 12:54beyond what this single symbol can do."
  361. 12:57So, it asked if it could just stop and
  362. 13:00give me a lesser number. And this isn't
  363. 13:03what I wanted. So, I said, "Keep
  364. 13:04grinding for the 1.5." So, that's the
  365. 13:06first time I said this. And then, just
  366. 13:09like a while later, again it complained.
  367. 13:11So, it said, "I want to be straight with
  368. 13:13you. Across 12 optimizations and 45
  369. 13:16backtests, the evidence suggests that a
  370. 13:19robust Monte Carlo near median 1.5
  371. 13:22Sharpe is unreachable on single symbol
  372. 13:24in universe." So, I said that, "You know
  373. 13:26what? The numbers you are telling me
  374. 13:28like 12 optimizations and 45 back tests
  375. 13:31are nothing for this type of work. You
  376. 13:33should be thinking about hundreds of
  377. 13:34back tests. Keep going." So, this again
  378. 13:36is something I didn't expect Opus 4.8 to
  379. 13:39do because they said this model has been
  380. 13:41optimized to perform tasks for
  381. 13:44long-running hours, and this was
  382. 13:46literally nothing. So, this was really
  383. 13:48weird for me because if you're not
  384. 13:49reaching my token limits, why don't you
  385. 13:52just keep working? Like, this is
  386. 13:53supposed to be loop. Why is the model
  387. 13:55stopping early? And it's not just the
  388. 13:58only problem I've had with Opus lately.
  389. 14:00I feel like it has become really dumb
  390. 14:02ever since the Cloud Fable came out, and
  391. 14:05of course they shut it down later, but
  392. 14:07ever since I feel like Cloud could was
  393. 14:09not giving me the same quality as
  394. 14:10before. So, I just looked it up, and on
  395. 14:13Reddit I found this, and apparently many
  396. 14:15people are experiencing the exact same
  397. 14:17thing. So, maybe this is the reason. So,
  398. 14:19maybe in the near future they're going
  399. 14:21to fix this. All right, so this is
  400. 14:23something to remember, but even with all
  401. 14:25this, I was still able to get what I
  402. 14:28wanted out of this experiment. So, let's
  403. 14:30continue. Again, it continued working
  404. 14:32after I asked this, and finally at this
  405. 14:35point it had a breakthrough. So, first
  406. 14:36strategy over the gate. So, this one
  407. 14:39using the Soul UCT on the dual anchor,
  408. 14:44so 4 hours and daily, was able to
  409. 14:46achieve a sharp ratio of 1.5 while still
  410. 14:50it was passing my Monte Carlo filter in
  411. 14:53order to ensure the result isn't
  412. 14:54overfit. Then it kept working,
  413. 14:57and at this point it was able to find me
  414. 15:00five separate strategies that were all
  415. 15:03seeing the criteria that I had set for
  416. 15:06it. Now, this point I asked it to print
  417. 15:08out more details because I wanted to see
  418. 15:10them in a markdown file cuz for example,
  419. 15:12it wasn't even telling me on this table
  420. 15:15which symbols they were for or which
  421. 15:17time frame, and that was a bit annoying.
  422. 15:19I also asked it, "Please try finding
  423. 15:21other stuff for other symbols. These are
  424. 15:23all for sole. And then at this point it
  425. 15:25was able to find 10 different strategies
  426. 15:28with the criteria that I had set for it.
  427. 15:31The sharp ratio of all of them as you
  428. 15:32can see are at least 1.5. The max
  429. 15:34drawdown of all of them is acceptable.
  430. 15:37And even the number of trades that they
  431. 15:39were taking was pretty good. So this
  432. 15:41seems really good. And except this one
  433. 15:42which is on the borderline, all of them
  434. 15:44are also passing the Monte Carlo
  435. 15:47criteria which means that they are
  436. 15:49hopefully not overfit. Or you could say
  437. 15:51they are less likely to be overfit than
  438. 15:54any other thing that it could have found
  439. 15:56until that point. Now, I got these
  440. 15:58results today. So after my last prompt
  441. 16:01when I told the model, "Hey, just keep
  442. 16:03going. Try at least hundreds of back
  443. 16:05tests and do not stop." Apparently that
  444. 16:07one worked. So you could say that's a
  445. 16:09really good prompt that I'm going to use
  446. 16:11from now on. So just tell the model,
  447. 16:14"Hey, I need you to perform at least
  448. 16:15hundreds of back tests before stopping."
  449. 16:18You could even increase this to like
  450. 16:20thousands because if you do have a an
  451. 16:22Anthropic coding subscription and if
  452. 16:24your limits allow it, why not just let
  453. 16:27the model do this? And the fact that I
  454. 16:29was doing this on my Mac mini was also
  455. 16:31pretty helpful because if I had to do
  456. 16:33this on my own main machine, I would
  457. 16:35have needed my resources. So I couldn't
  458. 16:37just let it do keep doing research for
  459. 16:39this long. All right. Now that
  460. 16:41everything is ready, I can go to the
  461. 16:44reports file that it generated for me.
  462. 16:46So notice that I have opened that
  463. 16:49servers files inside my local Z editor.
  464. 16:53So it has this option called open
  465. 16:55remote. And then you simply pass the SSH
  466. 16:59address like the username and the IP for
  467. 17:01it. Now in case you don't remember from
  468. 17:03before, I was saying SSH Mac mini and I
  469. 17:06said that if I were to show you the
  470. 17:08command below it, it's going to be this.
  471. 17:10So SSH soleh at sign the local IP of
  472. 17:14that machine on my network. So notice
  473. 17:16this local address here, 192.168.1.103.
  474. 17:23This is important because Well, first of
  475. 17:25all, you're going to need to copy this
  476. 17:27and paste it to your Z editor in case
  477. 17:30you're also using this, or whichever
  478. 17:32editor really, such as Cursor. They all
  479. 17:34have this option which allow you to SSH
  480. 17:36into that remote machine and edit its
  481. 17:38files just very easily. So, I've already
  482. 17:41done that. I have access to all the
  483. 17:42files on the machine. And specifically,
  484. 17:44this is the project that I care for. So,
  485. 17:46I named it Jim. And we have this reports
  486. 17:49directory, right? So, this one, accepted
  487. 17:51strategies, is the one that has all the
  488. 17:53strategies that were meeting those
  489. 17:55criteria. Now, this is in markdown
  490. 17:57format, so by simply pressing the
  491. 17:59command, shift, and V, I'm going to be
  492. 18:00able to preview it in proper formatting.
  493. 18:04But this one is a bit zoomed out, and it
  494. 18:07makes it a little bit difficult to read.
  495. 18:09Also, for some reason, I cannot click on
  496. 18:11the links, probably because it doesn't
  497. 18:12have the proper styling. But anyways,
  498. 18:15so, my point is, let's actually go back.
  499. 18:17All right, so, the point is I have all
  500. 18:19the strategies that we found. It's
  501. 18:22telling me which files they are in. So,
  502. 18:23for example, I could just copy this one
  503. 18:25and search for it. So, here I can see
  504. 18:28the parameters that it has defined. And
  505. 18:30I'm guessing these are the results of
  506. 18:32the optimization that you ran. So,
  507. 18:33instead of keeping the other parameters,
  508. 18:35it tends to do this. And we can see how
  509. 18:38it defined the ATR indicator, the EMA,
  510. 18:41the Donchian channel. And here are the
  511. 18:44entry rules of the strategy. So, it says
  512. 18:46if the agree is one and closing price is
  513. 18:49above the upper band of the Donchian
  514. 18:50channel, go long. If it's the opposite,
  515. 18:53go short. And here's the position
  516. 18:55sizing. So, everything seems very neat
  517. 18:58and perfectly fine. All right, so, let's
  518. 19:01go back. Now, I can also see the result
  519. 19:03of the Monte Carlo that it ran, the
  520. 19:06backtesting. So, it says it's It had a
  521. 19:08Sharpe of 1.5. So, So looks awesome. But
  522. 19:10here's the thing. Suppose I want to take
  523. 19:13a quick look at the details of the back
  524. 19:16test or Monte Carlo. And you see it has
  525. 19:18generated URLs to the dashboard of
  526. 19:20Jesse. So this is really great and
  527. 19:22helpful. But if I were to just copy
  528. 19:24this, go to my Chrome browser and paste
  529. 19:26it in, it's not going to work. Why?
  530. 19:28Because this is using the local address,
  531. 19:30which is 127.0.0.1,
  532. 19:34which is for my local machine. But I
  533. 19:37want the address for that remote Mac
  534. 19:39Mini machine, right? And you remember it
  535. 19:40from before that I said this is going to
  536. 19:42be 192.168.1.103.
  537. 19:49So if I replace it with that, now it's
  538. 19:51going to work. So I'm going to enter my
  539. 19:53password and there we go. Now I'm able
  540. 19:55to actually see the result. So let's do
  541. 19:57something. I'm going to copy this
  542. 19:59address from here, go back to my code
  543. 20:01editor,
  544. 20:02open a new AI window, and I'm going to
  545. 20:06attach this file, and I'm going to ask
  546. 20:08it to replace that previous address with
  547. 20:11this one. So replace 127.
  548. 20:15Sorry, 001
  549. 20:17with this in all this file. All right,
  550. 20:20so it's going to do it for us. And while
  551. 20:22this is going, I want you to also pay
  552. 20:25attention to this. So suppose this is
  553. 20:27something I always want to do. Now I
  554. 20:30could simply edit the agents.md file of
  555. 20:33this project to do this for me. So if I
  556. 20:37do it here, then I would know that it
  557. 20:40would always do this. So whenever it
  558. 20:41wants to generate the report file for
  559. 20:43me, it will use the address, so this one
  560. 20:47for example, that would always work for
  561. 20:49me no matter where I'm opening it from.
  562. 20:51Even from the same machine with this
  563. 20:53address is going to work. So this is
  564. 20:54also a good tip to remember. All right,
  565. 20:56so we already have this address for back
  566. 20:58test. So let's do it one more time. All
  567. 21:00right, so this is for Monte Carlo, and
  568. 21:02we can see that the result of the
  569. 21:04original back test is in the middle of
  570. 21:06the simulations. This is a good sign and
  571. 21:08the sharp ratio of the original backtest
  572. 21:10is 1.30, which is even a little bit less
  573. 21:14than the median number. So, this is
  574. 21:15really good for whenever you want to see
  575. 21:18if the strategy is overfit or not. So, I
  576. 21:20like this result and going back to its
  577. 21:23backtesting results. So, especially this
  578. 21:25one, which is shows me the log scale
  579. 21:27equity curve, we can see that it is very
  580. 21:29nice and steady beating the benchmark,
  581. 21:32which is solid UCTT chart and here we
  582. 21:34can see the max drawdowns of the
  583. 21:36strategy. So, we can see the five worst
  584. 21:40periods. So, all of them seem
  585. 21:41acceptable. Next, we can see the monthly
  586. 21:44returns heat map chart. We can see it's
  587. 21:46profitable almost every single year
  588. 21:48except on 2024, where in five months in
  589. 21:52a row it was losing. So, this is also
  590. 21:55important to remember that the strategy
  591. 21:57is not going to be profitable every
  592. 21:58single month. And here we can see the
  593. 22:01monthly return distribution of the
  594. 22:02strategy. All in all, everything seems
  595. 22:04good. Next, we can see the average
  596. 22:07holding time of the strategy is around
  597. 22:0822 hours. The minute is 34%. So, this
  598. 22:12isn't a high win rate strategy, so
  599. 22:14that's something that is very important
  600. 22:16because if you are going to trade this,
  601. 22:18approximately you're going to lose seven
  602. 22:20out of every 10 trades. So, mentally
  603. 22:22this is going to be very tough. So,
  604. 22:24that's very important to remember and
  605. 22:27the average trade per month is around
  606. 22:2912. So, definitely not bad. Next, we
  607. 22:31have the Skeltner Breakout strategy
  608. 22:34here. So, let's copy it and search for
  609. 22:36it. All right, so here's the code. Here
  610. 22:38are the hyper parameters of the strategy
  611. 22:41and here we can see the other metas that
  612. 22:44it defined, the entry rules for long
  613. 22:46positions, for short positions, the
  614. 22:49position sizing for long positions. This
  615. 22:51is how it submits the buy order, how it
  616. 22:54defines the size of the position. So, it
  617. 22:57sees risking a certain percentage for
  618. 23:00each position and that certain
  619. 23:02percentage is go here. So, it is 2%. So,
  620. 23:06again pretty standard for adjusted
  621. 23:09strategy. So, let's go and check the
  622. 23:12back test results and also the Monte
  623. 23:14Carlo results. All right, so again an
  624. 23:16acceptable equity curve, which is
  625. 23:18growing nice and steady. The max
  626. 23:20drawdown of the strategy is very low,
  627. 23:22which means we can easily add to the
  628. 23:24size of the position. The minute is 42%,
  629. 23:27so I actually like this one better. The
  630. 23:29Sharpe ratio is 1.61, so this is
  631. 23:32definitely better than the previous
  632. 23:33strategy. Here's the worst five drawdown
  633. 23:37periods and here's the monthly return,
  634. 23:40so it is profitable every single year.
  635. 23:42Even on 2024, this one isn't like losing
  636. 23:45five months in a row, so this is really
  637. 23:47good to see. And so, all in all, this
  638. 23:50one seems like a better candidate for
  639. 23:53me. So, let's check out the Monte Carlo.
  640. 23:56So, the Sharpe ratio of it is 1.55.
  641. 24:00The median is 1.33.
  642. 24:02The best 5% is two. So, this one is
  643. 24:04almost in the middle. So, again a pretty
  644. 24:08solid strategy, I would say. I actually
  645. 24:10very much like this one and I preferred
  646. 24:13to the previous one. I think this one
  647. 24:15could actually be good for me. So, I
  648. 24:17could go through the other strategies as
  649. 24:19well, but you get the idea because the
  650. 24:21point was for you to learn how to set up
  651. 24:25your own AI Quant to do research for
  652. 24:28you. Now, I am going to submit at least
  653. 24:31one of these strategies on our
  654. 24:33strategies page on our website. So, if
  655. 24:35you want to check it out or see the
  656. 24:37results of the strategies on other
  657. 24:39period symbols or time frames, feel free
  658. 24:42to do so. So, there you go, guys. You
  659. 24:43just saw both the strong points and the
  660. 24:46weaknesses of this setup and how to fix
  661. 24:48the weaknesses. The results weren't
  662. 24:50exactly what I asked for initially, but
  663. 24:52it was more than acceptable and I now
  664. 24:55know exactly how to proceed in order to
  665. 24:58reach my initial goal. Now, if you like
  666. 25:00the video, please support me by liking
  667. 25:02the video and posting a comment to let
  668. 25:04me know what you think and subscribing
  669. 25:06to the channel because I make videos
  670. 25:08just like this one regularly and you
  671. 25:10don't want to miss them. My name is
  672. 25:11Saleh, guys. Thank you so much for
  673. 25:13watching. I'll see you in the next one.

About this transcript

This page contains the full transcript of I built a 24/7 Claude Code setup for trading by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 4,972 words across 673 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.