About a-team Marketing Services
The knowledge platform for the financial technology industry
The knowledge platform for the financial technology industry

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: Transforming Data Experiences in Quantitative Research and Trading

For quantitative researchers and quant trading teams at banking and capital markets firms, the ability to access, integrate, and share data is critical. Data and how teams collaborate with data underpins the ability to generate alpha, perform execution analyses, and provide a modern and differentiated client experience. However, for most banks, legacy technology stacks and...

BLOG

Taskize and Symphony Integrate to Streamline Financial Services Workflow

Taskize, a key provider of inter-company workflow in the financial services industry, has announced an integration with Symphony, the market infrastructure and technology platform, aiming to enhance real-time collaboration between operations teams and front-office users. This pivotal partnership was unveiled and demonstrated at the Symphony Innovate London event, 2023. The integration promises to modernise industry...

EVENT

Data Management Summit New York City

Now in its 13th 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

Institutional Digital Assets Handbook 2023

After initial hesitancy, interest in digital assets from institutional market participants has grown over the past three to four years. Early focus inevitably centred on the market opportunities presented by bitcoin and other cryptocurrencies. But this has evolved into a broad acceptance of a potentially meaningful role for digital assets in institutional markets. It’s now...