A large language model (LLM) is a type of artificial intelligence system trained on very large amounts of text to predict the next piece of a sequence of words. From that single skill it acquires the ability to answer questions, summarise documents, translate, write computer code and carry on a conversation. Products such as ChatGPT are applications built on top of such models.
LLMs are a product of deep learning, and almost all current ones use the transformer architecture introduced by researchers at Google in 2017. In financial services they are used to read and draft text at scale: research reports, regulatory filings, news, client messages and code. Their use in trading itself is narrower and is constrained by speed, reliability and the difficulty of testing them honestly.
How a large language model works
Text is first broken into tokens, which are words or fragments of words, and each token is converted into a list of numbers. The model is an artificial neural network with many layers and, in the largest cases, hundreds of billions of adjustable parameters. Its central mechanism, called attention, lets the model weigh every token in the input against every other when working out what should come next.
Training has two broad phases. In pre-training, the model is shown huge volumes of text and adjusted, one small step at a time, to make better predictions of the next token. This is costly and is done on large clusters of graphics processing units. Afterwards the model may be fine-tuned on narrower material or trained further with human feedback to follow instructions. When the model is used, it generates text one token at a time, each choice depending on what has come before. The amount of text it can consider at once is called its context window.
A model has no built-in access to facts beyond what it absorbed in training, up to a cut-off date. Systems built on LLMs often add retrieval, in which relevant documents are fetched and placed in the context, and tools, which let the model call a calculator, a database or a price feed. A model that plans and carries out a series of such steps is described as agentic AI.
Uses in finance and trading
- Reading text. LLMs perform the tasks of natural language processing with little task-specific training: classifying news as good or bad for a company, extracting figures from filings, and summarising earnings calls. Their output feeds sentiment analysis and news-based trading models.
- Research assistance. Analysts use them to search internal document stores, draft notes and compare a company's statements over time.
- Writing code. Quantitative developers use them to draft and review strategy code, data pipelines and tests, which must still be checked by a person.
- Operations and compliance. Banks and brokers apply them to customer service, to reviewing communications and to summarising alerts for investigators.
The way a request is worded affects the answer, and the practice of designing inputs to get reliable outputs is known as prompt engineering.
Limitations
An LLM produces plausible text, not verified truth. It can state false figures, invent sources and make arithmetic errors with complete fluency, a failure usually called hallucination. The same question asked twice may get different answers, since generation involves random sampling. These properties make unsupervised use risky wherever a wrong answer costs money.
Speed is a second limit. A response takes from a fraction of a second to many seconds, which rules LLMs out of the decision loop in high-frequency trading, where reactions are measured in microseconds. They are used instead upstream, to turn text into signals that faster systems consume, or at slower horizons.
The third limit concerns evidence. Testing whether an LLM-based signal would have made money in the past is hard, because the model was trained on text written after the events being tested. Asked in a backtest how a 2015 news story should affect a share, a model may already have absorbed what happened next. This is a form of look-ahead bias, and it can make results look far better than live trading would be. A clean test uses only data from after the model's training cut-off, which leaves short samples and a high risk of overfitting.
Governance and regulation
Financial firms that deploy LLMs face questions about data confidentiality, since prompts may contain client or proprietary information; about accountability for advice or decisions produced with a model's help; and about reliance on a small number of model providers. Regulators have generally applied existing rules on model risk, outsourcing, record keeping and suitability, and some jurisdictions have added laws specific to AI. If many firms draw signals from the same few models, their trading may become more alike, a concern for market stability that supervisors have also raised.
Relation to earlier models
Before transformers, text was modelled with recurrent networks such as long short-term memory, which read one word at a time and struggled with long passages. Transformers process a whole passage in parallel, which made training on far larger data sets practical. LLMs are one branch of machine learning. Models built for prices and other numerical series are a separate line of work, though the transformer design has been adapted for them too.