GPT OSS tested: Is it good for algo trading strategies? (+ fully local installation) — Transcript
Full transcript
- 0:00Hey guys, it's S. Open AAI just released
- 0:02two open-source models in the sizes of
- 0:0520 and 120 billion parameters. Now, the
- 0:09one that I really care about is the 20
- 0:11billion parameter because that is the
- 0:13one that I'm able to run it on my local
- 0:16Mac machine. So, this is the one that I
- 0:18really care about and I couldn't be more
- 0:19excited about it because apparently it's
- 0:21pretty good and that gives me full
- 0:22privacy for my strategies. But of
- 0:25course, what we really care about as
- 0:26Algo traders is the performance of the
- 0:28model for things such as writing
- 0:30strategies in Python, debugging our
- 0:33existing strategies, or if the model has
- 0:35any actual trading knowledge. So, if all
- 0:38that sounds interesting to you, let's
- 0:39get right into the video. So, here's a
- 0:41blog post released by OpenAI and it
- 0:44gives us some information about the
- 0:46models, but what I really care about is
- 0:49the benchmark of it. So let's scroll
- 0:51down and here we can see the GPD OSS 20
- 0:57billion model without tools and here we
- 1:00can see that it is beating slightly the
- 1:0303 mini model. So that's pretty amazing
- 1:05because I remember 03 mini used to be a
- 1:08very good model. So if this is true that
- 1:10is fantastic. Now to run this test we
- 1:13have two ways. So one is to use JCGPT
- 1:15which is our cloud version. It has all
- 1:18the instructions for algo trading in
- 1:20Python. And even if you don't have a GPU
- 1:23of your own, you can just use this model
- 1:25and you can check it out here. And this
- 1:28new model, especially the 20 billion,
- 1:30uses only one credit. So that is by far
- 1:33the cheapest model on our list. So even
- 1:36if you have a free account on Jess
- 1:37trade, you can easily use this model.
- 1:40But the whole point of doing this was
- 1:42that we could have more privacy, right?
- 1:44Because it's open source. So in this
- 1:46video I'm not going to do that and
- 1:48instead I will show you how to run a
- 1:50completely offline version of it. So the
- 1:52easiest way to do this is simply
- 1:54download LM Studio which is great for
- 1:57running local LLM models. Now I already
- 2:00did this and in fact if you go to the
- 2:02discover page you can see that GPOSS 20
- 2:06billion is of this list and I already
- 2:08downloaded this but because it's so new
- 2:11only the GDUF version is available. So
- 2:14the MLX version is now in case you don't
- 2:16know what that is, the MLX version or
- 2:19LLM models specifically for Apple
- 2:21silicon machines. So if I run that
- 2:23version which will be out approximately
- 2:26tomorrow, I'm going to get 20 to 30%
- 2:29better performance. So same machine but
- 2:3120 or 30% better performance. So that's
- 2:33really amazing. Now again I already
- 2:35downloaded this. All right. So now we
- 2:37are able to load the model. So let's go
- 2:39here. Click here. Now, make sure to
- 2:41increase the context length because by
- 2:42default it is set to 4,000. That's very
- 2:45low for our use case. So, I'm going to
- 2:47set this to at least 30,000, but the max
- 2:51supported value for this model is
- 2:53131,000. So, that's pretty amazing. Now,
- 2:56I'm seeing some new options on LM
- 2:58Studio. I don't know if it's just for
- 3:00this model or it came with the new
- 3:02version of LM Studio, but to be honest
- 3:04with you, I'm not sure how to change
- 3:06these things. So, I'm just going to let
- 3:07them what it is. It also gives us a
- 3:11setting for number of experts. By
- 3:12default, it is set to four, but I'm
- 3:15really curious to know what would happen
- 3:17if I increase this. So, anyways, let's
- 3:19load the model. It's going to take a
- 3:21while for this. All right. So, let's ask
- 3:24it to
- 3:27give me the entry and exit rules of a
- 3:29golden cross strategy in Python.
- 3:33Okay, so it's Python, not PyTorch. Let's
- 3:36hit enter. And you see the model is
- 3:38extremely fast and it is also a
- 3:40reasoning model. So that's why it is
- 3:42thinking before giving us the answer. So
- 3:45it is giving me
- 3:48the integrals.
- 3:51It actually gave me some pseudo code. So
- 3:54this is good. Then it is explaining the
- 3:56code turning signals into position. So
- 4:00yeah because you know by default it
- 4:02doesn't know about Jesse framework. It
- 4:04doesn't know how we're going to trade
- 4:05this or back test it. So, this is
- 4:07perfectly fine and pretty good.
- 4:11Okay, so this seems really good. But
- 4:12what I want to show you is this. You see
- 4:14this value here? 66 token per second. So
- 4:18that's the speed of the model. If I'm
- 4:21able to run the MLX version, which will
- 4:23come out tomorrow, I'm going to get like
- 4:2580 or 90 token per second. So that's why
- 4:29you would really care about the MLX
- 4:31version. But anyway, so this is
- 4:32perfectly acceptable. But now in order
- 4:35to make sure the model is able to give
- 4:38us answers for algo trading in
- 4:40framework, which is something we can
- 4:42actually back test or even live trade,
- 4:45I'm going to have to go to this settings
- 4:47page. And you see, you're going to have
- 4:49to create a new preset and give it the
- 4:51instructions. Now I'm going to paste the
- 4:53whole instructions here. And it is
- 4:55taking 20,000 tokens. So they are huge.
- 4:59it. This has all the rules of the J
- 5:02framework. It has a lot of examples in
- 5:04it. So, this is really great. And in
- 5:07case you're curious, yes, I'm going to
- 5:09link to the repository that has this
- 5:11instructions and leave it on the
- 5:13description section of the video. Now,
- 5:16the next thing is this model page. And
- 5:20we need to change this temperature value
- 5:22here. By default, I think this is set to
- 5:240.5, but I have lowered it to 0.3. Now,
- 5:29by the way, the temperature value is how
- 5:31much you want the model to be creative.
- 5:33So, the bigger it is, the more likely
- 5:35the model is going to give you good
- 5:37ideas, but it will also do more
- 5:39hallucinations and I want to prevent
- 5:41that. So, for that reason, I'm going to
- 5:43set this to a value such as 0.3 or even
- 5:460.2. And once you're done with this,
- 5:48make sure to commit the changes. And now
- 5:50if I go and ask the same thing from the
- 5:53model. So let's go down here and simply
- 5:56click on the regenerate message button.
- 5:58You see now it is processing the prompt.
- 6:01So it's taking a lot longer for it to
- 6:03begin. And that is because we are now
- 6:05feeding the model with 20,000 tokens of
- 6:08input. So of course it's going to take
- 6:10some time for the model to begin. But
- 6:12once this initial prompt is over and it
- 6:15starts giving us answers, my follow-up
- 6:18questions of the model are going to
- 6:20start almost instantly. So this is just
- 6:22a one-time thing. Don't worry about it.
- 6:24But still, even with that, you see when
- 6:27it is printing the result, it is
- 6:29significantly slower. Now it is slower,
- 6:31but it is still fast enough. So I'm not
- 6:33really sad about this. And what I'm
- 6:37curious is the answer. So you see now it
- 6:39is using the current syntax of the Jing
- 6:41framework. And this is perfectly
- 6:43correct. But I found the model to
- 6:46sometimes write the strategy with a
- 6:48weird syntax. So here it defined the
- 6:50property, but it didn't go to the next
- 6:52line and it just continued it like this.
- 6:54I believe this should work, but it's a
- 6:57bit odd. Now, another thing that I
- 6:59noticed with this model is that it tends
- 7:01to print a lot of comments and I really
- 7:03like that. I think it's really helpful.
- 7:05So let's wait for the whole thing. All
- 7:08right. So now with the same prompt it
- 7:10gave us an actual strategy that we are
- 7:13able to run. So that's why these
- 7:15instructions are super helpful. Now
- 7:17let's go through the code very quickly.
- 7:19So it defined two indicators. So one is
- 7:22for moving average with the 20 period
- 7:24and another with 50. The syntax is
- 7:27simply trending EMA and then it is
- 7:29passing the current candles which is a
- 7:31perfectly correct syntax in Jesse. It
- 7:33repeated that with the period of 50 in
- 7:36the inter rule of the strategy which we
- 7:38call shoot long in Jessie is it's saying
- 7:41if it's the first index return false
- 7:44because we don't have any previous data.
- 7:46So this isn't correct actually. So this
- 7:48shouldn't even be here but it is trying
- 7:50to fetch the previous value of the EMA
- 7:5220 with this syntax. This again is
- 7:55incorrect because when you use this
- 7:57syntax with Jesse, it will only give you
- 7:59one value and that is the value of the
- 8:02current indicator. So, it's not even a
- 8:05list and this isn't correct. Now, this
- 8:08is a bit weird because the previous
- 8:09times that I ran this, it worked just
- 8:11fine, but right now it's not. I'm not
- 8:13sure why that is. Now, it is not
- 8:14shorting. Okay, that's fine cuz we
- 8:16didn't ask it. And for the update
- 8:19position function, which only happens
- 8:21whenever a new candle closes, it's
- 8:23saying if it's a long position and the
- 8:26EMA 20 is below EMA 50, which is kind of
- 8:29a death cross. So in that case, liquid
- 8:32the current position. This is correct
- 8:34syntax. For the position sizing, it's
- 8:36saying the entry is going to be the
- 8:37current price. The stop is also going to
- 8:40be the current entry minus two times of
- 8:42the current ATR. This is correct. It is
- 8:45risking 3% per each trade with the risk
- 8:49to quantity utility function of Jesse.
- 8:51This is perfectly correct. And to submit
- 8:53the buy order, which is our entry order,
- 8:54it's saying sell by equals quantity and
- 8:57then the entry. Again, this is correct.
- 8:59It's saying once the position is open,
- 9:01if it's a long position, the stop loss
- 9:02is going to be the quantity of the
- 9:04current position. Again, correct syntax.
- 9:06And the price of it is going to be the
- 9:08current price minus two times of the
- 9:11current ATR. So the two is here actually
- 9:14and the take profit is going to be four
- 9:16times of that. So it has a
- 9:17risk-to-reward ratio of two. That's
- 9:19really great. And then it defined the
- 9:21watch list which is useful if you want
- 9:23to trade the strategy live and see the
- 9:25values in real time. So it's really
- 9:28great. I like it. But now the token per
- 9:31second is only 13. So it is
- 9:33significantly lower but still acceptable
- 9:36for a completely offline model. Now
- 9:38guys, you know that I usually go through
- 9:41all the questions and show you the
- 9:43answers of the model. But in this video,
- 9:46I'm not going to do that because I
- 9:48actually did that. And after recording
- 9:51the whole video, I realized that my
- 9:53audio wasn't on. And right now,
- 9:55unfortunately, I don't have time to
- 9:57re-record the whole thing. So, I'm just
- 9:59going to show you the ending result. And
- 10:02I need you to trust me that I did run
- 10:04these tests and these are the final
- 10:06results that I was getting. So it got
- 10:08most of the questions right. In fact, it
- 10:10is getting perfect 10 in most of them.
- 10:12Now with this one, it wasn't able to
- 10:15complete the task which was to convert a
- 10:16pin script strategy into Python code.
- 10:19But whenever I ask it to write a
- 10:20strategies, for example, write golden
- 10:23cross strategy, it nailed it. I asked it
- 10:25to develop a mean version of strategy
- 10:27using Ballinger bands and the RSI with
- 10:29this period of seven. It nailed that
- 10:32question. I asked it to write a strategy
- 10:34that uses Fibonacci retracement levels
- 10:36for entry and exit points. It did it
- 10:38beautifully and in all of these things
- 10:40it was writing a lot of helpful comments
- 10:43and that's something that I hadn't seen
- 10:45in any other model. Then I asked it to
- 10:48update my existing strategy code to add
- 10:50some chart values. It wasn't able to do
- 10:53a great job but it wasn't complete fail.
- 10:55Then I asked it to write a trend
- 10:57following strategy that uses 15 minutes
- 10:59time frame for entry and the 4 time
- 11:01frame for confirmation. So this is
- 11:02something that we can only do with J
- 11:04framework because if you try to use a
- 11:07bigger time frame in let's say trading
- 11:09views pin script you're going to hit the
- 11:11look ahead bias which means you will be
- 11:13using the price from the future and
- 11:15you're going to get unrealistic results
- 11:17but in Jesse that's not the case. Now
- 11:19anyways the model was able to write a
- 11:22very good strategy with that but I
- 11:24needed to tweak one thing so get to get
- 11:27it working and that's why I give it a 9
- 11:29out of 10. Now for this question, I
- 11:31asked it to improve my existing strategy
- 11:34which was trading the 15 minutes time
- 11:36frame. Now the strategy was losing money
- 11:38because it was taking too many trades
- 11:40when a lot of false breakouts were
- 11:42happening. So I needed to know if the
- 11:44model has some actual trading knowledge
- 11:45to know what to do in these kind of
- 11:47situations like what kind of filters it
- 11:49will define to take less trades but only
- 11:52trades that are actually worth it and it
- 11:54wasn't helpful at all with that. So I
- 11:56give it a zero. Next, I asked it to
- 11:58develop a strategy that combines the
- 12:00Williams percentage R, MACD, and
- 12:02Ballinger bands. Now, I had to make two
- 12:04changes to get it working, but it was
- 12:06perfect. So, I give it eight. Next, I
- 12:08asked it to write the entry functions of
- 12:10the strategy for me in a way that it
- 12:12should use two limit orders for opening
- 12:14the position, and it should only risk
- 12:162%age of capital per trade and it was
- 12:19able to nail that. So it knows the
- 12:21correct syntax for this framework to not
- 12:23only use one order to open positions but
- 12:26multiple. Next I asked it to write the
- 12:28press reading strategy for ETH and BTC
- 12:31and it was able to nail that question.
- 12:34So overall these scores aren't as high
- 12:36as the previous models that I reviewed
- 12:38on this channel. But I believe this one
- 12:40is still a very good one because all of
- 12:43those models they had prompters bigger
- 12:45than 100 billion at least. We're
- 12:48actually able to run this one completely
- 12:49locally and that is very valuable and
- 12:52also with the questions that it didn't
- 12:53get them working. I don't really care
- 12:56because it still did a great job with
- 12:58the other questions. So I believe this
- 13:00model is perfectly usable on your local
- 13:02machine if you are able to run it. And
- 13:05even if you use a cloud version of it,
- 13:07yes, you will lose some of your privacy,
- 13:09but the pricing of it is significantly
- 13:11low, which means that you can use it all
- 13:14the time for research. So, I believe
- 13:16OpenAI just did a wonderful job and I
- 13:20wasn't expecting this at all. Like,
- 13:22considering their previous releases and
- 13:24how expensive those models were and not
- 13:26actually really useful, I had no idea
- 13:29that their open source model is going to
- 13:31be this good. And by the way, recently I
- 13:33also installed the coin tree coder
- 13:36model. You know, the one that has lower
- 13:38parameters and I was able to run it on
- 13:40my MacBook machine and it was good, but
- 13:43it wasn't nearly as good as this one. So
- 13:45in case you are an open-source model
- 13:48enthusiast like myself then you should
- 13:50know this because again I think this is
- 13:53the king of the open source models at
- 13:55least the ones that you are able to run
- 13:57them locally. Now there is another setup
- 13:59that I'm really curious to try and that
- 14:01is using an aentic framework for it. So
- 14:04if we set up this model that way we
- 14:07won't just ask the model to give us the
- 14:09strategies copy and paste it into Jesse
- 14:12and back test and see if it works or
- 14:13not. it will be able to edit the source
- 14:15of the strategy for us. So, it's super
- 14:17helpful. So, if that's the kind of setup
- 14:20that you want to see, let me know in the
- 14:21comments and I might record a video just
- 14:23about that. Now, if you guys want me to
- 14:25make more videos like this, please like
- 14:26the video, subscribe to the channel, and
- 14:28give me your opinion in the comment
- 14:30section. It helps me out a lot. Thank
- 14:32you so much for watching, and I'll see
- 14:33you in the next one.
- 14:35[Music]
- 14:38[Applause]
- 14:40[Music]
About this transcript
This page contains the full transcript of GPT OSS tested: Is it good for algo trading strategies? (+ fully local installation) by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 2,825 words across 382 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.