YouTube2Text

GLM 5.3 + MCP: Mean Reversion Crude Oil strategy with a 2.93 Sharpe — Transcript

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

Full transcript

  1. 0:00ZAI just released GLM 5.3 and now we
  2. 0:04have a new frontier coding model which
  3. 0:06is open source. Now if you remember GLM
  4. 0:085.2, even though it wasn't beating all
  5. 0:11the other models out there, the result
  6. 0:13of it was great. So because of that, I
  7. 0:15actually do trust the benchmark results
  8. 0:18that they are publishing here. And look
  9. 0:19at this jump. In one of them it went
  10. 0:21from 4.6 up to 28.3
  11. 0:25and it is even beating Kimmy K3 which is
  12. 0:28a great model. Now in some of them it's
  13. 0:30not still Fable 5 or GPT 5.6 so, but it
  14. 0:34is doing that in some others such as
  15. 0:36this one and this one and in this one.
  16. 0:38So again, this is really great guys. And
  17. 0:41reading the numbers here, we can see in
  18. 0:43most of them it is beating them which is
  19. 0:45crazy that an open source model is doing
  20. 0:48this. But you know how it is on this
  21. 0:49channel. I don't just care about the
  22. 0:51benchmark numbers. I actually want the
  23. 0:52model to write me trading strategies in
  24. 0:55Python and then run backtests on them,
  25. 0:57rule testing, optimization and even
  26. 0:59Monte Carlo so we can ensure the results
  27. 1:01that we're getting aren't overfit. Now
  28. 1:03we're going to need two setups. For the
  29. 1:04Python side of things and also for it to
  30. 1:08expose an MCP which we can use to hook
  31. 1:10the agent into it, we're going to use
  32. 1:12the Jesse framework which allows us to
  33. 1:15write the code in Python and do
  34. 1:16research. It also exposes an MCP which
  35. 1:18we're going to use here. And next you're
  36. 1:20going to need a GLM coding plan in order
  37. 1:23to run the model and get the tokens. And
  38. 1:26I subscribe to the light plan which
  39. 1:29costs $18 per month and it's more than
  40. 1:32enough for this experiment that I'm
  41. 1:33doing. Now for the harness side of
  42. 1:35things, I'm using open code which is a
  43. 1:37great harness. It has support for both
  44. 1:40terminal and they also have desktop app
  45. 1:43at this point. So this is a great
  46. 1:45harness and I highly recommend it. Now
  47. 1:47in order to run Jesse itself, now that I
  48. 1:49am inside my Jesse project, all I need
  49. 1:51to do is to run the Jesse run command
  50. 1:54and my conda environment is already
  51. 1:57activated and this is the one that
  52. 1:59actually has Jesse installed in it. So,
  53. 2:01let's hit enter and once it is running,
  54. 2:03we're going to get the address for the
  55. 2:04MCP server. So, here it is. So, let's
  56. 2:07copy it. And next, in order to run the
  57. 2:09GLM model, I want to use the open code
  58. 2:13harness. Now, the choices are actually
  59. 2:15endless. We could have been using codex,
  60. 2:18cloud code, we could have used it
  61. 2:20directly inside as an agent like this or
  62. 2:23many other choices that are out there
  63. 2:25these days. However, I have found open
  64. 2:27code to be one of the best ones,
  65. 2:28especially with local models. In this
  66. 2:31case, we're not using a local model, but
  67. 2:32still I think it's going to be a really
  68. 2:34good choice. So, let's run open code.
  69. 2:37Now, if I hit enter, it's going to run
  70. 2:39open code, but first I need to add the
  71. 2:41Jesse MCP to it. So, I'm going to say
  72. 2:43open code MCP add. Let's hit enter.
  73. 2:47Next, it is asking whether we want to
  74. 2:49add it just for the current project or
  75. 2:51globally. And in this case, because this
  76. 2:53is my Jesse project, I actually want it
  77. 2:55to be here. So, let's hit enter. Let's
  78. 2:57give it a name. So, we're going to call
  79. 2:59it Jesse and then select MCP server
  80. 3:01type. We're going to choose remote and
  81. 3:04then I'm going to paste in the address
  82. 3:06that we just copied earlier. There we
  83. 3:08go. Does the server require or auth? No,
  84. 3:10it does not. And that's it. So, now if I
  85. 3:13run the open code command, I should have
  86. 3:15access to that MCP server now. All
  87. 3:17right. So, you can see that I've already
  88. 3:19selected GLM 5.3
  89. 3:21where the ZAI provider. Now, adding it
  90. 3:24is actually surprisingly easy. So, you
  91. 3:26just write this /models and then in
  92. 3:30order to connect the provider, you press
  93. 3:32control and A and then you pick ZAI. It
  94. 3:35is super easy. So, let's just skip this.
  95. 3:38All right. So, let's check to ensure we
  96. 3:40have Jesse MCP. So, let's see. All
  97. 3:43right. So, among my MCPs, I can see
  98. 3:45Jesse is already connected. So, that's
  99. 3:47great. Let's also ask it if it has
  100. 3:49access to it or not. Hey there, do you
  101. 3:51have access to GSM CP? All right, so it
  102. 3:53did not write this part correctly. All
  103. 3:55right, let's see what it says. By the
  104. 3:57way, the UI of Open Code is absolutely
  105. 4:00gorgeous. All right, so it says, "Yes, I
  106. 4:02do. The GSM CP tools are all connected."
  107. 4:05So, this is awesome and now we can give
  108. 4:07it the actual prompt. Hey there,
  109. 4:09research and find a mean reversion
  110. 4:11strategy for trading crude oil on
  111. 4:14Binance Futures, which has a symbol of
  112. 4:16CL-USDT.
  113. 4:18I need the results to be good from the
  114. 4:20beginning of May 2026 until the end of
  115. 4:23July. By good, I mean a Sharpe ratio of
  116. 4:26at least 1.5. Risk 3% of the account on
  117. 4:29each trade. Every time you develop a
  118. 4:31strategy, validate the results using a
  119. 4:33statistical significance test before
  120. 4:35writing the full strategy. Only proceed
  121. 4:37if the strategy's metrics demonstrate
  122. 4:39genuine statistical significance. Use
  123. 4:41optimization to improve the results. At
  124. 4:43the end, apply Monte Carlo simulations
  125. 4:45to ensure the results are not overfit.
  126. 4:47Continue until you find a strategies
  127. 4:49that fully meet the pre-specified
  128. 4:51criteria. Use the 15-minute or 30-minute
  129. 4:53time frame for trading side and hourly
  130. 4:56as the anchor time frame. Do not prompt
  131. 4:58me in the meanwhile. Good luck. Now,
  132. 5:00while that's going, I want to quickly
  133. 5:01remind you guys about our Telegram. It's
  134. 5:03the fastest way to get notified about my
  135. 5:05future work, whether it's a new tutorial
  136. 5:08or a tool that I create. Also, don't
  137. 5:09forget to check out our free Discord
  138. 5:11where more than 5,000 members like you
  139. 5:13and I are hanging out there and helping
  140. 5:15out each other with algo trading so we
  141. 5:16can all succeed together. The links for
  142. 5:18both are down in the description. All
  143. 5:20right, so it started working and the
  144. 5:23speed is also pretty fine. It defined a
  145. 5:25plan all by itself so it would know how
  146. 5:28to proceed. And it also it started
  147. 5:30writing the first version of the
  148. 5:32strategy. Now, one thing I really like
  149. 5:33about this release of GLM is that it is
  150. 5:36actually pretty fast. I find it to be
  151. 5:38significantly faster than the Chinchilla
  152. 5:41model, which was released just a while
  153. 5:43ago and it had fantastic performance,
  154. 5:45but it wasn't exactly the fastest model.
  155. 5:47The GLM model used to be so slow in the
  156. 5:50past that after trying, I believe GLM 5,
  157. 5:53I completely gave up and never gave it
  158. 5:55another shot again. But now I'm happily
  159. 5:58surprised. So, while this is going, I
  160. 6:00want to explain something, guys. So, you
  161. 6:02notice in the prompt that we gave the
  162. 6:04model, I said that I want the result to
  163. 6:08be good since the beginning of the May
  164. 6:112026 until the end of July. So, that is
  165. 6:14approximately 3 months. And 3 months
  166. 6:17isn't actually enough for testing a
  167. 6:20strategy. So, I never do this. But
  168. 6:22there's a reason why I'm doing this. So,
  169. 6:24let me show you the chart of crude oil
  170. 6:26on Binance Futures. So, here it is. And
  171. 6:29if you take a look, you can see that the
  172. 6:32earliest date is for the beginning of
  173. 6:34April. So, that means this is all the
  174. 6:37data that we have. And if I even check
  175. 6:39out other exchanges, you will see that
  176. 6:41the same goes there. So, there's a real
  177. 6:43problem here. And that is because all of
  178. 6:45these real-world assets were added to
  179. 6:48crypto exchanges approximately the same
  180. 6:51date. And for some reason, all the
  181. 6:52exchanges added at the same time. I
  182. 6:54don't know why. But the point is
  183. 6:56currently, we do not have access to more
  184. 6:58data. At least not yet. Because you see,
  185. 7:01if you check out the roadmap page of
  186. 7:03Jesse's website, you can see that we
  187. 7:05have this item here, which has a pretty
  188. 7:08good amount of votes. And it is
  189. 7:10specifically says adding historical
  190. 7:12stock, forex, and commodity data
  191. 7:14integrations. And when I say that, that
  192. 7:16means we're going to add third-party
  193. 7:18market data providers. So, Jesse can
  194. 7:20access years of high-quality historical
  195. 7:22data for stock, forex, and commodity.
  196. 7:24So, once we do this, we're going to have
  197. 7:26years of data to actually run useful
  198. 7:29back tests. Now, you might be asking,
  199. 7:31"Okay, so then what's the point of doing
  200. 7:32this in the first place?" Well, the
  201. 7:34thing is because of the fundamental news
  202. 7:36that is going on out there, I find
  203. 7:38myself wanting to trade on exchanges
  204. 7:41such as lightyear, which offer contracts
  205. 7:44for crude oil. And whenever I trade
  206. 7:46manually, I always end up getting
  207. 7:49burned. So, just so that I won't be able
  208. 7:51to do this, I wanted to develop a
  209. 7:53strategy just so at least I could trade
  210. 7:55it with a bot because this way I know
  211. 7:58that my position sizing is going to be
  212. 8:00calculated, and that emotions are not
  213. 8:02going to be a part of my trading. So,
  214. 8:04that's why I decided to develop this
  215. 8:05strategy, and I want it to be mean
  216. 8:07reversion because I believe right now
  217. 8:09we're going to be in a range for crude
  218. 8:11oil because of the news that's going on.
  219. 8:13Like, whenever the price goes up, Trump
  220. 8:16says something just to bring down the
  221. 8:18price. And whenever it comes down so
  222. 8:20much, then like Iran does something, and
  223. 8:23then the price goes up. So, the point is
  224. 8:25I believe we're in a range. I don't
  225. 8:26think the price is going to go up maybe
  226. 8:30until at least there is some sort of big
  227. 8:32news in the Middle East. And I don't
  228. 8:34think it's going to come down that much,
  229. 8:36either. So, I think this we're going to
  230. 8:37be stuck in this situation for a few
  231. 8:39months, at least. So, I wanted to take
  232. 8:41advantage of this situation in my
  233. 8:44trading results. The results are here,
  234. 8:46and it did find what I was looking for.
  235. 8:49So, we got a Sharpe ratio of 2.93 for
  236. 8:51the backtest, which is significantly
  237. 8:53better than what I asked for, which was
  238. 8:55a Sharpe ratio of 1.5. But before I show
  239. 8:58you the results, let me show you how
  240. 8:59much token we spent. So, this is the
  241. 9:01ending result. I got this 20 bucks
  242. 9:04coding plan just for this video, and I
  243. 9:07spent almost half my weekly tokens on
  244. 9:10it. And it did a lot of research with
  245. 9:12this. So, I want to say that this plan
  246. 9:15is definitely worth it because the whole
  247. 9:17step I got was indeed frontier, and the
  248. 9:20fact that you can run this many tokens
  249. 9:22with a $20 account is just crazy. I
  250. 9:25mean, compare this to Cloud Code, and
  251. 9:27you'll see what I mean. Because we got a
  252. 9:29quality that is as good as Cloud Fable,
  253. 9:31but we paid $20 for it, which is not
  254. 9:34even available with the $20 Cloud
  255. 9:36account. So, anyways, let's go through
  256. 9:38the result. Now, here's what it printed
  257. 9:40out for me and I couldn't click on them.
  258. 9:43It was a bit annoying, so I just asked
  259. 9:45it to print them one at a line. So,
  260. 9:48let's click on this. So, this here's the
  261. 9:49back test, two Monte Carlo and one
  262. 9:51significance test. So, let's click on
  263. 9:54them. Now, before I show you the result,
  264. 9:56there was one weird thing going on and
  265. 9:59that is it printed out two different
  266. 10:01Monte Carlo results. So, I asked it
  267. 10:02what's going on and which one is the one
  268. 10:05that you had before and it said neither.
  269. 10:07So, in fact, this is the one that we
  270. 10:09usually had. So, that is the one week
  271. 10:12block. So, let's also click on this. All
  272. 10:15right. So, let's begin with the rule
  273. 10:17significance test. As you can see, the
  274. 10:19return of the strategy is beating the
  275. 10:21simulations by huge margin and that is a
  276. 10:24good sign. And the P value is 0.01,
  277. 10:28which means the entry rules of the
  278. 10:29strategy have statistical significance.
  279. 10:32So, that's good. The annualized return
  280. 10:34is 131.
  281. 10:36So, this definitely has potential. So,
  282. 10:39this test is passing. Let's take a look
  283. 10:41at the back test. Here's the equity
  284. 10:42curve. So, we can clearly see it's going
  285. 10:44up while the price was actually going
  286. 10:47down for most of the time. Let's look at
  287. 10:49the drawdown chart. So, this is how it
  288. 10:52looks like. Basically, when the price
  289. 10:54was going down, the strategy did really
  290. 10:56great. When it was going up again, at
  291. 10:59first it lost and then it started
  292. 11:01earning again. So, you should kind of
  293. 11:03say that when there is a pivot point in
  294. 11:05the price, the strategy doesn't do well
  295. 11:08and here is the monthly return. So, we
  296. 11:10had two positive months following by one
  297. 11:12negative month, but the negative wasn't
  298. 11:14big. So, looks great so far. The profit
  299. 11:17is 16%. The max drawdown is minus 5.59%,
  300. 11:22which is really low, which means we can
  301. 11:24easily add to the size of the position
  302. 11:26to increase this P&L number here. The
  303. 11:28average win to loss ratio is 0.73.
  304. 11:32The win rate is 70%. So, this is pretty
  305. 11:35typical for a mean reversion strategy.
  306. 11:37The sharp ratio is 2.93, which is not
  307. 11:40It's awesome. The average trades per
  308. 11:43month is 11. Per week, it's two. And per
  309. 11:47day, it is 0.37. All right. So, overall,
  310. 11:49I'm seeing things that I really like.
  311. 11:51But, take this with a grain of salt
  312. 11:53because we're just running the back test
  313. 11:55on 3 months of data. And that just isn't
  314. 11:59a good amount for a back test to have
  315. 12:01real significance. But, moving on with
  316. 12:04Monte Carlo, these are the results that
  317. 12:06we can see. And you see, it starts to
  318. 12:08get better. So, this is the one that we
  319. 12:11usually run, which is with the one-week
  320. 12:13block. And looking at the last one, this
  321. 12:16is the one with three-week block. And
  322. 12:18with this one, it is definitely passing.
  323. 12:20Like, this equity curve looks really
  324. 12:22great. It's in the middle of
  325. 12:24simulations. And the sharp ratio of the
  326. 12:26original back test is 2.72,
  327. 12:28while the best 5% is 4.15. The median is
  328. 12:320.75.
  329. 12:34So, this value is almost in the middle,
  330. 12:36which is really great and what I like to
  331. 12:37see. And even the median itself is
  332. 12:39positive. So, these are all good signs.
  333. 12:42There is a catch here. And that is the
  334. 12:44model did something weird. Now, before I
  335. 12:46show it to you and explain it, I want to
  336. 12:48say that I'm not disappointed in the
  337. 12:50model because the bar that I set for the
  338. 12:52model was pretty high. So, I asked for a
  339. 12:55mean reversion strategy, which is really
  340. 12:57difficult to pull off, especially when
  341. 12:59the amount of data that we have is
  342. 13:00limited. But, the catch is this. In
  343. 13:02order to meet the criteria that I set
  344. 13:05for it for Monte Carlo test, it tried to
  345. 13:08change the configurations of it. And by
  346. 13:10the way, let me show it to you what I
  347. 13:12mean by that. So, here's a form for a
  348. 13:14Monte Carlo on Jesse's dashboard. And
  349. 13:16right down here, you can see we have
  350. 13:19this configuration for the pipeline
  351. 13:21type, and it is set to moving block
  352. 13:23bootstrap. And the batch size is 17 days
  353. 13:26by default. Now, this is actually not
  354. 13:29the default value. It's what the model
  355. 13:31changed. So, the default value is 7
  356. 13:33days, and that's my point. That in order
  357. 13:36for the result to meet the criteria that
  358. 13:38I set for the model, it changed the
  359. 13:40parameter of the Monte Carlo test
  360. 13:43itself. So, this is kind of like running
  361. 13:46too much optimization for a strategy
  362. 13:48until you get good results. And the
  363. 13:50point of running Monte Carlo is to
  364. 13:53prevent that because we don't want the
  365. 13:56strategy to be overfit, right? In order
  366. 13:58to do that, you have to pick a set of
  367. 13:59parameters and just stick with it. So,
  368. 14:01if you were to just keep changing
  369. 14:03everything, including the Monte Carlo
  370. 14:05itself, until we get the results that we
  371. 14:07want to see, it's not going to play out
  372. 14:09right. So, that's what I did, and when I
  373. 14:11did that, we got this result that looks
  374. 14:13good. But before doing it, this was the
  375. 14:16actual result that we were getting. Now,
  376. 14:18it's not horrible, okay? So, it's still
  377. 14:20the Sharpe ratio of the original
  378. 14:21backtest is below the best 5%, but what
  379. 14:25is alarming to me is that not only this
  380. 14:28number has a lot of difference until the
  381. 14:30median number, but also the fact that
  382. 14:32the median itself is negative. So, it's
  383. 14:34not even positive. So, if this was the
  384. 14:37test that we were judging the strategy
  385. 14:39based on, which it should be, then I
  386. 14:41would say that it is not passing the
  387. 14:43Monte Carlo. So, the model kind of did
  388. 14:45something tricky, and I'm not sure if
  389. 14:47it's cool, but on the other hand, I did
  390. 14:49not ask it inside the prompt to not do
  391. 14:51this. I could have said, "Hey, stick to
  392. 14:53the inputs of the the default Monte
  393. 14:56Carlo values." And also, again, the bars
  394. 14:58we set for the model were pretty high,
  395. 15:00like higher than what I gave to other
  396. 15:02models. So, I'm not disappointed in it.
  397. 15:04Now, to be fair, all I was expecting
  398. 15:06from this strategy was a replacement for
  399. 15:09my manual trading, right? I said it
  400. 15:11before starting this whole process that
  401. 15:143 months isn't enough, and that we're
  402. 15:16going to come back to this once we have
  403. 15:18more historical data, which is exactly
  404. 15:20what this item of Jesse's road map is
  405. 15:23promising to do. But, before we move on,
  406. 15:26let's actually take a look at the code
  407. 15:28that the agent wrote, and also the
  408. 15:30trades that it took. So, let me ask it
  409. 15:32to add charts to the strategy and run
  410. 15:37the backtest again. So, once it does
  411. 15:40that, I will be able to show you the
  412. 15:42exact trades that the strategy took.
  413. 15:44Now, we can do it right now, but you see
  414. 15:47this is a naked chart, so we don't have
  415. 15:50any indicators on it, and it's not super
  416. 15:52helpful because we won't be able to know
  417. 15:54why exactly the model to decide, for
  418. 15:57example, to go long here. So, we would
  419. 16:00have no idea here. So, that's one
  420. 16:02problem, and let's see if we can fix it.
  421. 16:06Now, while this is going, let's go back
  422. 16:08and take a look at the strategies code.
  423. 16:10So, here, if I click on the strategy
  424. 16:12snapshot, we can see the exact code that
  425. 16:14Jesse loaded in order to execute the
  426. 16:17backtest, which by the way, once I
  427. 16:18upload the code of the strategy on
  428. 16:20Jesse's strategy page, which is where
  429. 16:23you can see the results of the backtest
  430. 16:25for other trading periods, symbols, and
  431. 16:28time frames. So, once I do that, you
  432. 16:31will be able to download the code of the
  433. 16:32strategy, and this should be done by the
  434. 16:34time you're watching this video. So,
  435. 16:35when you do, remember that the prompt
  436. 16:39that I wrote for this is going to be
  437. 16:42included in the comment section. So,
  438. 16:44remember that. Anyways, moving on. So,
  439. 16:46it defined the hyper parameters here
  440. 16:48right at the beginning, and we can see
  441. 16:50defined the BB period, which stands for
  442. 16:52Bollinger Bands period, and then the
  443. 16:54Bollinger Band deviation, the ATR
  444. 16:56multiplier. So, these are the values
  445. 16:58that it is using. So, it did not
  446. 17:00differentiate between the upper band
  447. 17:02deviation and the lower band deviation,
  448. 17:04and we just have one ATR multiplier and
  449. 17:07the period. Now, I generally say the
  450. 17:09less number of hyper parameters for the
  451. 17:12strategy, that is actually better
  452. 17:14because the strategy is going to be less
  453. 17:16likely to be overfit. So, that's a good
  454. 17:19sign. Here's how I define the Bollinger
  455. 17:21Bands. So, simply return
  456. 17:23ta.bollingerbands
  457. 17:25and then it's passing the current
  458. 17:26candles. The period is defined like this
  459. 17:29in order to pass the period number. And
  460. 17:31then for both the upper deviation and
  461. 17:34lower deviation, it is using this value.
  462. 17:36And the default values are the ones that
  463. 17:38are actually loaded. So, here we have
  464. 17:41the period set to 40, which if I'm not
  465. 17:43mistaken by default it's is 20 for the
  466. 17:46Bollinger Bands. And the deviation is
  467. 17:482.45, which by default I think is two.
  468. 17:51And the ATR multiplier. Now, let's see
  469. 17:54how it used this. All right, it's been
  470. 17:56used here for setting the stop price.
  471. 17:58So, we're saying the stop price is going
  472. 18:00to be the current price minus the anchor
  473. 18:03ATR, so the ATR basically on the anchor
  474. 18:07time frame candle, which in this case
  475. 18:08was the hourly, multiplied by a certain
  476. 18:11ATR multiplier. So, pretty textbook.
  477. 18:15Then we used the risk to quality utility
  478. 18:18function of JC to define that 3% risk
  479. 18:21per each trade. So, we're passing the
  480. 18:23current available margin, the number
  481. 18:25three for 3%, the current price, which
  482. 18:28is going to be the entry price of the
  483. 18:29strategy, the stop price, and then we
  484. 18:32set the fees to what it is on that
  485. 18:34exchange. So, that said, then it is
  486. 18:35submitting the buy order, the stop loss,
  487. 18:38and take profit. And the take profit, by
  488. 18:39the way, the price of it is going to be
  489. 18:41the middle band. Now, I'm going to show
  490. 18:42you this in a second once we can take a
  491. 18:45look at the interactive charts. But
  492. 18:47anyways, moving on, the entry rule of
  493. 18:49the strategy is simply whenever the
  494. 18:51current closing price, or the current
  495. 18:53price, it's basically the same thing,
  496. 18:55whenever it goes below the lower band of
  497. 18:57the current Bollinger Band indicator, we
  498. 19:00want to go long. That's it. And whenever
  499. 19:02it goes above the upper band, we want to
  500. 19:04go short. And this is typical in a mean
  501. 19:06reversion strategy, right? Whenever it
  502. 19:09goes too far from the mean, we want to
  503. 19:11bet that the price is going to go back
  504. 19:14to the mean. So, that's the whole point
  505. 19:15of a mean reversion strategy. If this
  506. 19:18was trend following, we would have
  507. 19:19wanted to do the opposite. Now, for a
  508. 19:21short position, it did exactly the
  509. 19:23opposite of a long position, and that's
  510. 19:27basically it. We're also saying that
  511. 19:28whenever a candle closes, which in Jesse
  512. 19:30we use the update position built-in
  513. 19:33method, we're saying that if it is a
  514. 19:36long position and the current closing
  515. 19:38price is above the middle band, you want
  516. 19:40to liquidate the position. Now, this
  517. 19:41wasn't really needed because we already
  518. 19:44submitted the take profit here. So, once
  519. 19:46the price reaches this, it's going to
  520. 19:48get closed automatically. So, this block
  521. 19:50could have been removed. We don't really
  522. 19:51need it. And so is the case for this
  523. 19:54one. So, the should cancel entry method
  524. 19:56in Jesse basically says, do we need to
  525. 19:59cancel the current entry orders and try
  526. 20:01again? But because inside the go long
  527. 20:04and go short, we're using the current
  528. 20:06price for opening the position,
  529. 20:08basically we're using a market order
  530. 20:10here, then this is unnecessary, and this
  531. 20:12also could have been removed. Anyway, so
  532. 20:14this strategy is overall pretty simple,
  533. 20:16which is actually a good thing because
  534. 20:19the simpler the strategy is, usually it
  535. 20:21plays out even better. So, anyways,
  536. 20:23let's move on. Here's the new link for
  537. 20:26the strategy. So, let's open the trade
  538. 20:28chart, and as you can see, now we have
  539. 20:31actual indicator values. Now, this one
  540. 20:33is the ATR on the anchor time frame,
  541. 20:35which is the hourly. We don't really
  542. 20:37need it right now because it's just used
  543. 20:39for setting the stop price. So, I'm
  544. 20:40going to toggle this. Now, let's take a
  545. 20:42look at some of the trades. Starting
  546. 20:44with the losing one, actually. So, let's
  547. 20:46scroll down. So, let's zoom in a little
  548. 20:48bit. All right, so here it is. Here's
  549. 20:51where it's went long, and this is where
  550. 20:54it closed it. So, this was a buy order
  551. 20:57and a sell order. And it should have
  552. 20:59been a buy order, so it is correct
  553. 21:01because the price closed below the lower
  554. 21:04band of the Bollinger band, right? So,
  555. 21:06this was supposed to be a buy, but the
  556. 21:08price didn't go back to the mean, it
  557. 21:10went down. So, that's why it's a loss.
  558. 21:12So, moving on with this one, we can see
  559. 21:14again the price closed below the lower
  560. 21:17band, so it went long. And here, the
  561. 21:19price went back to the middle band, so
  562. 21:21that's why it took a profit here.
  563. 21:23Looking at another one, all right, let's
  564. 21:25zoom in. So, again, it closed below the
  565. 21:28lower band, and then it went back to the
  566. 21:30mean. Now, usually in my strategies, I
  567. 21:33would set some sort of filter to not
  568. 21:36take these trades, because this is
  569. 21:38basically a squeeze moment of the
  570. 21:40Bollinger Band. So, the price is not in
  571. 21:43any kind of range anymore, and I usually
  572. 21:46want to avoid taking trades here. So,
  573. 21:48this isn't really a good sign, because
  574. 21:49even considering the trading fees, it
  575. 21:51may not even be worth it. But anyways,
  576. 21:53let's move on to one of the big ones,
  577. 21:55actually. So, let's sort this based on
  578. 21:58best first. So, let's take a look at
  579. 22:00this. All right, we already did. Let's
  580. 22:02take another one. All right, so here,
  581. 22:03the price actually closed above the
  582. 22:06upper band, so we went short, and then
  583. 22:08it reached the mean. So, again, another
  584. 22:11case of a mean reversion strategy. All
  585. 22:13right, so this is why these indicator
  586. 22:15values are pretty useful, because if it
  587. 22:18wasn't behaving exactly the way I
  588. 22:19wanted, I could have just identified and
  589. 22:22fixed it. Or, in this case, for example,
  590. 22:24that I said because this is a squeeze
  591. 22:25moment, I don't want to take trades
  592. 22:27during this. So, this is something I
  593. 22:29want to avoid, and it can simply be done
  594. 22:32by using um an indicator such as the
  595. 22:35Bollinger Band width, which basically
  596. 22:37tells us this exact thing, that you
  597. 22:39know, the Bollinger Band is not too big
  598. 22:41anymore, so it's pretty tight. So, we
  599. 22:44could use that as a filter. And because
  600. 22:47I am seeing this visually, it is very
  601. 22:49easy for me to identify. But if I
  602. 22:51didn't, if I just read the numbers for
  603. 22:53the trades, I could not have done this.
  604. 22:55Before I leave you guys, I want to
  605. 22:56mention two things. First of all, if you
  606. 22:58follow me on my profile on Jesse's
  607. 23:00website, you will be notified whenever I
  608. 23:03submit a strategies like this one. So,
  609. 23:05that's pretty helpful. And second, if
  610. 23:07you haven't already, make sure to open
  611. 23:09the road map page of Jesse, which is
  612. 23:11simply at jesse.trade/roadmap,
  613. 23:13and vote on these features. So, let me
  614. 23:15know what you guys want me to build
  615. 23:17next. If you enjoyed the video, please
  616. 23:19give us a like and let me know what you
  617. 23:21think in the comment section. And don't
  618. 23:22forget to subscribe to the channel if
  619. 23:24you haven't already, because I publish
  620. 23:26videos just like this one all the time.
  621. 23:28Thank you so much for watching. I'll see
  622. 23:29you in the next one.

About this transcript

This page contains the full transcript of GLM 5.3 + MCP: Mean Reversion Crude Oil strategy with a 2.93 Sharpe by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 4,596 words across 622 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.