transcribe

Ep. 375: Bilal on How to Use AI to Turbocharge Your Market Analysis

Macro Hive · 19m · transcribed Sep 2026
More from Macro Hive Business
𝕏 Share ▶ YouTube 📥 PDF 🤖 .md

Section Insights

# 0:00

Introduction to MacroHive and AI in Financial Markets

What is the focus of this podcast episode?

Bilal Hafeez discusses how he utilizes AI for research and market analysis, addressing common inquiries about effective AI use in finance.

  • MacroHive has launched a new regulated business called MacroHive Markets.
  • The podcast will explore the integration of AI in financial research.
  • Bilal will cover six key themes related to AI and market analysis.
# 3:51

AI as a Coding Superpower

How does AI enable coding for everyone?

AI allows users to input natural language prompts that can be translated into code, making coding accessible to a broader audience.

  • Natural language prompts can be converted into programming languages like Python.
  • AI democratizes coding, similar to how Excel was adopted in finance.
  • Everyone can leverage AI to enhance their coding capabilities.
# 7:43

Utilizing Skills in AI

What are skills in the context of AI, and how can they be used?

Skills are predefined prompts that can be easily accessed and reused in AI interactions, streamlining repetitive tasks.

  • Users can create skills for frequently used prompts to save time.
  • Examples include summarizing articles or applying design principles to visualizations.
  • Skills enhance efficiency and consistency in AI interactions.
# 11:35

The Importance of Memory and Continuous Work

Why is memory important in AI, and how can continuous work be utilized?

Memory allows AI to retain context from previous interactions, while continuous work enables AI to perform tasks autonomously.

  • AI can remember user preferences and past interactions for better responses.
  • Continuous work allows users to delegate tasks to AI, freeing up time.
  • This capability can replace traditional junior analyst tasks.
# 15:27

Creating a Knowledge Base with AI

How can a knowledge base improve AI performance?

A knowledge base helps AI provide timely and relevant information, reducing errors and ensuring up-to-date responses.

  • Implementing a rag system can enhance the accuracy of AI outputs.
  • Timeliness is crucial in financial markets; AI can filter information based on recency.
  • A well-structured knowledge base can significantly improve research efficiency.

Transcript

0:01 Welcome to the MacroHive Conversations podcast. I'm Bilal Hafeez, head of strategy at MacroHive. Before we dive in, a quick update. Following MacroHive's acquisition by the BGC Group, BGC has launched a new regulated business called MacroHive Markets. For the first time, onboarded clients can also access execution services via MacroHive Markets. This new workflow will allow macro institutional investors to benefit from strategy and quant insights alongside access to global liquidity. Please contact Andrew Simon or Keiran Brian on Bloomberg or click the link in the description below for more details on MacroHive Markets and its service offering.

0:39 On this podcast episode, I'm going to flip the script and I'm going to talk about how I use AI to do my research and market analysis. And this is because I've been inundated with questions in recent months about what is the best way to use AI in doing work for financial markets and what are the specific use cases. So, I thought I'd take up this opportunity to go through my process. I'll be using slides as well to sort of demonstrate some of the flows I use. So, if you're on YouTube, you'll be able to view the slides. Otherwise, you can ask me for the slides and I can email them over to you. Essentially, I'll talk about six broad themes. The first is how AI provides a new superpower, which is that it allows everyone to essentially code.

1:26 The second is around how to use prompts. The third is using skills. The fourth is the importance of memory within your AI system. The fifth is around how to use co-work and other continuous agent systems. And finally, I'll talk about adding your own knowledge base or rag systems to your overall process. So, here we go. Now, one of the important things to note about large language models and AI, and this is for me is perhaps the most important thing about AI is that essentially it democratizes coding and programming. So, if we go back from a historic perspective and you think about movies like Imitation Game with Benedict Cumberbatch, you'll see that in the '40s and '50s computers were essentially these big machines where you had people poking the machines, inputting wires like transistors on on on the old radio and telegraphy systems trying to get the computer to work. Then we move to machine code with ones and zeros. Then as time went on, we moved more towards language that looked closer to English when it came to coding. So, in the '50s to '70s we started to see the development of assembly language where you started to have you could input words like MOV for move or ADD for add and so on.

2:52 Then later we had the development of object-orientated languages which allowed you to compress complex concepts together. And then in the '90s we had Python which again allowed you to abstract higher language to do more coding tasks. however, despite all of that you still needed to have some understanding of how to speak computer language. it's much like if everyone had to be able to speak Latin to operate something.

3:27 not the whole population would be able to do that. so, today you have computer scientists who are trained to do the coding, but it does restrict the number of people that can use that. and in some ways up until recently the whole approach was to try to get humans to speak like machines. For me the big revolution with large language models in AI is that finally machines can speak like humans. So, what this means is I or anyone else can just type in something in a prompt like how you would speak naturalistically, and then the large language model will translate that into code. Maybe it's Python, then downstream it would go into C and then machine code. So, this for the first time we're now able to have coding in natural English language. And for me, that is an underappreciated superpower that AI is now giving you.

4:25 And this should then allow almost everybody to be able to code through using a large language model. At the moment, developers are using this at a very effective level, but I think going forward almost everybody will start to do this. And as we saw in earlier years when people were using Excel in financial markets a lot, in recent years younger people tended to use Python. Now, there's no excuse for anyone to to now use large language models which could then be used to create Python code which in turn would allow you more easily to use machine learning techniques or advanced econometrics and so on. So, this is really the the first important principle to note that you have no excuse not to code anymore because coding is essentially your natural English language. So, this is the first principle that I think is very important to to understand. Now, the second thing I think it that is important is the importance of prompting.

5:26 And what's important here is that there is a technique to to good prompting. And there's all sorts of different techniques one can use when you prompt, but I use what's called a clear template. And there's it's an acronym, you can use other acronyms as well. So, So what clear stands for is that when you do write a prompt, I what you input into that box that appears when you open up a Claude or chat GPT, the C stands for context. So you give your background. So I am looking at this market because I'm want to understand inflation trends and so on.

6:08 The L in clear stands for length and format. So you specify I only want this to be 150 words and I want bullet points. E is example. So you should give some examples of how you you want the output to look. A is ask it to think first. So you say think step by step and then R is assign a persona. So you give your role. So you could say I'm a portfolio manager, I'm a trader and so on. So clear stands for context. Always provide a context the why you asking for this prompt. L length, E example, A ask it to think and R the role or persona.

6:44 So that's a good way of constructing a prompt and that goes a long way in ensuring that the large language model gets you the answer that you want. The other part of writing your prompt is to have some kind of evaluation and I think this is something a lot of people forget to do. So whenever I do come up with a prompt, what I normally do before I come up with a prompt is I do the exercise myself as a person. So for example, if you have some kind of prompt that summarizes text, what I would do before that is I would get three pieces of text, three articles. I'd summarize it myself. So that's the gold standard that I want my LLM to match. I would then construct the prompt, see what the output is and if it matches the way I summarize things, then I'd be happy with that prompt. If it doesn't, then I'd refine the prompt by changing the language in the prompt until it gets closer to what my prompt was. So this is introducing the idea of evaluation into process of using large language models, and I think this is something many people forget, and this is something I get all of my interns to do when they join the team.

7:52 Now, the next important idea I like to use is skills, and this has become very popular so far this year. And whether you look at ChatGPT or whether you look at Claude, there's a function within there called a skill. And what a skill is essentially is that if you have certain prompts that you tend to use a lot on a repeated basis, you can convert that to a skill, which means that you can just call up that skill at any point when you're working with a large language model, and then automatically that prompt that you have stored somewhere will will appear, and that will run. So, for example, I have a certain prompt I use to summarize articles. rather than me keep typing that out again and again and again, I now have a skill called article summarize, and so whenever I want an article to be summarized, I type in {forward-slash} article summarize, and then that prompt that I've stored will appear, and that will be used to summarize the article. I have another prompt which I developed recently, which uses a certain design principles by the legendary design specialist Edward Tufte, who's done He's probably the leading expert on how to visualize data.

9:11 And through his works, I've derived certain prompts, a language of a prompt, that would reflect changing charts to his design principles. So, whenever I do have a chart, I basically tell the LLM to use Tufte's design skills. So, again, {forward-slash} Tufte-skill is the way what I've called it, and then out will appear the chart that is formatted in that way. So, that's a third one, skills. The fourth one is memory. And this I think is under appreciated by most people. And the importance here is that in the background large language models today keep a memory of what you've been doing. But there is a way for you to customize that and enhance that. and so that's something I do a lot. So, what I do is that whenever I do a piece of work, I then say, "Is there anything in this conversation that you, the language large language model, has learned about me?" and then I ask it, "What have you learned?" will say, "Okay, now I've realized that you are really into design principles." So, I tell it then add that to the memory of the system. So, that going forward it will remember that I am sensitive to design principles rather than whenever I start a new session it forgetting that. So, in essence what memory does is that every time you start a new session it remembers what you did in the last session. If you don't have the memory, what will happen is that the session will start as if it's a blank slate. It won't remember what you did before. So, it's really important to to use memory and I use it in all sorts of different ways. So, for example, one thing I do is every week I ask my LLM to review all the conversations over the past week. What have you learned about me? What errors have you made? How would you improve yourself?

11:12 And derive memories or language I can use in the memory that we can use going forward. So, then the large language model or the AI will then review everything and will come up with five or six points then I will then add that to the memory. So, what I've done here is I've introduced a feedback loop where it's self-learning in some ways, and I can automate that as well. So, that's a fourth idea I I think is essential for using AI effectively. The fifth one is continuity. So, I talked about memory, which is around when you open a session, there's it remembers what you did before. The other one is continuous work. And this is called work in ChatGPT or Cohere work in Claude. And what this allows you to do is it allows you to get the AI and its various agents to do work work for you while you are sleeping or while you're away from your desk. So, one simple example of this is schedule actions. So, what what I do, for example, I've done this on Cohere work on Claude, where I have a daily job that runs. I basically say I told Cohere work that each morning at 6:00 a.m., send me a summary of the best 10 academic papers, and I've given it the addresses of various academic paper sites, and send it to my Gmail account. So, every day, off it goes, the agents of the AI, it reads all those articles, summarizes them all to the standard I want, and then it sends me an email. So, that's one example of Cohere work in in action or continuous actions. The other thing I do is while I'm away from my desk and I want it to do some work for me, I go to my Cohere work, which is linked to my desktop, and just ask it, "Can you crunch these numbers, do some seasonal adjustment analysis? Once you've done that, write it all up and send it to me on email so I can review."

13:16 So, while I'm away from my desk, it can start to work on on on on those types of things. And I think it's really this type of work which is really hurting analysts. In the past, I would have delegated this work to my junior or my junior analyst to do this work, and now no longer do they necessarily need to do this as I have my AI doing that work for me. Now, finally, the sixth point that's very important is adding your own knowledge base to the large language model. So, if you don't give it your own knowledge base, what happens to a large language model is that it either uses its own training set, which is the whole internet historically, to answer a question, or it will go to the internet directly, today's internet, to answer that question for you. Now, the problem with that is that there could be a reliability problem. It could go to sites that you don't trust or may not be as rigorous as what you want. So, you want to do What you want to do is create your own knowledge base.

14:16 And there's something called a rag system. It's a fancy name for essentially creating a database of all the documents that you trust, that's updated regularly, and a rag is a mechanism for the large language model to pull out the relevant bits to help you answer any given question. So, what I've done is I set up a system where I pull all the research that the IMF produces, the BIS produces, all the different central banks produce, different substacks I follow, different Twitter accounts I follow. That all goes into a database that I store on the cloud.

14:55 I then have a system that pulls out what's called chunks, the paragraphs off these different texts, and that makes it easier for the large language model to work with this data. I also have developed a system where I pull out the charts as well. And so, now when I ask a question to my AI, not only does it go to its training set to answer for it will first go to my knowledge base. And my knowledge base is the one that I trust, and it will pull out the right piece of information from there. It will provide the right context, and then it will answer the question for me. And what I found is by using this system, a rag or multimodal rag system, it dramatically reduces hallucination. It also provides an audit trail of the different sources. It also deals with some of the issues of time, which is a big problem that we have in financial markets, where markets move so quickly, what you don't want is you don't want a piece that was published a week ago to be used. Instead, you want the piece that was published yesterday to use. And my rag system, or a rag system, what it can do is you can tell it only to look at documents that were uploaded over the past 24 hours, and that ensures it's very, very timely.

16:12 So, just to run through all the different systems I use. The first was to conceptually change your mindset to the fact that machines now speak like humans. The second is that prompting is is in some ways the engine of what we're doing here. So, make sure you use the right style of prompt, you evaluate it. Third is if you're using the same prompt again and again and again, change it to a skill. Fourth is play around with memory, so that when you repeat sessions, it remembers something about you. Fifth is that you can get AI to work for you when you're sleeping. And sixth is create your own knowledge base. And if you do all of these things together, it will seriously turbocharge your your work. And in terms of homework, I've got some homework for everybody who's listened to this podcast or watched this video. The first one on machine speaking human, I'd urge you to pick one Excel task and then use an LLM to write some Python code to get that work done for you. So, give yourself that exercise and then write some Python code using a large language model to send yourself an email.

17:34 The second one is on prompting. Use the clear template that I described and then do an evaluation where you compare it to how you would have answered that question. Number three, build up a series of skills. So, for example, everyone uses large language models to summarize. Create your own summary prompt and turn it into a skill. Do that within Claude or ChatGPT or whichever LLM that you use. Fourth, play around with a memory of your LLM. So, you could just ask it more directly, "Put this into the memory or your memory." And then it'll add it to the memory file. Fifth, use the work or co-work options and get the large language model to do some work for you while you're away from your desk or at the very least get it to schedule a task for you like the one I described. Get it to summarize headlines from newspapers and send it to your email. And then finally, start to build up a knowledge base or a rag system. And you again, you can use LLM to help you to do that.

18:37 Hopefully, you found all of this very useful. If you do have any questions, feel free to reach me on Bloomberg email or on LinkedIn. And again, if you do want these slides, I'm happy to provide them to you. Also, if you want the skills that I use, I'm happy to share them, too. But hopefully, everybody will find the session useful and good luck with your experience of using large language models. Thanks for listening to the episode. Please subscribe to the podcast show on Apple, Spotify, or wherever you listen to podcasts. Leave a five-star rating, a nice comment, and let other people know about the show.

19:09 We'd be very, very grateful. Finally, sign up for our free newsletter at macwire.com/free. We'll be back soon, so tune in then.

Summary

Bilal Hafeez discusses how to effectively leverage AI for research and market analysis in the financial sector, emphasizing the democratization of coding through large language models. He outlines a structured approach to using AI, covering essential themes such as prompting techniques, memory utilization, continuous work systems, and the creation of personalized knowledge bases.

- AI democratizes coding, allowing users to code in natural language.
- Effective prompting involves a clear template (Context, Length, Example, Ask, Role).
- Skills can be created for frequently used prompts to streamline workflows.
- Memory in AI helps retain user preferences and past interactions for improved efficiency.
- Continuous work systems enable AI to perform tasks autonomously while users are away.
- Building a personalized knowledge base (rag system) enhances the reliability of AI outputs.
- Practical homework assignments encourage users to apply these concepts in real scenarios.

Questions Answered

What is the focus of this podcast episode?

Bilal Hafeez discusses how he utilizes AI for research and market analysis, addressing common inquiries about effective AI use in finance.

How does AI enable coding for everyone?

AI allows users to input natural language prompts that can be translated into code, making coding accessible to a broader audience.

What are skills in the context of AI, and how can they be used?

Skills are predefined prompts that can be easily accessed and reused in AI interactions, streamlining repetitive tasks.

Why is memory important in AI, and how can continuous work be utilized?

Memory allows AI to retain context from previous interactions, while continuous work enables AI to perform tasks autonomously.

How can a knowledge base improve AI performance?

A knowledge base helps AI provide timely and relevant information, reducing errors and ensuring up-to-date responses.

© transcribe · For agents Built with care and craft by Gokul Rajaram