Qwen3 Coder tested: Is it good for algo trading strategies? — Transcript
Full transcript
- 0:00Hey guys, it's S. In this video, we're
- 0:02going to review the Quen Tree Coder
- 0:04model. It's the latest open source model
- 0:06and according to their creator Alibaba,
- 0:09it is on par with the Clawson Sonnet
- 0:12model. And considering the cost of this
- 0:13model is significantly lower. If that's
- 0:15true, then it's an amazing choice for
- 0:17us. But as always, what we care about as
- 0:19algo traders is the performance of these
- 0:21models for tasks such as writing algo
- 0:24trading strategies from scratch,
- 0:25improving our existing strategies,
- 0:27debugging them, and whether or not the
- 0:29model has some trading knowledge. So in
- 0:31this video, we're going to test the
- 0:32model to see how it compares to the
- 0:34previous models that we have tested. If
- 0:36that all sounds good, let's get right
- 0:37into it. Now, this is the blog post
- 0:40released by the Alibaba. And as you can
- 0:42see, it is either beating all the
- 0:43previously released models or it is on
- 0:45par with them. And by the way, they're
- 0:47also comparing it to Kimik K2 model,
- 0:50which just before this model was
- 0:52claiming to beat all the other models.
- 0:53And in fact, I already made a video
- 0:55about it. It's still being edited by my
- 0:57editor. But this video, I'm going to
- 0:59edit myself. So I have no idea which one
- 1:02you're going to see first. But in either
- 1:03way, with this type of testing that
- 1:05we're going to do today and give the
- 1:07model some ranking, you'll be able to
- 1:09compare the two very fast. They're also
- 1:11showing this beautiful chart here which
- 1:13we can see very quickly which model has
- 1:16good performance based on their size. So
- 1:20basically the lower the size of the
- 1:21models so such as these as you can see
- 1:24are even smaller than Kimik 2 it means
- 1:26they'll be cheaper or faster. Although
- 1:28to be honest in this case the coin 3
- 1:31isn't cheaper than Kim K2 but it may be
- 1:35faster but comparing to other models
- 1:37such as Gemini 2.5 Pro or Cloud Sonnet.
- 1:40Yes, it's definitely cheaper. Now, even
- 1:43though this model is open source, it
- 1:44doesn't really mean that you can host it
- 1:46on your own local machine cuz taking a
- 1:49look at the size of the model, it has
- 1:51480 billion parameters. That means
- 1:54forget about hosting it on any single
- 1:56GPU or a MacBook machine like mine. So,
- 1:58the only thing that you can do is to run
- 2:00it on a cluster. So unless you are a
- 2:02business and you have a cluster of GPUs
- 2:05in your hands, then the only option that
- 2:07you can use this model is by using their
- 2:09API with services such as open router or
- 2:12you can also use Jesse GPT which is our
- 2:14cloud-based service. Now in this video
- 2:16I'm going to use Jesse GPT as always.
- 2:18But if you guys have some privacy
- 2:19concerns or you don't want to pay us
- 2:21anything and you want to self host
- 2:23everything by yourself, then go ahead
- 2:25and watch this video of mine from before
- 2:27where I show you how you can use open
- 2:29router and JAN AI to self-host these
- 2:32things on your machine. Now when I say
- 2:33self-host, I don't mean actually running
- 2:35the model. You will still be using some
- 2:37API from another service. So with that
- 2:39in mind, let's get to the first
- 2:41question. Write a golden cross strategy
- 2:43that uses the 50 and 100 moving
- 2:45averages. close the position when the
- 2:46entry rule is no longer valid. And by
- 2:48the way, I've chosen quantry model here,
- 2:50but as you can see, we also have other
- 2:52models such as Kim Kate 2, DeepS chat,
- 2:55cloud sonet 4, Grog four and three, and
- 2:59basically all the cutting edge models.
- 3:01Now, it gave us the strategy and it also
- 3:03explained it pretty well. Okay, so let's
- 3:05copy this, go to Jesse, and I'm going to
- 3:09make a new strategy. I will call it test
- 3:13quantry
- 3:15coder
- 3:17and paste the whole thing here. Let's go
- 3:19to back test
- 3:22coder. Set the time frame to hourly. The
- 3:26BTC USDT is fine. Exchange is Binance
- 3:28perpetual futures. And for the duration,
- 3:32let's select the first 6 months of 2024.
- 3:38The fast mode is enabled. and so is the
- 3:40benchmark feature. Now before I run it,
- 3:42let's take a look at the code. So it
- 3:44defined one property for the moving
- 3:47average of 50. It is simply returning
- 3:49TAS SMA which is the correct syntax in
- 3:52JC for using the SMA indicator. It's
- 3:55passing the current candles and then the
- 3:57period which is 50. It's doing the same
- 3:59thing with 100. Our entry rule is if the
- 4:02moving average of 50 is bigger than 100,
- 4:04go long. Do the opposite for short
- 4:07positions. And for position sizing is
- 4:09passing the entire balance, the current
- 4:12price and setting the fees of the
- 4:15current exchange. Then it's submitting
- 4:17the current buy order to open a long
- 4:18position using first this quantity and
- 4:21then the current price. So this means
- 4:23it's going to use a market order to
- 4:25enter the position. It's doing the
- 4:27opposite for a short position and then
- 4:30it's saying assuming we already have an
- 4:32open position and we want to update it
- 4:34once a new candle closes. If it's a long
- 4:36position and the moving average of 50 is
- 4:39below 100, which is the opposite of our
- 4:42integer rule, we want to liquidate the
- 4:44position. And then we do the opposite
- 4:46for short positions. And it is returning
- 4:48this as false, but it's not really
- 4:50necessary. We we could even delete it
- 4:52because we're using a market order to
- 4:54enter the position. But that function is
- 4:57only used when we are using either a
- 4:58limit or a suborder to open our
- 5:00positions. But I'm going to leave it as
- 5:02it is. So, let's go back and run our
- 5:05first back test. And it went true. So,
- 5:09this purple line is our portfolio's
- 5:12equity curve. And the orange one is BTC.
- 5:15It's even beating the market. That's
- 5:17good. It made 61% in P&L. The maxon is
- 5:21-7%.
- 5:23The V rate is 42 and the sharp is 2.12.
- 5:27So, this is really good and it
- 5:29definitely deserves a perfect 10 score.
- 5:32All right. Next, convert this pine
- 5:33script strategy into Python code. Now,
- 5:35we're going to need a pine script code
- 5:37to feed the model. And for that, I'm
- 5:39going to look up trading view for super
- 5:43trend strategy. It is this one.
- 5:47And if I click
- 5:51here, I'll be able to get the source
- 5:54code of it. And then we can go back and
- 5:57paste it here.
- 6:00All right. So it gave us the whole
- 6:01strategy. Let's copy it. All right. So
- 6:04it defined super trend by using the
- 6:08correct syntax of super trend indicator
- 6:10on Jesse. It is TA. Super trend pass the
- 6:13current candles and the period
- 6:15which it defined here
- 6:19and also the factor again here. Now it
- 6:23didn't really need to define it here I
- 6:25believe but it is fine. Now sometimes
- 6:27because the pine script code is doing it
- 6:30that way the model thinks that in Jesse
- 6:32it's also better to follow the same
- 6:34structure. So it's not necessarily wrong
- 6:37but usually in Jessie the syntax for
- 6:40strategies is significantly simpler. So
- 6:42you don't have to do it exactly the
- 6:44trading view way. Now for entry it's
- 6:46saying if the current trend is one and
- 6:50the previous trend was minus one. So it
- 6:52is trying to see if a crossover has just
- 6:56happened. Now this seems fine but it's
- 7:00not going to work because in just a
- 7:02syntax if you want to not receive just
- 7:04one value if you want to receive an
- 7:06array of values like all the previous
- 7:08values of that indicator you need to
- 7:10pass the sequential
- 7:14parameter
- 7:16and set it to true because by default it
- 7:18is set to false and it didn't do that so
- 7:22I know this is going to fail and besides
- 7:24that with super trend this isn't how we
- 7:27check if the trend is one or not because
- 7:30if I come here and
- 7:33open super trend. So basically that
- 7:36indicator value will give us this line
- 7:38here or here and if the current price is
- 7:40above it it means in uptrend or it
- 7:43should return one for the trend and if
- 7:45the current price is below it the trend
- 7:47is downward. So simply saying if its
- 7:51trend is one or minus one is not going
- 7:53to work. So overall I think this is a
- 7:55fail. It did do some fun stuff like it
- 7:58even tried to plot it on the chart with
- 8:00just it correct syntax. So I like how
- 8:03this model is thinking but this is a
- 8:05complete fail now because I like how it
- 8:09defined this correct syntax here and it
- 8:13also even did this. I'm going to give it
- 8:15one and that's a complete zero. All
- 8:18right next develop a mean diver strategy
- 8:20using the Ballinger bands and the RSI
- 8:22with a seven period. Let's copy this.
- 8:26Change the code. Paste it here. All
- 8:28right. So, it named it Fibonacci
- 8:30strategy. Define fib levels as these are
- 8:33the highs. The look back period is 50.
- 8:38And then it is passing the current highs
- 8:40by selecting the tree as the index. It's
- 8:42also fetching the recent lows.
- 8:45It is finding the recent swing high and
- 8:47low using this syntax.
- 8:51And the price range is highest high
- 8:53minus lowest low. Then it is calculating
- 8:55the Fibonacci retracement levels
- 8:59with this syntax and these magical
- 9:01Fibonacci numbers. Then it is passing it
- 9:03like this. So this is very beautiful,
- 9:06simple and elegant. Then it define a
- 9:08trend like this using two moving
- 9:10averages and it's saying return one if
- 9:13the EMA 50 is above EMA 200 otherwise
- 9:16minus one for a downtrend. In Schudlang
- 9:18first it's checking the trend. It's
- 9:20saying if it's minus one or if it's not
- 9:23one return we return false and if this
- 9:25passes then we want to say if the price
- 9:28is near or below a key Fibonacci level
- 9:30we want to go long again this is really
- 9:33beautiful like I remember previous coin
- 9:35models and I never like them but this
- 9:38one seems to be onto something. So next
- 9:41it's doing the opposite for short
- 9:43positions. And as for position sizing,
- 9:45it's using the current lowest low of the
- 9:48Fibonacci levels as the stop loss. Now
- 9:52let's check which one is the lowest low.
- 9:55Oh, okay. I see. So the lowest price.
- 9:57And for take profit, it's using the
- 10:00highest high. Now this is certainly one
- 10:04way to write Fibonacci strategy, but I
- 10:06haven't seen it. then it's risking 2% of
- 10:09the current available margin for each
- 10:11position. It's doing the opposite for a
- 10:13short position. Once the position is
- 10:15open, it is submitting the stop loss and
- 10:17take profit. So this is correct. But
- 10:20here's the thing, it didn't really need
- 10:22to define the takerit here. I mean, as
- 10:25for a stop loss, I get it. It is using
- 10:27it here. But this takerit variable is
- 10:30not being used anywhere. And in here,
- 10:32we're defining it even again. So this is
- 10:35unnecessary. And then if we already have
- 10:37an open position, it's saying if it's
- 10:39long and the current price is more than
- 10:43the entry price of the position plus the
- 10:46highest high minus the entry price of
- 10:49the current strategy multiplied by half.
- 10:52If that's the case, then update the
- 10:55current stop loss. So it defines some
- 10:57kind of trailing stop order. So this
- 10:59seems fine. Let's go and see if it runs.
- 11:02And it doesn't. So let's see where it
- 11:05went wrong. So, it's using this, but it
- 11:09didn't define it here. I mean, if it's
- 11:11using the 0.5 Fibonacci level in here, I
- 11:16believe this should also be here
- 11:19and here. And this should be this line.
- 11:24So, I think this is the correct
- 11:25approach. So, let's go back and give it
- 11:27another try. And it's not even
- 11:29performing that bad. Okay. So this is
- 11:31also a pass but I'm going to subtract at
- 11:35least one point because I could get it
- 11:38working by just one simple change and
- 11:40also overall the way it defined the
- 11:43logic of the strategy was really
- 11:44beautiful. Next update my code to
- 11:47display the values of important
- 11:48indicators of my strategy in back test
- 11:50for debugging purposes. Now for this one
- 11:53we're going to need a strategy and I
- 11:54will choose this one called teotren
- 11:57following from our website. I will fetch
- 11:58its source code. Go back and
- 12:03paste it here.
- 12:07Now let's remove these lines for
- 12:10the charts because we expect the model
- 12:14to write them.
- 12:17All right. So let's copy the code,
- 12:22paste it here. All right. So it defined
- 12:24this after method. It's using the
- 12:26addline to candle chart function. It
- 12:30gave it the name tema 10, tema 80 and 20
- 12:33and 70 for the 4 hours time frame.
- 12:35Everything seems correct.
- 12:37It define one extra line chart with the
- 12:41name of indicators to display the ATR
- 12:44value in it. And then it defined
- 12:46horizontal lines to our extra line which
- 12:49is this one. It defined the current
- 12:52threshold for the ADX and CMO both
- 12:56overbought and oversold values. But the
- 12:59problem is it didn't actually define the
- 13:01values of ADX and CMO on this chart. So
- 13:06it's just displaying the threshold. So
- 13:08this isn't exactly what I needed. So
- 13:10this is going to be a pass but not a
- 13:12perfect score. So let's go back and
- 13:15enable the interactive charts and give
- 13:18it a start. Now this error is because
- 13:21we're using the 4hour time frame in the
- 13:23strategy but we didn't define the data
- 13:25out but in back test Jess is smart
- 13:28enough to figure this out and handle the
- 13:30error for you. So the back test will go
- 13:32through but in live trading you got to
- 13:34be careful to add that data out
- 13:36otherwise your session could fail. Now
- 13:40it went through. Let's take a look. Now
- 13:42here are the values of the temo lines
- 13:46and this is the value of the ADX. Now,
- 13:49if I lower this, you can also find the
- 13:50thresholds for CMO and ADX. But again,
- 13:53this isn't exactly what I needed because
- 13:55the threshold alone isn't enough, right?
- 13:57We also want to see the values. And by
- 13:59the way, in the interactive charts page,
- 14:01you can also check out all the trades
- 14:03that it took and the prices and the
- 14:06orders. You can also click here to go
- 14:09and find that on the chart, which is
- 14:11pretty cool. So, this is a pass, but not
- 14:14a perfect pass. So, I'm going to give it
- 14:16like an eight because I believe it was
- 14:18an easy task and it could have easily
- 14:21done it. So, I'm not going to give it a
- 14:23nine. All right. Next. Write a trend
- 14:25following strategy that uses 15 minutes
- 14:27time frame for entry and 4 hours time
- 14:28frame for confirmation.
- 14:31All right. Let's copy it.
- 14:35Change the code. Paste it. And it define
- 14:38the long-term candles using the self get
- 14:40candles syntax. It passed the current
- 14:42exchange and symbol and passed the time
- 14:44frame as 4 hours. This is perfect. And I
- 14:47like that it first defined the long-term
- 14:49candles here so that it can use it
- 14:52later. And it is indeed using it in the
- 14:54long-term SMA here with the period of 50
- 14:58and then it is using the long-term SMA
- 15:00here to determine the current trend, the
- 15:03long-term trend really. And then in the
- 15:07shoot long which is the inter rules of
- 15:09the strategy it's saying if the short
- 15:11SMA is above the long SMA and if the
- 15:15long-term trend is simply true which
- 15:18would be this. So it needs to be lower
- 15:21than the current price then it means we
- 15:23are in an uptrend. All right. So it's
- 15:26also doing the position sizing is
- 15:29passing 2% as the number for risking per
- 15:32position.
- 15:34The stop is current entry which is the
- 15:36current price minus two times the
- 15:38current ATR.
- 15:40Then it's passing the current buy order
- 15:42doing the opposite for short positions.
- 15:45And then it's saying once the position
- 15:46opens if it's a long position the stop
- 15:49loss is going to have the quantity of
- 15:51the current position and the price of it
- 15:53is going to be the current price minus
- 15:55two times the current ATR. For take
- 15:57profit it's doing two times of that. So
- 16:01the risk-to-reward ratio of the strategy
- 16:03is going to be two.
- 16:05And then we're saying once every candle
- 16:08closes, assuming we have an open
- 16:10position, if it's a long position and
- 16:12the short EMA is below the long SMA or
- 16:16if it's vice versa, we want to liquidate
- 16:18the current position. So this seems
- 16:19really perfect. Let's go and run it. And
- 16:23it's a perfect pass. So let's give it a
- 16:2610.
- 16:32Next, here's the code for my trend
- 16:33following strategy in the 15 minutes
- 16:35time frame. The strategy is losing money
- 16:37because it is taking too many trades and
- 16:40there are too many false breakouts
- 16:41during the ranging markets. Please
- 16:43improve the strategy. So, here's the
- 16:45thing. Now, we want to test to see if
- 16:47the model has some actual trading
- 16:50knowledge. So, forget about coding. We
- 16:52want to see if it knows how to prevent a
- 16:55trading strategy from taking too many
- 16:57trades. And since it is a trend
- 16:59following, it needs to avoid the ranging
- 17:02markets. Now, for that, let's paste the
- 17:04previous strategy that it wrote just for
- 17:07us and see how it is able to improve
- 17:10upon it. There we go. Let's copy it and
- 17:13update this previous code and run it one
- 17:17more time. Now it's getting an error
- 17:20saying the source type 14 not
- 17:23recognized. Okay, so let's see what it
- 17:27changed. Okay, so here's really the
- 17:31problem. It's trying to define a moving
- 17:33average based on the values of the ATR,
- 17:36but this isn't the correct value cuz
- 17:38this parameter in Jesse is the source
- 17:41type of the candles. Now, if you don't
- 17:42know what that means, it doesn't really
- 17:44matter, but just know that this isn't
- 17:46correct. So what it should have done was
- 17:50to here pass the sequential
- 17:53as true. Now this one would have been
- 17:56simply the period. So 14 and then
- 17:59instead of passing the current candles
- 18:01it should have given it the ATR.
- 18:05So this would have worked for ATRM MA
- 18:09and here it could have simply checked
- 18:13the latest value of this with this one.
- 18:17So this I believe should pass. Let's
- 18:19give it another go. Okay, so it seems
- 18:23like it defined a filter but it isn't
- 18:27correct. So let's take a look. So it
- 18:30defined a couple of filters and it
- 18:32passed them here. But this syntax seems
- 18:35correct except this one. Oh, so this
- 18:39shouldn't have been a property. So it
- 18:42defined this volatility check. It also
- 18:45defined two more filters. So one is is
- 18:48the current ADX value above 25 which is
- 18:51brilliant. And then it's checking for
- 18:54choppy markets because you want to make
- 18:56sure the choppiness index is below 50,
- 18:58which is really good way to make sure
- 19:01there are some actual structure and not
- 19:03so much randomness in the current
- 19:05market. All right, so let's give it one
- 19:08more try
- 19:10and it did go through this time. Okay,
- 19:13so it got a couple of things wrong, but
- 19:16it did lower the number of the current
- 19:18trades, but it still isn't profitable
- 19:21actually.
- 19:22We aren't trading in the 15 minutes. So,
- 19:25let's do this.
- 19:29Okay, it got a little bit better.
- 19:32But anyways, it's not a complete pass.
- 19:35So, I'm going to give it a seven. Next,
- 19:37develop a strategy that combines the
- 19:39Williams percentage or MACD and
- 19:42Ballinger bands. Okay, I'm going to copy
- 19:44this whole thing and go to Jess's
- 19:47dashboard and paste it here. All right.
- 19:50So it defined the Williams R with this
- 19:52syntax TA. R it's passing the current
- 19:55candles and the period is 14. Define the
- 19:58MACD with this syntax which seems fine.
- 20:01The Ballinger bands is TA. Ballinger
- 20:03bands passing the current candles. Again
- 20:05it set the mult2 and we already know
- 20:08this is going to fail. So let's remove
- 20:10it and save it. Define the current ATR
- 20:13as TATR
- 20:15and for shoot long. Now, by the way, one
- 20:18thing I like about this model, it writes
- 20:20the code in a very clean way. So, for
- 20:23instance, it's wrote some really easy to
- 20:25read comments here. And I really
- 20:26appreciate this. So, it's saying if the
- 20:28current volumes are value is below minus
- 20:3180 and the maxis value is above its
- 20:34signal and the current price is below
- 20:36the current lower band value of the
- 20:39current Ballinger band, then we want to
- 20:41open a long position and do the opposite
- 20:43for short positions.
- 20:46For the sub price, it says use the
- 20:48current entry price minus 1.5 times the
- 20:51current ATR and three times the current
- 20:53ATR for a take profit. And for the
- 20:57quantity, it is risking 2% of the
- 20:59capital. And then it is submitting all
- 21:01of them here. So this seems perfect. But
- 21:04by the way, when I want to write a
- 21:06ballinger band strategy, usually I don't
- 21:09say if the current price is above upper
- 21:12band and then here you simply use a
- 21:15market order. Instead, I would have
- 21:17removed this entry rule and if these two
- 21:21were correct and we did come here, I
- 21:24would have used the value of the upper
- 21:26band. By the way, this one is for shoot
- 21:28short. This is for long. So this would
- 21:30have been for the short position. So
- 21:32instead of using the upper band here, I
- 21:36would have used this value.
- 21:38Let's copy it here for my entry price.
- 21:43And then all the other calculations
- 21:44would have worked and we would have used
- 21:46a limit order to open the position which
- 21:49would have allowed us to pay less
- 21:51trading fees to the exchange. But
- 21:53anyways, let's bring it back. And then
- 21:55it's saying if the MACD signal is
- 21:59showing a reversal or if the current
- 22:02price is above the middle band then
- 22:03liquidate the position and do the
- 22:05opposite for short positions. So the
- 22:07rest of it seems fine. It is also
- 22:09submitting the takeprofit and a stop
- 22:11loss after a position is open. Now this
- 22:13would have been correct if it hadn't
- 22:16already submitted two of them here.
- 22:20So I think a better syntax is to just
- 22:22remove them from here.
- 22:25So, I'm going to subtract at least one
- 22:27point because of this, but I believe it
- 22:30should work.
- 22:34And it does. Okay. So, it's a pass now,
- 22:37but I'm going to subtract one point for
- 22:40this mistake and another for that extra
- 22:43multiparameter of the Ballinger bands
- 22:45that we already knew doesn't work from
- 22:47the previous question. So, it's going to
- 22:48be an eight. All right. Next, write the
- 22:50entry functions of the strategy for me
- 22:52in a way that it should use two limit
- 22:55orders for opening the position and it
- 22:57should only risk 2% of capital per
- 23:00trade. Now, notice that I'm asking for
- 23:02the functions and not the entire
- 23:04strategy. So, what I'm hoping to see,
- 23:06and in fact, I am seeing it, is that it
- 23:09shouldn't give me the entire strategy
- 23:11cuz this way it would be easier for me
- 23:13cuz the whole idea is that sometimes
- 23:15you're writing the strategy and you just
- 23:16want one piece of the strategy and
- 23:19you're not sure how to write it and you
- 23:20ask the AI to do it for you. The first
- 23:22entry price is going to be 1% below the
- 23:25current price. The second is going to be
- 23:272%. The stops is going to be 2% below
- 23:30the first entry. So, this seems perfect.
- 23:32And then it is indeed risking 2%.
- 23:36But here's the thing. It is passing only
- 23:39half the current available margin. So
- 23:42this is going to ruin the whole
- 23:43calculations. So this should have been
- 23:45the whole thing and then it should have
- 23:48passed this two here. So it's a fail and
- 23:52the syntax for submitting the buy order
- 23:55is correct. So it didn't do exactly what
- 23:58I needed to do. So I'm going to give it
- 24:00an eight. Now, last but not least, write
- 24:02a pair trading strategy for ETH and BTC.
- 24:05Now, with this one, what I'm hoping to
- 24:07get is two different strategy classes.
- 24:11So, one is going to be the leading
- 24:12strategy which will make the decisions
- 24:14for opening a persing strategy and the
- 24:17second class is going to be the follower
- 24:19strategy because in JC the strategies
- 24:21can communicate with each other, but
- 24:24each one of them is going to have its
- 24:26own separate symbols. So we need one
- 24:29class to make the decisions and all the
- 24:31other ones but usually just one more to
- 24:34follow that first route. Now if this
- 24:37seems too complex for you make sure to
- 24:39check out my older video called pair
- 24:42reading strategy from scratch in Python
- 24:44where I walk you through writing a pair
- 24:46writing strategy in Python with Jesse.
- 24:49All right. So let's take a look. It
- 24:50defined EBTC pairing strategy.
- 24:54Let's scroll down and then it define the
- 24:57BTC follower. So let's copy this first
- 25:00one here.
- 25:03Create a new strategy and call it test
- 25:09three
- 25:11pairs one or leader.
- 25:15Paste it. Now let's take a look at it
- 25:17first. So it defined the ETH candles
- 25:21with this syntax
- 25:23which is correct but this syntax for
- 25:26fishing the current exchanges name
- 25:28isn't. So let's remove this right now.
- 25:35Let's do the same here.
- 25:39Then it converted the prices into
- 25:40returns using prices to returns utility
- 25:43function of Jesse. And it also uses
- 25:45zscore utility function of Jesse. And
- 25:48inside the before function which is
- 25:50called before any other method of your
- 25:53strategy. First is saying if the current
- 25:55index is zero close every position. So
- 25:59basically using the shared v dictionary
- 26:03which can be accessed from within all
- 26:05the trading routes that you have.
- 26:08It is defining this which will be the
- 26:10state of the current position and then
- 26:12it's making these decisions for pair
- 26:14trading which again if you don't know
- 26:15what these are watch my previous video
- 26:17about it and then it is setting the
- 26:21current margin per each position again
- 26:23using this shared VS and then to make
- 26:27decisions for opening the position it's
- 26:29simply using this it's checking what's
- 26:32the current state of these and it also
- 26:35defined the position sizing again using
- 26:37this ETH margin here. Now let's copy
- 26:40this, create a new strategy and name it
- 26:44test coin
- 26:46tree
- 26:48pairs follower.
- 26:51Paste the whole thing. Remove this part.
- 26:56Go back
- 26:57and copy this. Now notice that since we
- 27:01didn't have the imports above here, they
- 27:03were up here. I made sure to bring that
- 27:06from the previous strategy. So let's
- 27:08paste the whole thing. And this one, as
- 27:10you can see, is simply the follower. So
- 27:12it is only using these values from the
- 27:16shared wires. So it's not making any
- 27:18logical decisions. So let's go and run
- 27:24test three pairs leader. and the second
- 27:28one. And by the way, the order of these
- 27:32strategies in your trading routes is
- 27:34very important. So let's
- 27:37pick follower this time. Now the time
- 27:40frame could be anything really. So let's
- 27:42go with 15 minutes. Let's check the code
- 27:45again. I want to see which one was
- 27:47first.
- 27:49So let's go down. So ETH is first and
- 27:53BTC is second. So this one should be ETH
- 27:56and this one should be BTC. And we're
- 28:00going to get an error now because the
- 28:02fast mode isn't supported when we are
- 28:06trading multiple routes. So let's also
- 28:09disable this and give it a go. And this
- 28:12time it's going.
- 28:15All right. So we're losing money which
- 28:17is expected because it executed too many
- 28:20trades and we're paying a lot of money
- 28:21in trading fees. That's a typical issue
- 28:24with pairing strategies. Now, there are
- 28:26many ways to fix this, of course, to
- 28:28either use a bigger time frame or trade
- 28:30something else such as meme coins. Now,
- 28:33this is a big topic on its own, but the
- 28:35fact that it was able to write something
- 28:37that works is a pass. So, I'm going to
- 28:40give it a 10. Now, we ended with a score
- 28:42of 80. Now, this is a pretty good score.
- 28:46It's not awesome, especially because it
- 28:48wasn't able to convert this and it was a
- 28:50fail. And in this one also, it didn't do
- 28:53a great job. But overall, this is a
- 28:56pretty good model. Like even though it
- 28:59wasn't able to get everything working,
- 29:01when it did work, the code that it wrote
- 29:03was beautiful. And I definitely didn't
- 29:06expect this from Alibaba because the
- 29:08previous coin models, they were overfit
- 29:10to the benchmarks and I wasn't actually
- 29:13able to use them in my daily work. But
- 29:15this one, according to our test, is
- 29:17significantly better. Now guys, if you
- 29:19like these videos, please make sure to
- 29:21give them a like and post a comment. Let
- 29:23me know what you think. And also
- 29:24subscribe to the channel if you want to
- 29:26receive more videos like this. Thank you
- 29:28so much for watching. I'll see you in
- 29:29the next one.
- 29:33[Applause]
- 29:35[Music]
About this transcript
This page contains the full transcript of Qwen3 Coder 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,932 words across 695 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.