Gemini 3.5 + MCP = Algo Trading on Autopilot! — Transcript
Full transcript
- 0:00Google just released Antigravity 2.0 and
- 0:03Gemini 2.5 flash model. And according to
- 0:05the benchmarks, it is blowing everyone's
- 0:08mind. Because even though it's a lot
- 0:09cheaper than expensive models such as
- 0:11Claude Sonnet or Opus, it's ahead in
- 0:13most of the benchmarks. But what I care
- 0:15is if I can use this model and this IDE,
- 0:18which is giving me free access to this
- 0:20model for doing real algo trading
- 0:22research. And I don't mean a tool that
- 0:24can control the browser like I did in
- 0:26the past, because that one was a bit
- 0:27slow. Instead, I want an MCP tool that
- 0:30can write the strategy, execute the
- 0:32backtest, look at the results, iterate
- 0:35over it until it can improve the
- 0:37results, give me a comparison of
- 0:39everything that it wrote before, and
- 0:41then complete report of what it did and
- 0:43then what worked. So, in other words, I
- 0:45just want a quant AI to do everything
- 0:47for me. So, maybe I can even run it 24/7
- 0:49to do algo trading for me and find as
- 0:52many strategies as possible. So, in this
- 0:54video, I'm going to show you the exact
- 0:55setup that can do that. Now, I got to
- 0:57say I am not a financial advisor and
- 0:59this video is for educational purposes
- 1:01only. So, with that out of the way,
- 1:02let's get right into the video.
- 1:05All right. So, you have two options. The
- 1:07first one is to use Antigravity as it
- 1:09is, which is no longer an IDE, it's just
- 1:12a desktop app, very similar to Codex or
- 1:14Cloud Code. The other option is to use
- 1:16Antigravity IDE, which is what we are
- 1:18already used to. It is the equivalent of
- 1:20Cursor by Google. In this video, I'm
- 1:22going to show you the IDE version, but
- 1:24the setup is very similar in
- 1:26Antigravity, Cloud Code, or whichever
- 1:28MCP tool that you're going to use. All
- 1:30right. So, here's the agent chat and
- 1:32here's the files of the project. And as
- 1:34always, I'm using Jesse framework for
- 1:36doing the algo trading stuff. Here we
- 1:38can see the models and now we have
- 1:39Gemini 2.5 flash, which is new. It has
- 1:43two modes, high and medium, and I think
- 1:45the medium is more than enough for our
- 1:46use case. All right. Now, I'm going to
- 1:48do the setup very quickly, but if you
- 1:49don't want to see it, feel free to skip
- 1:51ahead to the next chapter, because there
- 1:52are timestamps down below at the video.
- 1:54As you can see, we have a Jesse project
- 1:56here and this is the strategies folder
- 1:59and here we have the .env file of the
- 2:00project. Now, this is not a video about
- 2:03how to install Jesse. I have other
- 2:04videos about that, but there's one thing
- 2:06you need to notice and that is now we
- 2:08have this new environment value called
- 2:10MCP port and also MCP login terminal
- 2:13which by default is set to true. So, if
- 2:15you already have a Jesse project from
- 2:16before, feel free to add these new
- 2:18values. Next, we have this MCP rule file
- 2:21which is how we tell the model like
- 2:23where to look and what to do. And as the
- 2:25time goes, I'm going to update this file
- 2:27with new instructions. So, keep an eye
- 2:29for that. But right now, you don't
- 2:31really need to know this file or read
- 2:33it. You just need to add it in your
- 2:35conversations whenever you are using MCP
- 2:38with Jesse. And that is really easy. So,
- 2:40let's just say MCP rules. That's it.
- 2:42Now, I can just talk to the model and it
- 2:45will use these rules. The other way is
- 2:47to ensure it is attached to every new
- 2:50chat that you you open when you are in
- 2:52this project. And and for that, you can
- 2:54easily rename this file into
- 2:57agents
- 2:58.md.
- 3:00That's it. Now, when I open a new chat,
- 3:01it should be added by default. Like this
- 3:03is how almost every IDE is working these
- 3:06days. But just to be sure, I'm going to
- 3:08still attach it because I don't want to
- 3:11make a mistake in this video. All right,
- 3:13the next step is to run the project and
- 3:15connect the MCP into anti-gravity IDE.
- 3:18So, for that, we're going to have to
- 3:19open the terminal
- 3:20and simply first make sure to activate
- 3:24the correct conda environment. So, for
- 3:26me, it's called Jesse 3.12. And then I
- 3:29will simply say Jesse run. Now, let's
- 3:31make this a little bit bigger. All
- 3:33right, so you see here's the normal
- 3:35address for opening the dashboard of
- 3:37Jesse. So, let's click on this one
- 3:39first. All right, there we go. Now, the
- 3:41first time you do this, you're going to
- 3:42be prompted for a password and by
- 3:44default, it is set to test. And the
- 3:47other value that I care for is this one
- 3:49which is the address for the MCP. So,
- 3:51you see it has the port 9007, but this
- 3:54is because on my machine I have edited
- 3:56the .env file with different ports. But,
- 3:59when you do, this is going to be 9000,
- 4:019001, 9002. So, I have changed them. So,
- 4:04in case you also change them like me,
- 4:06just keep an eye for that. So, for me,
- 4:09again, this is going to be the address
- 4:10for the MCP. So, let's copy this. Now,
- 4:14we're going to need to add it to our
- 4:15IDE. For that, I'm going to click here,
- 4:18and then the MCP servers,
- 4:21then the manage MCP servers.
- 4:24And in this file, for some reason, it is
- 4:26not showing me anything, but it is ready
- 4:28to get me to this server. Now, I'm going
- 4:30to click on view raw config. And here,
- 4:33you can see some examples from the IDE
- 4:35itself. So, let's zoom out a little bit
- 4:37so I can copy this. And by the way,
- 4:38there are two configurations we can use.
- 4:40The first one is for local MCP, the
- 4:42second one is for remote. And the remote
- 4:44is the one that we want. Yes, the MCP of
- 4:47Jesse is served locally on your local
- 4:50host, but still, when adding it needs to
- 4:53say the remote option, because that's
- 4:54the one that uses the HTTP. So, there's
- 4:57another kind of MCP that we are not
- 4:59concerned in this setup. So, let's copy
- 5:01this, close this, zoom in again, sorry.
- 5:04All right, so let's paste it in. Let's
- 5:06close this. All right, so here,
- 5:09actually, the auto complete was just
- 5:11crazy helpful.
- 5:13And again here. So, okay, so I am
- 5:16impressed. So, let's just rename this
- 5:19into Jesse MCP. This could be any name,
- 5:23by the way. This address is the one that
- 5:25we care for, and these headers can also
- 5:28be just empty. Okay, so there we go. All
- 5:32right, now we should have these MCP
- 5:34servers.
- 5:35Let's click on refresh, and there we go.
- 5:38Now, we can see Jesse MCP, and it is
- 5:40indeed enabled. All right, so let's
- 5:42close this window, and go back to the
- 5:45chat interface. And here again, we have
- 5:47selected Gemini 2.5 flash. Let's open
- 5:51these files one more time. All right,
- 5:52now that setup is done, we are ready to
- 5:54ask the agent to do some actual research
- 5:57for us. All right, I have ensured that
- 5:58the agent's MD file is attached, even
- 6:00though I probably don't need to do that
- 6:02because all the IDs attached that by
- 6:04default. And the prompt is, "Please
- 6:06create a new strategy named golden cross
- 6:08strategy, and it should be trend
- 6:10following. You should trade it on the
- 6:12BTC USDT on Binance perpetual futures
- 6:15for 2024 using the 4-hour time frame."
- 6:18Let's hit enter and just watch the magic
- 6:21happen. As you can see, it started using
- 6:23the MCP.
- 6:26I'll say, "Yes, always use it." Yes,
- 6:28always use it. Okay, so it's being a
- 6:30little bit annoying by asking every
- 6:32single time, but I'm guessing this is
- 6:33just for the first time that it tries to
- 6:36use any sort of tool. Let's make this a
- 6:39little bit bigger.
- 6:42All right, I looked it up and I couldn't
- 6:43find any settings for to ensure that it
- 6:46just uses the MCP without keeping to ask
- 6:50for permissions. This is a bit annoying.
- 6:52I might be missing something, so if you
- 6:53guys know where that setting is, please
- 6:54leave it down in the comments. I really
- 6:56want to know that.
- 6:58All right, there we go. So, it created a
- 7:00report file to tell me exactly what it
- 7:03did, and of course the strategy code
- 7:05itself. So, let's take a look at the
- 7:06code of the strategy first. Let's
- 7:08minimize this. All right, so here's the
- 7:10strategy. It defined a fast SMA, a slow
- 7:13SMA, the ATR, and here's the entry rule
- 7:16of the strategy, like whether it should
- 7:17go long or not. And it's saying that
- 7:19whenever the crossover happens, then you
- 7:22want to go long. Whenever the opposite
- 7:24happens, you want to open a short
- 7:26position. It's using 10% of the balance
- 7:29for the position sizing. It is
- 7:31submitting the buy order, the stop loss
- 7:33and take profit. And for those, it is
- 7:35using the ATR indicator, so the stop
- 7:37loss is two times of the current ATR,
- 7:40and the take profit is four times, so we
- 7:41have a win to loss ratio of two. The
- 7:44opposite is for short positions, and
- 7:46then it is saying that whenever the
- 7:48golden cross is no longer valid, we want
- 7:51to liquidate the current position. So,
- 7:52this is perfect code, and it seems like
- 7:55it actually ran the code, and it is
- 7:57giving us some report. So, let's accept
- 7:59this and then read give it a read. So,
- 8:00it designed a trend following strategy
- 8:02based on these criterias. It verified
- 8:05that we have enough historical candles
- 8:07in the database, and then it's ran the
- 8:09backtest. The win rate was 52%. The max
- 8:12drawdown was 1.57.
- 8:14The Sharpe ratio was 0.68. So, these are
- 8:17all good, and here's the conclusion of
- 8:19it. It's also recommending some next
- 8:22steps. So, here's what I'm going to do.
- 8:24Let's open it one more time and say, "I
- 8:27need you to add three more iterations to
- 8:29the strategy. Try to improve the
- 8:31results, and at the end give me a
- 8:33comparison of the results and select the
- 8:35best one." Now, while that's going, I
- 8:37want to quickly remind you guys about
- 8:39our Telegram. It's the fastest way to
- 8:40get notified about my future work,
- 8:42whether it's a new tutorial or a tool
- 8:44that I create. Also, don't forget to
- 8:46check out our free Discord, where more
- 8:47than 5,000 members like you and I are
- 8:50hanging out there and helping out each
- 8:51other with algo trading, so we can all
- 8:53succeed together. The links for both are
- 8:55down in the description.
- 8:57So, let's hit enter. And while this is
- 9:00going, I'm going to open the dashboard
- 9:02of Jesse, so we can actually see the
- 9:04backtest that it just executed. So,
- 9:06let's go to history, and here is the one
- 9:09that it just defined right now. So, if I
- 9:11go here, here we can see the equity
- 9:13chart for it. Here's the scale version
- 9:16of it. Now, the net profit is so low
- 9:19because it's using only 10% of the
- 9:21capital for entering the position, which
- 9:24is not really a good option, but the win
- 9:26rate is good. The Sharpe ratio is not
- 9:28that bad, which means we can easily
- 9:29increase the size of the position to get
- 9:31better results. In fact, we're going to
- 9:32do that just in a second. But, yeah, so
- 9:34far this looks okay. We also have the
- 9:37other charts. Okay, so this is pretty
- 9:39cool. Let's go back to it. Another
- 9:41annoying permission asking. Now, another
- 9:43thing that I think needs some update is
- 9:45that you see whatever it does is this is
- 9:48printing out the outputs and the inputs.
- 9:50Like this isn't super cool. When I use
- 9:52the MCP in other IDEs or tools such as
- 9:54Cloud Code, it doesn't show me these
- 9:56things unless I actually want to see
- 9:58them and I click on them. So, I think
- 10:00this also needs some updating. I think
- 10:03there must be some sort of settings for
- 10:05it to improve this, but I want to just
- 10:07point out that these days I'm not using
- 10:09anti-gravity. It just came out, but the
- 10:12fact that it's giving us this amount of
- 10:15tools all for free is just super cool.
- 10:17All right, so it is done and it just
- 10:20gave us a beautiful table comparing all
- 10:23the iterations. So, this is the
- 10:24iteration number one up until iteration
- 10:26number four. Here's the strategy setup
- 10:29like which parameters and indicators it
- 10:31was using and here here we can see the
- 10:34ending balance. So, clearly the
- 10:36iteration two is the best one, the sharp
- 10:38ratio of 1.76. So, yeah, this one is
- 10:40just super great. Here's the number of
- 10:42total trades, the win rates, profit
- 10:44factor, and it's also like explaining
- 10:47what exactly was used and how effective
- 10:49it was. And then it says that based on
- 10:52the empirical evidence, iteration two is
- 10:54the clear and superior winner and I have
- 10:56restored the active code in the init
- 10:59file to the iteration number two
- 11:01implementation. And it also updated this
- 11:04report file that it just creates for us,
- 11:06which is really beautiful to just read.
- 11:08I can also see the same table to compare
- 11:12the results. Now, this is in markdown
- 11:13format, so we need to enable the preview
- 11:16in in case you want to just read it
- 11:18right here. Okay, there we go. So, yeah,
- 11:21it gave us a report for iteration number
- 11:23one, iteration number two, and three.
- 11:25And there's also a table comparing
- 11:27everything together. So, you don't even
- 11:29need to read everything here. If you
- 11:31miss this or whatever in the future, you
- 11:33can just come back here and read the
- 11:35report that it just wrote for you. And
- 11:37now if I go back to Jesse's dashboard,
- 11:39go to the history page, I can also find
- 11:42this session right here. And here you
- 11:44can see that it's the equity curve was
- 11:46better. You know what? Let's ask the
- 11:47model to include the size of the
- 11:48position so that we can actually see
- 11:50this equity curve cuz this isn't really
- 11:51great.
- 11:52Increase the size of the position in a
- 11:54way that the max drawdown won't be no
- 11:57worse than minus 20%. Okay, so this is
- 12:00really cool. Like I don't even need to
- 12:01touch the code anymore. And
- 12:04this is very different than a normal
- 12:05changing, right? Because now this MCP it
- 12:08has access to the documentation of
- 12:10Jesse. So it's different than the way
- 12:13that you usually change the code in a
- 12:15Jesse project because then it the model
- 12:17might make a mistake. It tries to guess
- 12:19like the indicator problems or things
- 12:21like that. But now it has clear access
- 12:23to the documentation. And whenever it
- 12:26makes a change, it actually runs the
- 12:28code to ensure that it works. Now,
- 12:30here's the fun part.
- 12:31We just ran out of the free credit. So
- 12:35this is also a good
- 12:36demonstration of like how much limits
- 12:39you actually have because guys, I
- 12:41started using this thing just when I
- 12:43started the video. I mean I did test it
- 12:45in other IDs, but with this ID this is
- 12:47the first time I tried it. So we can
- 12:48clearly see how much free credits are
- 12:51given to us. Now, for the remaining of
- 12:53the video, I'm going to do the edits by
- 12:56my own hands. So let's just come here
- 12:59and Okay, it seems like it actually did
- 13:01make changes because it's showing that
- 13:03it is now using two times of the current
- 13:05balance, which is good. In other words,
- 13:07it's going to use some leverage, which
- 13:09is perfectly fine because the max
- 13:11drawdown of the strategy wasn't high in
- 13:13the first place. So let's just open the
- 13:14dashboard one more time and run it.
- 13:18And there we go. So now we can see the
- 13:20equity curve. It is now producing 73% in
- 13:23profit. Max drawdown is minus 18%, which
- 13:25is exactly what I asked the model to do
- 13:27and the Sharpe ratio is 1.75.
- 13:30The drawdown periods are just fine and
- 13:32here are also the monthly returns heat
- 13:34map where we can see like how much the
- 13:37strategy made in every single month.
- 13:39Now, obviously I just over simplified
- 13:40everything and I'm not going to trade
- 13:42this strategy just yet. In reality
- 13:44you're going to want to pay for a plan
- 13:46in order to be able to run these
- 13:48research sessions for longer periods of
- 13:51time because you want the model to keep
- 13:53writing and modifying the strategy until
- 13:55it finds the best ones. The other thing
- 13:57is that right now I just use it to write
- 13:59the strategy and the backtest and just
- 14:01compare the results and give me the best
- 14:02one. But this is just the beginning of
- 14:04the MCP integration for Jesse. Now
- 14:06imagine if you could ask the model to
- 14:08run optimizations to find the best
- 14:09parameters and then it could maybe run
- 14:11Monte Carlo simulations on it to ensure
- 14:14that the results that it is giving you
- 14:16is not overfit. Like that's going to be
- 14:17a complete quant which is ready to do
- 14:20research for you like 24/7. So I
- 14:22couldn't be more excited about the setup
- 14:24and the future of this for it. And even
- 14:26though the limits for the free plan
- 14:27wasn't like that much, it still I am
- 14:29thankful to Google for giving us this
- 14:31tool for free. Now before I leave you
- 14:32we're going to have a giveaway. A random
- 14:34subscriber who likes the video and posts
- 14:36a comment is going to win 1 million BONK
- 14:38token. All right, let's pick the winner
- 14:39from the previous video.
- 14:43And the winner is need more videos like
- 14:45this, very helpful. Thank you so much
- 14:46for your comment. Please reach out to me
- 14:48so I can send you your BONK tokens.
- 14:49Thank you so much for watching. I'll see
- 14:51you in the next one.
About this transcript
This page contains the full transcript of Gemini 3.5 + MCP = Algo Trading on Autopilot! by Algo-trading with Saleh, generated from the public captions YouTube serves with the video. The transcript has 3,041 words across 414 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.