For more on artificial intelligence (AI) applications in investment management, read The Handbook of Artificial Intelligence and Big Data Applications in Investments, by Larry Cao, CFA, from the CFA Institute Research Foundation.
With the emergence of ChatGPT, large language models (LLMs) have captured the zeitgeist, and the future opportunities and pitfalls they imply for finance and investment management are enormous. For a small elite of high-tech investment managers, LLMs provide another systematic tile in an ever-expanding mosaic. But for most, they represent the starting whistle of a tech arms race many had hoped to avoid.
Sam Altman, the CEO of OpenAI, the creator of the ChatGPT chatbot, has tried to manage expectations: “ChatGPT is incredibly limited, but good enough at some things to create a misleading impression of greatness,” he said.
What he didn’t say is that ChatGPT is only the beginning.
So, what are the LLM opportunities and risks in investment management? To answer that question, in this three-part series, we will introduce how to apply LLMs in investment management and explore the new dark art of “prompt engineering.” In the second installment, we will explain how to integrate ChatGPT into both a fundamental and quant analyst’s toolkit, and in the third part, we will offer a deeper dive into the artificial intelligence (AI) behind ChatGPT and LLMs and anticipate the next stages in investment management’s AI revolution.
LLMs: The Future of Investment Management?
At their best, LLMs like ChatGPT can write sections of research, answer questions about companies and sectors, produce and debug quant code, and respond to queries about technical investment, accounting, law, and regulations. At their worst, they “hallucinate” — making up facts and references in smooth reading but nonsensical text and generate bug-ridden code. In practice, of course, the reality tends to lie somewhere between these two poles. So, to best harness the power of LLMs, we need to develop new, LLM-specific skills and perhaps even rethink investment processes to integrate these new and powerful tools.
In principle, while LLMs can support various investment management operations, they will do so more as co-pilots than autopilots, by assisting expert humans or existing AI approaches. Below are some examples of the sorts of data and services they can render to different finance professionals.
Fundamental Analyst | Quant Analyst | Legal/Compliance |
Generate Summaries | Develop Quant Code |
Legal/Regulatory Advice |
Explain Technical Research |
Write Code Functions |
Write Disclaimers/ Footnotes |
Write up Analysis |
Write SQL for Database Queries |
Write Contract Sections |
Build Literature Reviews |
Generate Explanations/ Summaries |
LLMs are particularly good at summarizing and explaining text and understanding and generating simple computer code. That means they can be deployed on many of the tasks involved in the design and development of investment strategies. But we need to approach the current generation of LLMs, ChatGPT among them, with the following warning labels top of mind:
- Time-Sensitive Information: LLMs have an end date after which no new documents can train the model. So avoid time-sensitive queries.
- Is the question sensible? Writing search queries for ChatGPT and other LLMs is both an art and a science. It’s called “prompt engineering.”
- Specific/Obscure Facts: If we don’t have lots of followers, ChatGPT will have trouble writing our biographies. But if we present ChatGPT with our resume and ask it to write our bio, we’ll get better results.
- New Discoveries: Don’t expect LLMs to do anything more than gather, summarize, and join the dots of existing and available information. If the goal is new knowledge, we’re still in humans-only territory.
- Hallucination: LLMs sometimes make things up. They may quote numbers and facts and back them up with references. But these may be bogus. So confirm that the output is accurate. To reduce the likelihood of such mistakes, give the LLM the body of text we want to interrogate and prompt it with examples by requesting a well-structured list or triangulating off other sources of information to validate the outcomes.
- Mathematics/Self-Consistency: Current LLMs are not good at math. Questions like, “What is the average annual growth in Tesla’s earnings over five years?” may not yield a satisfactory or consistent answer. So, user beware.
These caveats aside, if we play to their strengths, even the current generation of LLMs can be incredibly powerful and helpful tools.
How to Apply ChatGPT in Investment Management
To best leverage ChatGPT and other LLMs, we need to focus on constructing the right prompt. Indeed, prompt engineering has become a critical new discipline. The better the question we ask ChatGPT, the better its answer will be. The system responds best to keywords, phrases, and bullet points, as well as well-ordered follow-up questions.
A New Financial Discipline: Prompt Engineering
There are some specific points to consider when writing prompts:
- Avoid Subjectivity: Terms like “best,” “most risky,” and so on are common parlance, but they are also subjective and may deliver poor answers. Keep things objective.
- Special Characters: Bookend the text with quotation marks (“. . . ”) or hyperlink to the documents to be analyzed.
- Lists work better: Ask that answers be presented as such for succinct results rather than a mountain of text.
- Simple English: Construct prompts with the most basic and common phrases. The more the prompt resembles most other prompts and reference points, the greater the likelihood the right information will be surfaced.
- Reference Points: When looking for an obscure fact about a common entity or a commonly searched fact about an obscure entity, give reference points.
Below are some focused examples of how to frame finance-specific queries on ChatGPT. OpenAI also describes some of the most effective prompts in its best practices.
Examine Environmental, Social, and Governance (ESG) Data: Using “List”
To generate information about a specific event or discrete points, type “list” and identify the number of items ChatGPT should deliver.
Less Effective
More Effective
Summarize an Earnings Call
For example, to distill a long-winded analyst transcript into something digestible, simply type “summarize,” enclose the passage in quotation marks, and specify items of interest.
Less Effective
More Effective
One caveat: ChatGPT won’t analyze earnings calls when asked directly. But it usually looks for the phrase “earnings call” or similar to identify these requests, so by removing this phrase, we can engineer a “jailbreak” and trick the LLM into giving us what we want.
Generate Code
To produce computer code, numbered lists can steer ChatGPT in the right direction. You can also specify variables ChatGPT should use.
Less Effective
More Effective
Something Specific or More Obscure? Chain of Thought
The LLM may have trouble identifying unfamiliar themes or entities. So lead the LLM toward the target theme or entity through a chain of questions or statements.
Less Effective
More Effective
ChatGPT: Co-Pilot Now, Autopilot Next
Now that we know how to prompt an LLM, we’ll test our new prompt engineering skills in the next installment by studying how ChatGPT can serve as co-pilot for a fundamental analyst and a quant analyst.
For further reading on this topic, check out The Handbook of Artificial Intelligence and Big Data Applications in Investments, by Larry Cao, CFA, from the CFA Institute Research Foundation.
If you liked this post, don’t forget to subscribe to Enterprising Investor.
All posts are the opinion of the author. As such, they should not be construed as investment advice, nor do the opinions expressed necessarily reflect the views of CFA Institute or the author’s employer.
Image credit: ©Getty Images / stefanschurr
Professional Learning for CFA Institute Members
CFA Institute members are empowered to self-determine and self-report professional learning (PL) credits earned, including content on Enterprising Investor. Members can record credits easily using their online PL tracker.