About a-team Marketing Services

A-Team Insight Blogs

How Should Stock Analysts Use Prompts for ChatGPT?

Subscribe to our newsletter

Daniel Philps, Head of Rothko Investment Strategies and Co-Leader of Machine Learning at the Gillmore Centre for Financial Technology at Warwick Business School.

2023, termed Generative AI’s ‘breakout year,’ has seen generative AI techniques continually advancing, researchers are exploring new applications and pushing the boundaries of what can be generated.

The latest annual McKinsey Global Survey shows that less than a year after these tools debuted, one-third of organisations are using AI regularly in at least one business function.

We have now reached a point where large language models (LLMs) such as ChatGPT can be used to assist with investment management and finance industry tasks. Although we haven’t reached a point of automation yet, for many tasks that is coming, and in the meantime LLMs have become an invaluable tool in a stock analyst’s repertoire.

How can the research-driven fundamental analysts and tech-savvy quant analysts effectively utilise LLMs like ChatGPT? Can these technologies serve as adept co-pilots or assistants?

The key lies mainly in the practice of ‘prompt engineering’. To make the most of ChatGPT and similar LLMs, equity analysts must concentrate on crafting well-structured prompts; in fact, prompt engineering has emerged as a crucial discipline.

The quality of the question posed to ChatGPT directly influences the quality of its response. The system performs optimally when presented with keywords, phrases, bullet points, task trees, and well-sequenced follow-up inquiries.

Utilising ChatGPT as a quant analyst

As for the technical and quantitative aspect, ChatGPT can be employed to generate basic code snippets and provide explanations of complex code. Notably, GPT codex, a GPT-3 trained on programming code, already serves as a beneficial code completion tool in AI programmer GitHub Copilot and has now been absorbed into GPT-4, while GPT-4 is set to form the foundation of the more comprehensive GitHub Copilot X.

However, unless the code required is fairly standardised, code produced by ChatGPT often necessitates adjustments and refinements for accuracy and optimisation. As such, it is most effective as a template. Presently, it seems improbable that LLM autopilots will replace quantitative coders in the near future. However, they will be able to significantly boost their productivity, accuracy and code quality.

For instance, quant analysts can make use of ChatGPT for the following three tasks, by prompting ChatGPT. In practice, the approach would involve accessing specialised codex LLMs and integrating additional tools to prompt for highly reliable code semi-automatically.

Developing an entire investment pipeline:

ChatGPT can execute complex programming instructions to some extent, such as generating Python functions for driving quantitative equity investment strategies.

However, significant editing and refining of the generated code is usually required. The challenge lies in getting code from ChatGPT that closely resembles the final product. This can be achieved by providing a bulletised list of instructions with crucial details for each item.

Creating a machine-learning alpha-forecasting function:

By posing follow-up questions, we can obtain a basic machine-learning function or template for predicting stock returns.

ChatGPT performs reasonably well in this context, delivering a function that can be adjusted, along with guidance on its application, including a recommendation for cross-validation using a random forest algorithm.

Crafting a useful function: target shuffling:

Subsequently, we tasked ChatGPT with generating a helpful and moderately complex function for conducting target shuffling—a technique to validate outcomes of an investment model.

A simple request for “Python code for a target shuffling function” yielded limited results. Once again, providing a comprehensive list of requirements was necessary for ChatGPT to produce a viable template.

The road ahead

With carefully managed prompts, LLMs can now help fundamental analysts quickly acquire basic knowledge about many companies at once and help quant analysts to develop and debug code.

While the examples above are simply ChatGPT prompts, developers and managers with class-leading technology are already working to apply LLMs to investment management workflows.

Even in their current form, effectively integrated LLMs can yield significant efficiencies if applied in the correct way. They also provide a glimpse into the immense capabilities of this technology.

In its next generation, LLM technology will evolve into an essential tool for investment management. Through automating tasks like information acquisition, human analysts will be afforded additional time and cognitive resources to concentrate on the critical aspects of reasoning and decision-making within the investment workflow.

Subscribe to our newsletter

Related content

WEBINAR

Recorded Webinar: Re-architecting the trading platform for interoperability, resilience and profitability

Trading platforms have come a long way since the days of exchanging paper certificates and shouting across trading floors, pits and desks in the early 2000s, but there is progress still to be made as firms strive to reduce risk, increase profitability, and make their mark in digital assets trading. This webinar will review the...

BLOG

DTCC Agrees to Acquire Blockchain-Based Financial Technology Firm Securrency Inc.

DTCC, the financial markets infrastructure provider, has announced its agreement to acquire Securrency Inc., a developer of institutional-grade digital asset infrastructure. By merging industry best practices with cutting-edge digital technology, the move aims to further the institutional acceptance and integration of digital assets. “Securrency is an important strategic acquisition that will give us the technology...

EVENT

Data Management Summit New York City

Now in its 14th year the Data Management Summit NYC brings together the North American data management community to explore how data strategy is evolving to drive business outcomes and speed to market in changing times.

GUIDE

Regulatory Data Handbook – Second Edition

Need to know all the essentials about the regulations impacting data management? A-Team’s Regulatory Data Handbook is a great way to see at-a-glance: All the regulations that are impacting data management today A description of each regulation The impact each will have from a data and data management perspective Messages from sponsors with products related to...