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: Trade the Middle East & North Africa: Connectivity, Data Systems & Processes

In Partnership With As key states across the region seek alternatives to the fossil fuel industries that have driven their economies for decades, pioneering financial centres are emerging in Egypt, United Arab Emirates (UAE), Saudi Arabia and beyond. Exchanges and market intermediaries trading in these centres are adopting cutting-edge technologies to cater to the growing...

BLOG

Adaptive and Rapid Addition Partner to Enhance Trading Connectivity

Adaptive, the custom trading technology solutions provider, has partnered with Rapid Addition, the financial messaging solutions vendor. The collaboration is designed to strengthen Adaptive’s capabilities in delivering advanced FIX solutions to capital markets clients with demanding requirements for high-performance counterparty connectivity and order management workflows. The partnership is facilitated by Rapid Addition’s use of Aeron,...

EVENT

TradingTech Summit MENA

The inaugural TradingTech Summit MENA takes place in November and examines the latest changes and innovations in trading technology and explores how technology is being deployed to create an edge in sell side and buy side capital markets financial institutions in the region.

GUIDE

Institutional Digital Assets Handbook 2024

Despite the setback of the FTX collapse, institutional interest in digital assets has grown markedly in the past 12 months, with firms of all sizes now acknowledging participation in some form. While as recently as a year ago, institutional trading firms were taking a cautious stance toward their use, the acceptance of tokenisation, stablecoins, and...