Natural language processing (NLP) is the branch of artificial intelligence concerned with enabling computers to read, interpret and produce human language. It covers tasks such as classifying documents, extracting names and figures, measuring the tone of a passage, translating, summarising and answering questions. The raw material is unstructured text or speech, which must be converted into numbers before a computer can work with it.
Finance produces text in enormous quantities: news, company filings, earnings call transcripts, analyst reports, central bank statements and social media posts. NLP is the means by which trading firms, banks and regulators turn that text into data. Its main trading use is sentiment analysis, but it is equally important in compliance, research and customer service.
Methods
The field has passed through three broad stages, all of which remain in use.
- Word counts and dictionaries. A document is treated as a bag of words, ignoring order. Counts of words from prepared lists, such as positive and negative terms, give a score. Weighting schemes reduce the influence of words that appear everywhere. The approach is transparent and fast.
- Statistical learning and embeddings. Words are represented as vectors of numbers learned from large bodies of text, so that words used in similar contexts have similar vectors. A classifier trained on labelled examples then maps documents to categories. Sequence models such as long short-term memory networks added sensitivity to word order.
- Transformers. Since 2017, models built on the transformer architecture have read whole passages at once and capture context far better. Pre-trained on vast text collections, they are adapted to specific tasks with little extra data. The large language model behind systems such as ChatGPT is the current form.
All three rest on machine learning to a greater or lesser degree, and the later stages on deep learning.
A simple sentiment measure
The dictionary method reduces to a formula. A common version of a tone score is:
- is the number of words in the document found on the positive list.
- is the number found on the negative list.
The score runs from -1, entirely negative, to +1, entirely positive. An earnings call transcript with 30 positive and 20 negative words scores . The choice of word list matters. In a study published in 2011, Tim Loughran and Bill McDonald showed that general-purpose lists misclassify financial text, because words such as liability, tax and cost are negative in everyday use but neutral in company accounts, and they compiled lists specific to finance that are now widely used.
Applications in finance
- Trading signals. Scores derived from news and social media feed sentiment trading and news-based trading. Vendors deliver pre-scored stories as machine-readable news.
- Company disclosures. Models compare each annual report with the previous year's to flag changes in risk language, measure the tone of management on earnings calls and extract figures from filings.
- Central banks. Policy statements and minutes are scored for a more or less restrictive stance.
- Compliance. Banks scan communications for signs of misconduct, and market abuse surveillance systems read chat and email alongside trading records.
- Operations. Contracts, confirmations and customer messages are classified and routed automatically.
Evidence on text and returns
Academic work has established that text contains information about future prices, though the effects are modest. A 2007 study by Paul Tetlock found that a high level of pessimistic words in a daily newspaper column about the stock market was followed by lower returns the next day and a reversal afterwards. Later studies linked the tone of company-specific news and of filings to subsequent returns and earnings. The findings are consistent with prices absorbing the content of text gradually, not instantly.
Limitations
Language is ambiguous. Negation, sarcasm, hedged statements and industry jargon are easily misread, and a headline may mention a company without being about it. Much financial text is also written with its audience in mind: once managers know that algorithms score their words, they have an incentive to choose words that score well, which erodes the signal.
Testing a text-based strategy raises the usual research problems in sharper form. The timestamp on a story must be the moment it became public, or the test suffers from look-ahead bias. Models with many parameters fitted to a short history are prone to overfitting. And a model pre-trained on text from after the test period may carry hindsight into the results. In live use there is the added risk of acting on false or manipulated stories, since an automated reader cannot easily judge whether a source is credible.