YouTube2Text

Claude 4.5 tested: Is it Good for algo-trading strategies? — Transcript

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

Full transcript

  1. 0:00Hey guys, the Anthropic team just
  2. 0:02released Claude 4.5 which is supposed to
  3. 0:05be the king of the coding and in the
  4. 0:07past they have proven to indeed be the
  5. 0:09king of the coding but what I'm
  6. 0:11interested as always is the performance
  7. 0:13of these models for algo trading in
  8. 0:16Python. So let's test it to see if the
  9. 0:18model can write us some good strategies,
  10. 0:20whether it can help us to debug our
  11. 0:22existing strategies and also whether or
  12. 0:25not the model has some actual trading
  13. 0:27knowledge to improve the result of an
  14. 0:29existing strategy. So if all that sounds
  15. 0:31interesting to you, let's get right into
  16. 0:33it. So here's a blog model that they
  17. 0:35just released. And according to this,
  18. 0:37the performance of this model is
  19. 0:39supposed to be even better than Opus
  20. 0:414.5, which was indeed a really, really
  21. 0:44good model. but it costed like a kidney.
  22. 0:48But this one costs exactly as much as
  23. 0:50the Sonnet 4, which wasn't that
  24. 0:53expensive. It was definitely affordable.
  25. 0:55Not the cheapest model, but good enough
  26. 0:57for most users. And here you can also
  27. 0:59see a benchmark of it compared to the
  28. 1:01previous models such as GPT5, which is
  29. 1:03also a really good model. And Gemini 2.5
  30. 1:05Pro, which at this point is considered
  31. 1:07an old model, and I'm not even sure why
  32. 1:10they are including it in this table. But
  33. 1:12anyways, in agent encoding, you can see
  34. 1:14that it definitely holds up even
  35. 1:16compared to opus. But one that is really
  36. 1:19important to us is this one. So, high
  37. 1:21school math competition because it is
  38. 1:23basically telling us how good the model
  39. 1:25is in mathematics, which is also what we
  40. 1:27use in algo trading. And you can see it
  41. 1:29is beating all the other models by a
  42. 1:31high margin except 5. So, that one is
  43. 1:35also really good in math. So, that's
  44. 1:36really interesting. So I guess the cloud
  45. 1:40models in the past were really good at
  46. 1:42coding but not as much good at
  47. 1:44mathematics like the GPT5 was but in
  48. 1:47this model they really made up for that.
  49. 1:49So that's really brilliant. And here's
  50. 1:51also another interesting metric and that
  51. 1:53is financial analysis which is of course
  52. 1:55what we care about and it is beating all
  53. 1:58the other models including GPT5. So this
  54. 2:00is also really nice to see. And here's
  55. 2:02also another benchmark chart for
  56. 2:04finance. And as you can see, Cloud 4.5
  57. 2:06is beating all the other models, even
  58. 2:09the Opus 4.1. And that is just
  59. 2:12brilliant. Now, before I continue, I got
  60. 2:13to say that since our point is to test
  61. 2:16the model for algo trading. I don't want
  62. 2:18to just run the vanilla model. I want
  63. 2:21one that has some custom instructions
  64. 2:23for algo trading. For that, you have two
  65. 2:25options. So the first one is to use the
  66. 2:27cloud version, which I call JessPT. I
  67. 2:30made it myself. you can get started for
  68. 2:32free or upgrade for more limits and that
  69. 2:34one now has access to cloud sonet 4.5
  70. 2:37and all the other models that are out
  71. 2:39there. So feel free to use this one or
  72. 2:41if you don't want to do that let's say
  73. 2:43you have some privacy concerns or you
  74. 2:45don't want to pay me anything that is
  75. 2:47perfectly fine just go and watch my
  76. 2:49previous video where I teach you how to
  77. 2:51build your own AI for algo trading from
  78. 2:53a scratch. So if you use that one you
  79. 2:55don't have to pay me anything and you
  80. 2:56will keep full privacy for yourself. But
  81. 2:58if you want to get started as fast as
  82. 3:00possible, Jess GPT is the best option
  83. 3:03and that's the one that I'm going to use
  84. 3:04in this video. Now, we're going to ask a
  85. 3:06model 10 questions and see the results
  86. 3:08and give it rating. And the first
  87. 3:09question is really simple. Write a
  88. 3:11golden cross strategy. So that's like
  89. 3:13hello world question in the world of
  90. 3:14algo trading, right? So let's give it a
  91. 3:16hit. All right. So let's copy the code
  92. 3:19and go back to Jess's dashboard. And
  93. 3:22here I'm going to create a new strategy
  94. 3:24and I will call it test cloud 4.5.
  95. 3:30Actually let's put it like this because
  96. 3:31this is supposed to be the name of a
  97. 3:33Python class. So let's create it and
  98. 3:36let's paste the whole thing here. And
  99. 3:38let's also give it a read. So let's zoom
  100. 3:40in a little bit. All right. So it named
  101. 3:43it golden cross. It defined an EMA 50 by
  102. 3:47simple syntax. return TA. EMA which is
  103. 3:49the correct syntax in just for defining
  104. 3:51an indicator. Then it is passing the
  105. 3:53current candles and then it is defining
  106. 3:56the period. So perfect. It did another
  107. 3:58one for EMA 100 and then it is defining
  108. 4:00the entry rule which is should long like
  109. 4:02whether or not we should open a long
  110. 4:04position in it. It is simply saying if
  111. 4:06the current EMA 50 is bigger than EMA
  112. 4:08100. So it is detecting the moment that
  113. 4:11the crossing is happening. This is
  114. 4:13perfectly correct. And then in the
  115. 4:15golang function which is where we define
  116. 4:17the position sizing it is defining the
  117. 4:19quantity using the size to quantity
  118. 4:21utility function of Jesse. It is passing
  119. 4:24the entire available margin that we have
  120. 4:26and then the current price as the entry
  121. 4:28price and the fee of the current
  122. 4:29exchange. And to submit the buy order it
  123. 4:32simply says the quantity and then the
  124. 4:34price which is the current price. So we
  125. 4:37want to use a market order to open the
  126. 4:39position. So this is perfect. And of
  127. 4:41course for short positions it's doing
  128. 4:43the opposite. So instead of self buy it
  129. 4:45is using selfell and then you define the
  130. 4:47update position which is where we
  131. 4:50basically say if it's long position but
  132. 4:52the entry rule is now the opposite
  133. 4:54liquid the current position or vice
  134. 4:57versa for a short position. Again this
  135. 4:59is perfectly correct. It also defined
  136. 5:01the should cancel entry function which
  137. 5:03isn't really necessary in this strategy
  138. 5:06because we are using market order to
  139. 5:08open the position. If we were using a
  140. 5:10limit order or even a stop order, we
  141. 5:12would have had the question of like what
  142. 5:14should happen if the order didn't get
  143. 5:16filled and now another candle has
  144. 5:18closed. So, should we cancel it to maybe
  145. 5:21submit a new one or should we just leave
  146. 5:22it as it is? So, that's why we use this
  147. 5:25function in Jesse. But in this case,
  148. 5:27because we're using a market order, we
  149. 5:29don't need that. So, we could even
  150. 5:30remove the sync and it should still
  151. 5:32work. But I'm going to leave it be. So,
  152. 5:34let's go to the back testing page. Now,
  153. 5:36the exchange is Binance Piocial Futures.
  154. 5:38The route let's choose BTCUCT
  155. 5:41and for time frame let's use hourly and
  156. 5:45change this into test cloud 4.5 and for
  157. 5:50period could be anything really. Let's
  158. 5:52just pick since the beginning of 2025
  159. 5:55and ensure the fast mode is on and is
  160. 5:59the benchmarking. All right, so let's
  161. 6:01run the first back test. It's a perfect
  162. 6:04go. But actually, you know what? Because
  163. 6:06this was a really hard period to trade,
  164. 6:08just to make sure it is fun, let's
  165. 6:11change this into 2024. So, we could see
  166. 6:15some profitable results, right? I mean,
  167. 6:17it doesn't really matter because the
  168. 6:19point of this testing isn't that, but
  169. 6:21still, I'd like to see some positive
  170. 6:23results if possible. All right. So, this
  171. 6:25looks a lot better now. Now, it executed
  172. 6:2879 trades. It made 42% in profit. The
  173. 6:32maxon is minus almost 30%. So this is
  174. 6:34fairly okay. The venote is 34%. All
  175. 6:38right. So this is definitely a pass.
  176. 6:40Next question. Convert this pine script
  177. 6:42into Python code. Now for this next
  178. 6:44part, we need an actual pine script of
  179. 6:46trading view. Right. So let's go to it
  180. 6:48and look up the word super trend
  181. 6:52strategy. Yeah. So this one here. I
  182. 6:55should be able to get the pine script.
  183. 6:57All right. So here we go. Let's copy it.
  184. 6:59And now I should be able to paste the
  185. 7:01whole thing. Hit enter. All right. So
  186. 7:04let's copy the whole thing. Go back and
  187. 7:07paste it here. All right. So let's take
  188. 7:09a look at the code. So it define some
  189. 7:11hyperparameters. Now I don't like it
  190. 7:13when the models do this. Maybe I need to
  191. 7:15fine-tune the instructions to
  192. 7:17specifically tell them to avoid doing
  193. 7:19this because I prefer them to actually
  194. 7:21write the period of the indicators
  195. 7:22instead of trying to optimize like since
  196. 7:24the beginning. But anyways, it defined
  197. 7:26the super trend like this and this is
  198. 7:30the correct syntax dispassing the
  199. 7:32candles. The period is this which again
  200. 7:34is the syntax it is using for uh
  201. 7:36parameter optimization in Jesse. Then it
  202. 7:38defined the inter rule. So basically
  203. 7:40when the trend is one we want to go
  204. 7:43long. Now here's the thing though this
  205. 7:45isn't right because in Jesse's
  206. 7:46indicators with the super trend at least
  207. 7:48the trend value actually gives us a
  208. 7:51single value. So it's a scalar value
  209. 7:54like you know in here it will give us
  210. 7:58this line here and then we're going to
  211. 8:01know that if the current price is bigger
  212. 8:02than this it's an uptrend. If the
  213. 8:05current price is below it then it's a
  214. 8:06downtrend right? So it will give us
  215. 8:09that. It won't just give us one or minus
  216. 8:11one. So this syntax just won't work. So,
  217. 8:15actually, let's just give it a run and
  218. 8:18see if it runs or not because I know it
  219. 8:20probably won't. Okay, I think I forgot
  220. 8:23to save it.
  221. 8:24Yep. Let's run it one more time. And you
  222. 8:27see it didn't execute anything because
  223. 8:29just those rules were true. So,
  224. 8:31unfortunately, this is a fail. Next,
  225. 8:33develop a mean reversion strategy using
  226. 8:35the Ballinger bands and the RSI with the
  227. 8:37seven period. Let's copy this. Go back
  228. 8:41and change the code.
  229. 8:43Save it this time. So this is really
  230. 8:45important and let's run it. All right.
  231. 8:47So we got an error saying that the mult
  232. 8:50argument is incorrect. So let's go and
  233. 8:52see what's going on. So apparently when
  234. 8:54it defined the Ballinger bands, it also
  235. 8:56defined this which is incorrect. So
  236. 8:58let's remove this. By the way, let's
  237. 9:01also take a look at other code. So it
  238. 9:03defined the RSI with this syntax which
  239. 9:05is correct. The ATR indicator with this
  240. 9:08which is also correct. The shoot long is
  241. 9:10saying if the current price is below the
  242. 9:12lower band of the current Ballinger
  243. 9:14bands and the RSI is below 30 which is
  244. 9:18considering it an oversold situation and
  245. 9:21for shorting positions it's doing the
  246. 9:23opposite. It is indeed risking 2% perish
  247. 9:26trade using the risk to quantity utility
  248. 9:28function of Jesse. So this is also
  249. 9:30perfectly correct. And once it opens the
  250. 9:33position, it is submitting the stop loss
  251. 9:35and the track take profit using this
  252. 9:37syntax which passes the quantity of the
  253. 9:39current position and the price using the
  254. 9:42middle band. So this is perfect really.
  255. 9:45So let's just give it another run. Now
  256. 9:48while that's going, I want to quickly
  257. 9:49remind you guys about our Telegram. It's
  258. 9:51the fastest way to get notified about my
  259. 9:53future work, whether it's a new tutorial
  260. 9:55or a tool that I create. Also, don't
  261. 9:57forget to check out our free Discord
  262. 9:58where more than 5,000 members like you
  263. 10:00and I are hanging out there and helping
  264. 10:02out each other with algo trading so we
  265. 10:04can all succeed together. The links for
  266. 10:06both are down in the description. And
  267. 10:08there we go. So, it executed
  268. 10:09successfully. Now, the problem is it is
  269. 10:12executing too many trades. So, that's
  270. 10:14why it is losing a lot because we are
  271. 10:16paying a lot of money in trading fees.
  272. 10:18But otherwise, it just went fine and I'm
  273. 10:21going to give it a pass. But because it
  274. 10:22made one mistake, I'm going to give it a
  275. 10:249 out of 10. Next, write a strategy that
  276. 10:27uses Fibonacci retracement levels for
  277. 10:29entry and exit points. All right, let's
  278. 10:32copy the code and give it a read. All
  279. 10:34right, so it defined the swing high as
  280. 10:36this return MP.max. So the maximum value
  281. 10:40of the last 50 candles and then it is
  282. 10:43selecting the high value of every single
  283. 10:46one of them. So this is perfect. And
  284. 10:47then for swing low, it did the opposite.
  285. 10:50So it is using MP.min and then it is
  286. 10:54selecting the low value of the candles
  287. 10:57and then it define the fib levels with
  288. 10:59this syntax. So the diff equals swing
  289. 11:01high minus swing low and then it's
  290. 11:03returning a dictionary with the level
  291. 11:06value. So this is perfect. It's also
  292. 11:09very simple to read. I like it. And then
  293. 11:11for the trend, it's using the EMA is
  294. 11:14saying whether or not the current price
  295. 11:16is above or below the EMA to return one
  296. 11:19for an uptrend and minus one for a
  297. 11:21downtrend. So this is also great for
  298. 11:23shoot long. It is saying if it's not an
  299. 11:26uptrend return. Okay, so that's cool.
  300. 11:28Now assuming it is, it's saying if the
  301. 11:31price is near 61 or 78 Fibonacci levels,
  302. 11:36we want to go into a long position. So I
  303. 11:38love what it did here. This is really
  304. 11:41good. And then for a short position,
  305. 11:43it's doing the opposite. It defined the
  306. 11:45position sizing and it is submitting the
  307. 11:48stop loss and take profit again using
  308. 11:50fib levels. So this is also correct. All
  309. 11:54right. So I think it nailed this
  310. 11:55question overall. So let's go and run
  311. 11:58it. And it does. It's executed a fairly
  312. 12:01good number of trades actually. So this
  313. 12:03was really really good. Like one of the
  314. 12:05best I've ever seen. The next question
  315. 12:08is update my code to display the values
  316. 12:11of important indicators of my strategy
  317. 12:13in back test for debugging purposes. So
  318. 12:16basically we wanted to update an already
  319. 12:18existing strategy and we needed to show
  320. 12:21us some charts for it. Now there is a
  321. 12:23specific syntax for this in Jesse. So we
  322. 12:25just need the model to understand that
  323. 12:28syntax and use it correctly. Now to feed
  324. 12:30it a strategy I'm going to get it from
  325. 12:31our website the strategies page. So this
  326. 12:34one is called temo trend following. So
  327. 12:37let's click here and here to copy the
  328. 12:39code of it and paste it here. Now I'm
  329. 12:42going to remove these because this is
  330. 12:44exactly what we want the model to give
  331. 12:46us. So let's just remove it to make sure
  332. 12:48it won't cheat and hit enter and see
  333. 12:51what it gives us. All right, let's copy
  334. 12:54the whole thing, paste it here, save it.
  335. 12:57All right, so this is exactly what I was
  336. 12:58hoping it would give me. It defined the
  337. 13:00after function and it is using the add
  338. 13:02line to candle chart syntax to add the
  339. 13:06values of the tema indicator to the
  340. 13:08current candle chart which I will show
  341. 13:10you in a second and then it defined the
  342. 13:13another chart using the add extra line
  343. 13:15chart. So you define a new chart because
  344. 13:18the values for the ADX which is an
  345. 13:20oscillator. So it's going to be between
  346. 13:231 to 100 it's going to differ from the
  347. 13:26values of TMA indicator right. So for
  348. 13:28BTC this could be in like 100,000 but
  349. 13:31this one is going to be between 0 and
  350. 13:33100. So we needed another chart and it
  351. 13:36did the same is for CMO. So this seems
  352. 13:39perfectly fine. Let's just go and run
  353. 13:41it. Now this error we're getting is
  354. 13:43because the strategy is using the 4our
  355. 13:45time frame but we didn't define the data
  356. 13:48route for it in our back test. But in
  357. 13:50the when you run the back test with JC
  358. 13:52it is smart enough to take care of it
  359. 13:53behind the scene but it will still let
  360. 13:56you know about it because when you're
  361. 13:58live trading the same strategy you need
  362. 13:59to ensure those routes exist otherwise
  363. 14:01you will face an issue. All right so it
  364. 14:04went just fine but I forgot to enable
  365. 14:07the interactive chart so we can actually
  366. 14:09see those charts. So let's run it one
  367. 14:11more time. And now if I click here,
  368. 14:14here's the chart.
  369. 14:17And you see not only we have the
  370. 14:19candles, we also have the demo values
  371. 14:21which are these blue, green and red
  372. 14:24line. So we can see for example when it
  373. 14:26took this trade were the values
  374. 14:28correctly in line or not. And then we
  375. 14:31have the values of CMO and the ADX. It
  376. 14:34also define the thresholds. The same
  377. 14:37goes for here. So we have the long level
  378. 14:39and the short level for CMO and we can
  379. 14:41see whether or not the value of it is
  380. 14:42above these threshold. So this is
  381. 14:45perfect. So this is another 10. Next
  382. 14:47write a trend following strategy that
  383. 14:49uses 50 minutes time frame for entry and
  384. 14:514hour time frame for confirmation. It
  385. 14:53named it trend following 50 minutes.
  386. 14:56That is okay. Define the 4our time frame
  387. 14:59using the get candles method of Jesse.
  388. 15:02When we use this, we need to pass the
  389. 15:04name of the current exchange, the name
  390. 15:06of the current or whichever symbol we
  391. 15:07want and then the time frame for that it
  392. 15:10hardcoded four hours. So this is
  393. 15:12perfectly correct because when it
  394. 15:13defines it as a property like this, we
  395. 15:16are able to use it in multiple points in
  396. 15:18our strategy. So I really like this
  397. 15:20syntax. Then it defined the EMA fast,
  398. 15:23EMA slow, the big trend. So for big
  399. 15:26trend it is using the bigger time frame
  400. 15:29candle. So this is perfectly correct. If
  401. 15:32it's an uptrend, it's just returning
  402. 15:33one. If it's a downtrend, it returns a
  403. 15:36minus one. And then it define the ADX,
  404. 15:38the ATR, and the shoot long. So it's
  405. 15:42checking for the trend, the ADX, and
  406. 15:45whether or not the fast is bigger than
  407. 15:47the slow. Once the position is open, it
  408. 15:49is submitting the stop loss and take
  409. 15:51profit using the ATR indicator. So this
  410. 15:54might be actually a good profitable
  411. 15:57strategy. So let's give it a try. But
  412. 16:00you know what? I'm going to disable this
  413. 16:02interactive chart now because the back
  414. 16:04test will go a little bit faster when it
  415. 16:06is off. All right. So, this is
  416. 16:08profitable. It's not that bad. Of
  417. 16:10course, it's not beating the market
  418. 16:11because we didn't really work on the
  419. 16:12strategy, but the win rate is also
  420. 16:14acceptable. The sharp is also
  421. 16:16acceptable. So, yeah, this is perfectly
  422. 16:18a pass. Now, next, we're saying here's
  423. 16:20the code for my current trend following
  424. 16:22strategy in the 15 minutes time frame.
  425. 16:24the strategy is losing money because it
  426. 16:26is taking too many trades and there are
  427. 16:28too many false breakouts during the
  428. 16:30ranging markets. Please improve the
  429. 16:31strategy. So I'm talking about the
  430. 16:33strategy that we just back tested but
  431. 16:36you know in the period that we selected
  432. 16:38it isn't actually losing money but I'm
  433. 16:40guessing that is because in the code it
  434. 16:43was smart enough in the first place to
  435. 16:45use the ADX indicator right. So if that
  436. 16:47wasn't the case I believe it would have
  437. 16:49lost money. So, you know what? Let's
  438. 16:51just go back and remove that single line
  439. 16:53cuz I want to see if it is able to
  440. 16:56improve the result or not. So, let's
  441. 16:58just remove this one and this one. All
  442. 17:00right. So, no more checking for the ADX
  443. 17:03because it is actually the best defense
  444. 17:06against a ranging market. So, this is
  445. 17:08good. Now, let's go back and run it one
  446. 17:10more time. There we go. So, you see now
  447. 17:12it's almost losing money because it is
  448. 17:14taking too many trades. Now again it's
  449. 17:16still is losing my almost losing money
  450. 17:19because the result are still good. So
  451. 17:21anyways let's just go back and copy the
  452. 17:24whole code and here I'm going to paste
  453. 17:26it in and we're going to see what the
  454. 17:29obvious version is going to be. All
  455. 17:30right let's copy it. Actually let's read
  456. 17:33what it did. So it added the ADX filter
  457. 17:35so it only trades when the ADX is above
  458. 17:3725 which is what it did in the first
  459. 17:39place. It also added the choppiness
  460. 17:41index which is also another great
  461. 17:43indicator against a ranging market. So
  462. 17:46it avoids choppy or sideway markets when
  463. 17:48it's below 50. Yes, that is perfectly
  464. 17:50correct. It added the Ballinger bands
  465. 17:53with again a really good one because it
  466. 17:55measures like what's the strength of the
  467. 17:58current wave or or price action that we
  468. 18:02are in. And we want it to be above
  469. 18:03three. So basically when this is really
  470. 18:05low like below three, it's like the
  471. 18:07market doesn't even know where it wants
  472. 18:08to go. Like the changes are really
  473. 18:10small. It is also waiting a little bit
  474. 18:12between the trades to not take too many
  475. 18:15trades and it is exiting on a weak
  476. 18:18trend. So it liquidate the position when
  477. 18:20the ADX drops below 20. So these are
  478. 18:22really great. Let's go and update our
  479. 18:26code and re-execute it. So yeah, it
  480. 18:30definitely improved. So it is now taking
  481. 18:34124 instead of like 400 or something. It
  482. 18:37is also making more. The max rodon is
  483. 18:39lower. The win rate is also better and
  484. 18:43the sharp is also acceptable. But it
  485. 18:45isn't as good as like the first version
  486. 18:47that it wrote. But it doesn't matter
  487. 18:49because still the version that I fed the
  488. 18:51model I specifically asked that like
  489. 18:54avoid ranging markets and it added
  490. 18:56multiple filters to do just that. So it
  491. 18:59was really good. Next, develop a
  492. 19:02strategy that combines the Williams
  493. 19:03percentage R, MACD, and Ballinger bands.
  494. 19:06Okay, so it defined the Williams R
  495. 19:08percentage with this syntax, which is
  496. 19:10perfectly correct. Defined the MACD with
  497. 19:12TA MACD is also correct. The Ballinger
  498. 19:16bands, it named it BB, which I really
  499. 19:19like. Then it defined the ATR. uh for in
  500. 19:22rules of the strategy is saying open a
  501. 19:24long position if the volume's percentage
  502. 19:27r is below minus 80 and the maxis h
  503. 19:31value is bigger than zero and the
  504. 19:33current price is below the ballinger
  505. 19:35bands but it is multiplying it by 1% so
  506. 19:40why is it doing that all right so it
  507. 19:42wants to make sure we are near the lower
  508. 19:45band not like right next to it so this
  509. 19:49is interesting I don't how I feel about
  510. 19:51it. I It's not exactly what I asked it
  511. 19:54to do, but it is interesting
  512. 19:56nonetheless. Let's see if there's any
  513. 19:58explanation about this. Well, no, there
  514. 20:00isn't. All right, let's go and run it.
  515. 20:04There we go. It runs just fine. It
  516. 20:08didn't make any profit. The max is minus
  517. 20:1015. So, this is good enough and it's
  518. 20:13definitely a pass.
  519. 20:15Next, write the entry functions of the
  520. 20:17strategy for me in a way that it should
  521. 20:19use two limit orders for opening the
  522. 20:21position and it should only risk 2% of
  523. 20:24capital per trade. So, in this test,
  524. 20:27what I want the model to do is to just
  525. 20:29give me two functions. I don't want it
  526. 20:31to write two whole strategies because
  527. 20:33some models, they're good, but they
  528. 20:35overdo stuff like you ask them to write
  529. 20:38a function and they give you a hold of
  530. 20:39strategy and I just don't like that. So,
  531. 20:42let's see how this one does. There we
  532. 20:44go. So it actually gave me just a
  533. 20:46function the entry function with the
  534. 20:48correct syntax in Jesse. It defined two
  535. 20:51entry prices using ATR
  536. 20:55and then it defined the surplus. It does
  537. 20:57know the correct syntax in Jesse for
  538. 21:00submitting multiple entry orders which
  539. 21:02is you know you define a list instead of
  540. 21:04just giving the quantity and a price. So
  541. 21:07this is perfect. It gave us the short
  542. 21:09version of it. All right. So this is
  543. 21:11definitely a pass.
  544. 21:14And last but not least, write a pair
  545. 21:16trading strategy for ETH and BTC. So for
  546. 21:20this one, it's going to be a bit more
  547. 21:22complicated because it needs to write
  548. 21:24two strategy classes. And the way P
  549. 21:27trading strategy works is that one of
  550. 21:29them goes long while the other one goes
  551. 21:31short. Now, if this is confusing to you,
  552. 21:34watch one of my previous videos called
  553. 21:35Praing Strategy from Scratch in Python
  554. 21:38where I explain everything including the
  555. 21:40math behind it from scratch. All right,
  556. 21:43so here's the leading strategy. So,
  557. 21:45let's copy the name of it and go to
  558. 21:48Jesse and paste it in. I will name it
  559. 21:53cloud 45 and then whatever name it gave
  560. 21:56me. Let's copy the whole thing. All
  561. 21:58right. So you see it defined the BTC
  562. 22:01returns. So it's using the prices of the
  563. 22:03BTC prices but using the prices to
  564. 22:06returns utility function of Jesse. It is
  565. 22:08converting them into returns. It's doing
  566. 22:10the same thing for ETH. So yes in Jessie
  567. 22:12you have access to prices of other
  568. 22:15trading routes from one single class. So
  569. 22:18it's really cool. It define the Z score.
  570. 22:21Again if this is confusing to you just
  571. 22:24watch my previous video about pair
  572. 22:26trading if that's what you're interested
  573. 22:27about. But what I'm curious about is if
  574. 22:30it knows how to communicate between
  575. 22:33multiple trading strategies of Jesse.
  576. 22:35So, and it does because it's using the
  577. 22:37shared wires property which is exactly
  578. 22:39how you're supposed to do it. This seems
  579. 22:41perfectly fine. So, let's go back and
  580. 22:43see the following strategy which is
  581. 22:45supposed to be for ETH. So, for this
  582. 22:47one, it's define the entry and exit
  583. 22:50functions and in them it is simply
  584. 22:53reading from shared VS. So for example,
  585. 22:55if position is supposed to be one, we're
  586. 22:57going to go long on this. If it's minus
  587. 23:00one, we're going to go short on it. And
  588. 23:02then in here, if it's supposed to be
  589. 23:03closed and we do have a open position,
  590. 23:05it will just liquidate it. So this is
  591. 23:07perfectly great. Let's just copy the
  592. 23:09whole thing and create another one. So
  593. 23:12I'm going to name it Claude 45
  594. 23:15follower and paste it here. So let's go
  595. 23:18here and choose claude 44 BTC ETH pair.
  596. 23:24Let's add another one for ETH.
  597. 23:29Change the time frame to hourly to be
  598. 23:31the same as this. And then claude 4.5
  599. 23:36follower. Now we need to disable the
  600. 23:38fast mode or otherwise we'll get an
  601. 23:40error. Now let's just run it and see how
  602. 23:42it goes. There we go. So you see these
  603. 23:45are the prices of BTC and ETH and you
  604. 23:48can see they are correlated and
  605. 23:51configurated together which means like
  606. 23:54the cases where the price of ETH is
  607. 23:56higher than BTC. So for example if we
  608. 23:58were to short ETH here and long BTC like
  609. 24:02at this point it would have been vice
  610. 24:03versa. So we would have been sitting on
  611. 24:04a profit or in here we could have done
  612. 24:07the other way around. So we could have
  613. 24:09longed ETH and went short on BTC and
  614. 24:13then at this point it would have been
  615. 24:15the other way around. So we would have
  616. 24:17been sitting on a profit. So the logic
  617. 24:19of the strategy makes sense. But you got
  618. 24:21to be careful not to take too many
  619. 24:23trades and that's exactly what it's
  620. 24:24doing here. So it took way too many
  621. 24:26trades. It's paying way too much for
  622. 24:29trading fees. So in fact if we added
  623. 24:31this to this number here we would have
  624. 24:33been on a profit already. Right? But
  625. 24:36since trading fees are a fact of
  626. 24:38trading, so we just need to keep working
  627. 24:41on the strategy. But nonetheless, it is
  628. 24:44working and it is definitely a pass. So
  629. 24:48there you go guys, here's the final
  630. 24:50score. 89 out of 100. So in this
  631. 24:53question, it got a nine. In this one, it
  632. 24:56got a zero. So that's just it. And the
  633. 24:59result that we seeing here is beating
  634. 25:02Cloud 4. So it definitely had some
  635. 25:04improvements. But if we compare it to
  636. 25:06GPD5 mini that's I did a while ago. It's
  637. 25:10not beating that one because that one
  638. 25:12got 100 out of 100. So it was perfect
  639. 25:15score with every question. But this one
  640. 25:17isn't beating that. But I wouldn't say
  641. 25:20that GPT5 mini for example is a better
  642. 25:22model than this because it depends on
  643. 25:24what you're doing. So in oneshot
  644. 25:26questions like this yet GPD5 is beating
  645. 25:29this but when it comes to actual coding
  646. 25:31or debugging my experience during the
  647. 25:35past months has been that the cloud is
  648. 25:37still a better model but when it comes
  649. 25:39to debugging something really complex
  650. 25:42GP5 beats clot. So that was my
  651. 25:44experience. Now, this one, here's the
  652. 25:47result of it oneshotting the questions.
  653. 25:49But when it comes to like iterating over
  654. 25:52them, we don't know yet until we give it
  655. 25:55some try. But overall, it seems like a
  656. 25:58good model, and I'm happy that they gave
  657. 26:00us this upgrade. Now, I hope you enjoyed
  658. 26:02this video. If you did, please make sure
  659. 26:04to give it a like and subscribe to the
  660. 26:06channel for more videos like this. Thank
  661. 26:08you so much for watching. I'll see you
  662. 26:10in the next one. Now what does CL

About this transcript

This page contains the full transcript of Claude 4.5 tested: Is it Good for algo-trading strategies? by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 4,909 words across 662 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.