MIT Researchers Built An AI Hedge Fund (Here's How To Use It) — Transcript
Full transcript
- 0:00MIT and UCLA researchers have created
- 0:02the very first true AI trading
- 0:04framework. It's called Trading Agents.
- 0:06It's run out of a lab called TA Research
- 0:08and it basically acts as an AI hedge
- 0:10fund. It's a team of AI agents,
- 0:12analysts, researchers, traders, and a
- 0:15risk manager with each one handling a
- 0:17different part of the trading desk. So,
- 0:19all you have to do is give a ticker or a
- 0:21list of tickers from your portfolio or
- 0:23watch list, and you'll see the entire
- 0:25team of agents work through the company
- 0:26and come back with research and
- 0:28recommendations. So, in this video, I'll
- 0:30show you how to actually use it and how
- 0:32to set it up on Hostinger so that you
- 0:34can always use it even when your
- 0:35computer isn't on. And don't worry if
- 0:38you have no coding background as I'll be
- 0:39running through all the prompts step by
- 0:41step to get it set up. Now, if it's your
- 0:43first time on the channel, my name is
- 0:44Brendan. I studied math and econ at
- 0:46UCLA, worked in investment banking for 3
- 0:49years, and have spent the past 2 years
- 0:51building out trading systems for my
- 0:52clients. And as always, this video is
- 0:54not financial advice, and I'm not
- 0:56guaranteeing any profits. So starting
- 0:58off, this project is fully open source,
- 1:00meaning that you can dive into the code,
- 1:02make any changes you want, and more
- 1:03importantly, it's completely free for
- 1:05you to use. What I have here is the
- 1:07actual GitHub repo. And if you're
- 1:08unaware, GitHub is just where the code
- 1:10for a project lives online. The
- 1:12researchers behind Tar Research are
- 1:14Yasao, Edward Sun, Dua, and Wei Wong.
- 1:18And their affiliations are from UCLA and
- 1:20MIT. So here inside the repo, you'll be
- 1:22able to see how they designed the
- 1:23project, which is Trading Agents, how
- 1:25they tested it, and all the information
- 1:27around code changes that they've made or
- 1:29the source code as a whole. Now, because
- 1:31Trading Agents is fully open source,
- 1:33you'll be able to see all of the source
- 1:35code here, as well as any new releases
- 1:36they have. So you can see that version
- 1:385.0 just released 4 days ago. Now,
- 1:41anyone can download this repo, read
- 1:42exactly how each agent is instructed
- 1:44here, and then see how information from
- 1:47one trading agent to another gets passed
- 1:48on. One thing to be clear up front is
- 1:50that even though the project is free and
- 1:52open source, it doesn't mean that
- 1:54running it is free. Because each of
- 1:56these agents are going to be attached to
- 1:57an AI model, those calls will cost money
- 2:00per use. It can be from a few cents to a
- 2:02dollar per run depending on the types of
- 2:04AI models that you'll use. But later on
- 2:06in the video, I'll show you the best
- 2:07cost to performance ratio as to what you
- 2:09should use inside this project. I'll
- 2:11include the direct link to the GitHub
- 2:13repo in the video description so that
- 2:15you can go in, see the source code, and
- 2:16run it yourself. And if you are
- 2:18interested in learning how to run or
- 2:20build off of more AI trading frameworks
- 2:22or even building out your own AI trading
- 2:24system, I've included a link in the
- 2:26description to my school community. I
- 2:28currently run the largest AI focused
- 2:29trading community on school that covers
- 2:31everything from stocks, options, crypto,
- 2:33and futures. So, make sure to click the
- 2:35link if you're interested. Now, before
- 2:37we run anything, this is the actual
- 2:38structure of trading agents. What we're
- 2:40running here is basically an AI research
- 2:42desk. So, we have 12 different agent
- 2:44rules that are all connected to one
- 2:46workflow. So basically each individual
- 2:49agent here calls an assigned AI model
- 2:51with its own instructions and just the
- 2:53information it needs for its very
- 2:55specific job. And if we were to dive
- 2:57into every single agent, the market
- 2:58analyst here just looks at price and
- 3:00indicators. The fundamentals analyst
- 3:02looks at financial statements, so
- 3:04revenue, margins, debt. The news analyst
- 3:06goes through the headlines. And then the
- 3:08sentiment analyst looks at whatever
- 3:10discussions it can pull up. So what
- 3:11people are actually saying about a
- 3:13certain company. The reports are then
- 3:14fed into two researchers here. So the
- 3:17bull researcher builds the positive case
- 3:19basically why you'd buy something and
- 3:21the bare researcher below pushes back
- 3:23and looks for everything that could go
- 3:25wrong. And then the research manager
- 3:27here sits in between and weighs both
- 3:29sides and then forms an actual
- 3:30investment view. And then finally the
- 3:32trader here takes that view and then
- 3:34turns it into proposed plan. From that
- 3:37proposed plan three different risk
- 3:38reviewers look at the plan from three
- 3:40different angles. So we have aggressive,
- 3:43conservative and balanced. And then
- 3:45finally, the portfolio manager here
- 3:47reviews all of that and then produces
- 3:48the final recommendation. So how this
- 3:50differs from just chat GBT or Claude is
- 3:53that if you were to ask them a bull and
- 3:54bear case, you're going to get one
- 3:56answer from that conversation. What
- 3:58Taric research here does instead is that
- 4:00it runs a defined chain of separate
- 4:02agents and each one has a specific
- 4:04responsibility, passes the work from
- 4:07stage to stage and then saves every
- 4:08report along the way. Now, one important
- 4:10core concept here is that the models
- 4:12that we largely discuss on the channel
- 4:14are deterministic, meaning that they
- 4:16have fixed rules and you're able to back
- 4:18test them with this system here.
- 4:20Instead, we have 12 different agents
- 4:22that are all non-deterministic. This
- 4:24means that their answers will slightly
- 4:26vary each time you ask the same
- 4:27question. And because of that, there's
- 4:29no true way to actually back test this.
- 4:31And this is why later on in the video,
- 4:33I'll recommend you potentially use this
- 4:35as part of research when looking at your
- 4:37overall long-term portfolio rather than
- 4:39something that just has strict rules for
- 4:40intraday trading. Now, let's go over how
- 4:42to actually run trading agents. So, as
- 4:44you can see here, this is what the
- 4:46interface looks like. We can see the
- 4:48workflow steps are first the analyst
- 4:49team, then the research team, then it
- 4:51goes to the trader, the risk manager,
- 4:53and then finally the portfolio manager
- 4:55agent. And on step one, all you need to
- 4:57do is type in the ticker. And then if
- 4:59you need to, you can also include the
- 5:00exchange suffix. But just to showcase,
- 5:02I'll type in Nvidia. Press enter. Then
- 5:06for step two, it's going to ask for the
- 5:07analysis date. We'll just keep it as of
- 5:09today, which is September 21st. So click
- 5:11enter as well. Then we can select the
- 5:13analyst team. So you would click space
- 5:15on all the teams that you want to
- 5:16include. So if you want a market
- 5:18analyst, you would click space and then
- 5:20you would go down. And then if you want
- 5:21a sentiment analyst, you would click
- 5:23space. You'd also click space for the
- 5:24news analyst and the fundamentals
- 5:26analyst if you want all of these agents
- 5:28running. And then here we can see that
- 5:29it's actually going through all of the
- 5:31different steps. So all of the agents
- 5:33are running. You can see the progress
- 5:34between the analyst team and the
- 5:36research team. You have the agents here.
- 5:38You can see what's in progress, what's
- 5:40in pending, and then all the messages
- 5:42and tools as well. Now, while we wait
- 5:43for this to run, the way you would use
- 5:45this is that for example, if you were
- 5:47interested in a ticker like Nvidia or
- 5:49say Service Now, Coreweave, Micron, what
- 5:52you would do is type in the tickers or
- 5:54you can type in a list of tickers that
- 5:55are in your portfolio. So, you do the
- 5:57same thing for all of the different
- 5:58tickers that you want to know more
- 6:00about. And I treat this as research on
- 6:02longerterm positions. And then one thing
- 6:04to note is that each company goes
- 6:06through its own research cycle. And
- 6:08every run uses paid model calls. So if
- 6:10you want to run this on six names,
- 6:12you're paying for six different
- 6:13analysis. Now, as you can see, it
- 6:14finished the market analyst and it also
- 6:16finished the sentiment analyst, news
- 6:17analyst, and fundamentals analyst. So
- 6:20what we saw was only one part of it.
- 6:22Current report here is now inside the
- 6:24research team. Um, it's currently gone
- 6:26through around 6 minutes of analysis. So
- 6:28again, this kind of strengthens why I
- 6:30said you wouldn't use this for intraday
- 6:31trading since it wouldn't be too helpful
- 6:33to have this run for 10 minutes at a
- 6:35time before deciding what to do during
- 6:36the day. But this is pretty in-depth.
- 6:39Each agent has its own tasks and I'll go
- 6:41ahead and share all the reports once it
- 6:43finally runs through everything. Now
- 6:45finally after 8 minutes we can see that
- 6:46the analysis is complete. So it ran
- 6:49through all 12 agents. It used 17
- 6:51different LLMs, 29 different tools. The
- 6:54amount of tokens are here. The reports 7
- 6:56out of seven and then the total runtime
- 6:58was 8 minutes. So like I explained
- 7:00during the structure, this portfolio
- 7:02manager agent is the last one that reads
- 7:04through everything and the final rating
- 7:06was hold. I'll go through some of the
- 7:08other sub aents, but some set to buy,
- 7:09some set to hold, and then this
- 7:11portfolio manager agent is the one that
- 7:13makes the final decision. This tells you
- 7:15to maintain Nvidia at a neutral
- 7:16portfolio weight. You have the
- 7:18investment thesis as to why it's saying
- 7:20this. So, this includes all the macro
- 7:22market analysis, individual technical
- 7:24analysis, as well as fundamentals about
- 7:26the company. So, now what we want to do
- 7:28is save this report. And this is the
- 7:30final report. So, this is what every
- 7:31individual agent went through. We first
- 7:33have the company market profile. This is
- 7:35just all the basic stats that we need.
- 7:37Then we have the latest quarterly income
- 7:39statement. This is just needed for the
- 7:40fundamental analyst. So let's just go
- 7:42ahead and scroll through all these
- 7:43fundamentals since this is the data in
- 7:46to form either the bull or bear case
- 7:48that I explained. So if you scroll all
- 7:49the way down into section 8, we have the
- 7:51bull case of Nvidia. We have the bare
- 7:54case of Nvidia. So these are all the
- 7:56different components that go into what
- 7:58the next agent thinks about. So here we
- 8:00can see that the initial recommendation
- 8:02was to buy based on the bare and bull
- 8:04case of fundamentals. This is all the
- 8:06interpretations of Nvidia. But then we
- 8:08move on to the research team. This again
- 8:10is an entirely separate subset of
- 8:12agentic teams that have a bull
- 8:14researcher. Then if we scroll down we
- 8:16have a bear researcher as well. So when
- 8:18you run this yourself feel free to read
- 8:19through all of these reports since this
- 8:21is important for you to decide what to
- 8:23ultimately do. Um I'm not going to do
- 8:25that cuz I don't want this to be a
- 8:262-hour long video. So I'll just scroll
- 8:28through the bear researcher as well, but
- 8:30it's important to know that all of these
- 8:31just feed into the next step. So while
- 8:33we have the fundamental analyst saying
- 8:35buy, this research manager is saying
- 8:37hold, and then we have a trader that has
- 8:39a completely separate decision of hold
- 8:41as well. All of this goes all the way
- 8:44down into the portfolio manager with the
- 8:46final recommendation. This way you don't
- 8:48just see this final output of hold, you
- 8:50see all the different components that
- 8:52flow into it. see if you agree or
- 8:54disagree with each one, but each one
- 8:55does have its own intelligent process
- 8:57and thinking, meaning that none of, for
- 8:59example, the fundamental analyst will
- 9:01ever impact or affect what the market
- 9:03analyst thinks and nothing that the
- 9:05market analyst thinks will ever impact
- 9:06or affect what the next agent thinks.
- 9:09And the way I would think about this
- 9:10again is to run this for fairly
- 9:12long-term positioning. Here we can even
- 9:14see the time horizon is to hold for 3 to
- 9:166 months. If you want to, you can rerun
- 9:18the same analysis every single day
- 9:20depending on how many tokens you want to
- 9:22spend or every single month if you have
- 9:23a more long-term portfolio. Now, if you
- 9:26want to do multiple tickers, so for
- 9:28example, if you have a watch list or
- 9:29your entire portfolio, you can use this
- 9:32tool called watch list research from
- 9:34Trading Agents, it's the same exact
- 9:35thing as what I just ran through, except
- 9:37now you can input multiple tickers. And
- 9:40because I'm running this through
- 9:41Hostinger, which I'll show you how to
- 9:42set up later, all the reports will be
- 9:44saved on this VPS. So, we have a save
- 9:46decision journal and then once you want
- 9:48to input more tickers, it'll all be
- 9:50saved inside the same VPS. And even
- 9:52though there's no inherent back testing
- 9:54with these non-deterministic systems,
- 9:56this trading agents tool from the TA
- 9:58research team does have the ability to
- 10:00go back in time and see what this model
- 10:02would have said about a ticker, say a
- 10:05month ago, a year ago, or even further
- 10:07out. So, in step two, after you input
- 10:09the ticker, you can input the date. So,
- 10:11I would say this is the closest thing
- 10:12you could get theoretically to a back
- 10:14test. Now, one last thing before I show
- 10:16you how to set this up yourself is that
- 10:18this shows the different costs as well
- 10:20as models you should use for the
- 10:22structure. In that initial run I just
- 10:23did, I used GPT 5.6 soul for everything.
- 10:27But, as you can imagine, it gets pretty
- 10:28costly. Down here, there's a chart
- 10:30showing the cost. So, per 1 million
- 10:32tokens, it's $4 and the output is $20.
- 10:35For this run, we used around 100,000
- 10:37tokens. So, the total cost was $1.26.
- 10:40Now, obviously, if you have a watch list
- 10:42and you're running this every single
- 10:43day, it's going to cost you a few
- 10:44dollars every single day. But that's why
- 10:46I would recommend something like Kimmy
- 10:48K2.6, this is significantly cheaper than
- 10:51GPT 5.6 Soul at only 95 and $4 per 1
- 10:55million tokens, meaning that it's around
- 10:5780% cheaper. So, something that could
- 10:59cost a dollar per run would be closer to
- 11:0110 or 20. Now the performance between
- 11:03the two are very similar. But if you do
- 11:06want to, for example, have the strongest
- 11:08models on certain managers. I
- 11:10highlighted these orange as deep
- 11:12managers. So the portfolio manager and
- 11:14research manager, these are the two
- 11:16agents that actually take in most of the
- 11:18information and make the most thorough
- 11:19outputs as well. And because of this,
- 11:21these are the two managers that I would
- 11:23recommend having the strongest possible
- 11:25models for. So an example of how this
- 11:27could look like is having Kimmy on every
- 11:29single model here and then switching
- 11:30over to 5.6 6 soul as the research
- 11:32manager and then again Kimmy on all of
- 11:34these and then once again switching back
- 11:36to 5.6 soul for the portfolio manager
- 11:39and when I set this up in chat GBT or
- 11:41claude you'll be able to see that you
- 11:43can configure every single model
- 11:44differently for each agent if you do
- 11:46want this to run all the time without
- 11:48your computer needing to be on. You can
- 11:50use a VPS like Hostinger. So I'll go
- 11:51ahead and show you the setup through
- 11:53creating your own server which plans to
- 11:55sign up for and then connecting
- 11:56everything together. Now, what I would
- 11:58do is first go over to the link
- 11:59hostinger.com/ipipathways10,
- 12:02which will also be in the description.
- 12:04And then once you're on this page, you
- 12:06can go ahead and choose plans for your
- 12:07virtual private server. And for what I
- 12:09used in the beginning of the video for
- 12:10the demo, I used KVM2 since it's the
- 12:12perfect mix of CPU and RAM usage. But if
- 12:15you do see yourself needing either more
- 12:17RAM or CPU, you can go ahead and
- 12:18upgrade. But for our choices here, we
- 12:20can even start with one or two depending
- 12:22on how many watch list or workflows you
- 12:24want to enable with this. Now, the cost
- 12:26is around $10 per month to have your own
- 12:27VPS, which again will always stay on
- 12:30versus running something directly on
- 12:31your computer. And if you haven't
- 12:33already, I recommend watching my Hermes
- 12:35video that I made a few months back
- 12:36since it goes over the entire setup
- 12:38similar to this. So this way, your
- 12:40Hostinger VPS isn't just used for this
- 12:42one specific task. You can have your
- 12:44server run Hermes, Trading Agents, or
- 12:46any other projects that you want
- 12:47directly on the cloud versus on your
- 12:49local computer. And if you do want a
- 12:51coupon code just to save a bit of money
- 12:52on the 12 or 24month plans, you can just
- 12:55type in AI Pathways here and click
- 12:57apply. This way you'll get 10% off the
- 12:58cost to have your VPS up and running.
- 13:00Now, once everything looks good, you can
- 13:02just go ahead and click continue. Now,
- 13:03after you choose your plan, it should
- 13:05prompt you to go through the one-time
- 13:06setup wizard where you would first
- 13:08choose a location for your server. After
- 13:10all that, you should be taken to this
- 13:12page where you can see your server
- 13:13successfully running. So, you have your
- 13:15IP address, the status of the server, as
- 13:17well as when it expires. Then all you'll
- 13:19need to do is go ahead and to click
- 13:21manage and then go to the web console.
- 13:23It'll then open up this console where
- 13:24you can type in terminal commands to
- 13:26download Python to be able to run the
- 13:28repo. This is also where you would
- 13:30download all the contents of that repo
- 13:32and be able to run it directly inside
- 13:33this window here. Now the next step
- 13:35could either be super simple or you can
- 13:37type in the commands yourself. Since I
- 13:39want to make this as simple as possible
- 13:40for people on the channel, we can go
- 13:42ahead and literally ask Chat GBT codeex
- 13:45to do this for us. If you're on any sort
- 13:47of paid plan through chatbt, it can go
- 13:49ahead and access Chrome, which is your
- 13:51browser, and be able to run all the
- 13:52commands for you. But if you don't have
- 13:54a Chat GBT or clawed account, then you
- 13:56can go ahead and just manually type in
- 13:58the commands here as well. I'll go ahead
- 14:00and flash them on the screen. But just
- 14:01to show you how simple this can be, let
- 14:03me go ahead and open Chad GBT codeex so
- 14:05you can see all the commands it's going
- 14:06to run. Now, the next step is super
- 14:08simple. Make sure to open Chad GBT
- 14:10codeex on your desktop. This is what
- 14:12allows Chad GBT to control your
- 14:14computer, look through your browsers,
- 14:16and in our case, look through our Chrome
- 14:17browser, which is where we set up the
- 14:19HostNerVPS. Then all we need to do is
- 14:21say that our hostingervp is ready in
- 14:23Chrome. We want to install trading
- 14:24agents from and then the GitHub link on
- 14:27it. We want to use Kimmy K2.6 as our
- 14:29model. So it will stop us before the API
- 14:32key selection part where we can type in
- 14:34our own API keys securely. And then
- 14:36finally, we want to keep the original
- 14:38project code unchanged and to stop
- 14:40before ever running any analysis. So all
- 14:42you have to do is click enter here and
- 14:44it'll actually go into your Chrome and
- 14:46set up all the commands for you. So here
- 14:48we can see that chat GBT is now running
- 14:50through all the commands needed. So I'm
- 14:52not touching anything. We can see that
- 14:54chat gbt started debugging on this
- 14:56browser. It's running its own commands
- 14:57to be able to install the repo and get
- 14:59it ready for us. And then again, if you
- 15:01don't want to use chat GBT, just run the
- 15:03same exact commands that it did here,
- 15:05and you'll be able to use it as well. So
- 15:07next, it's gone ahead and installed
- 15:08everything for us. And this is where we
- 15:10can securely type in our API keys. So
- 15:12when prompting with Chad GBT, we told
- 15:14them to use Kimmy K 2.6. But obviously,
- 15:17if you want to change this to OpenAI,
- 15:19just type in your OpenAI key here and
- 15:21then have Chad GBT or you can do this
- 15:23yourself change this to the exact chat
- 15:25GBT model. And the easiest way to
- 15:27actually use that Kimmy 2.6 6 API key is
- 15:30to get it from open router which is the
- 15:32website here. You'll be able to access a
- 15:34bunch of different API keys. So just
- 15:36choose the one that you feel fits best.
- 15:38In my opinion, Kimmy is probably the
- 15:40cheapest value option that you can
- 15:42reasonably use inside this model. And
- 15:44then down here below, you can actually
- 15:46set Fred API keys as well. So this is if
- 15:49you need macro data. So that's one of
- 15:51the agents that I showed in the
- 15:52beginning of the video that actually
- 15:53looks at macro sentiment and macro data.
- 15:56So, if you want to have that, just go
- 15:57ahead to this link right here,
- 15:59fred.saint louisfed.org. So, this API
- 16:02key is completely free. You just need to
- 16:04make an account here as well. And then
- 16:05once you submitted all your API keys,
- 16:07you're pretty much good to go to start
- 16:08running this yourself. Then once you
- 16:10finish inputting the API keys, you can
- 16:11let Chad GBT know that it's ready and
- 16:13it'll go ahead and run this trading
- 16:15agents for you. Now, this is again for
- 16:17Hostinger if you want your own VPS and
- 16:19you can combine it with something like
- 16:20Hermes or another scheduler to make sure
- 16:23that this runs every single day and
- 16:24input it into your own agentic
- 16:26workflows. But if you want this just to
- 16:28be local on your computer without a VPS,
- 16:30you can do the same exact steps. The
- 16:32only thing that's different is that you
- 16:33wouldn't need to configure Hostinger as
- 16:35a VPS. You can just save everything
- 16:37directly to your computer. So, open up
- 16:39VS Code, use Claude Code, or use the
- 16:41Codeex app once again. Tell them to
- 16:43install and run everything for you. but
- 16:45this time again not through Hostinger.
- 16:47You would just download it all directly
- 16:48on your computer. Now, if you found this
- 16:50video helpful, make sure to leave a
- 16:51like, comment, and subscribe as it
- 16:53greatly helps out the channel. And like
- 16:55I mentioned in the beginning of the
- 16:56video, if you do want to dive deeper
- 16:57into using AI for trading as well as
- 16:59investing, make sure to click the link
- 17:01in the description.
About this transcript
This page contains the full transcript of MIT Researchers Built An AI Hedge Fund (Here's How To Use It) by AI Pathways, generated from the public captions YouTube serves with the video. The transcript has 3,857 words across 539 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.