Skip to content

Natural language processing

Natural language processing turns text and speech into structured evidence, features or generated language. A transparent headline count shows why representation, meaning and investment value need separate checks.

Natural language processing (NLP) is the computational analysis and generation of human language, including text and speech. In quantitative finance, it turns filings, news and earnings-call language into searchable evidence, structured records or numerical features. The practical question is what the resulting output measures and when it becomes available to a decision maker.

A company name, a sentence about a covenant breach and a summary of management's outlook are different outputs. NLP covers all of them; a word-count sentiment score is only one possible application. Rules, statistical classifiers and neural language models can each perform parts of the work.

Start with the output you need

TaskPossible financial useWhat needs checking
Entity and event extractionIdentify an issuer, the parties to an acquisition, or a stated payment dateCorrect entity, role, date and source span; an announcement is not a completed transaction
ClassificationLabel a disclosure as discussing litigation, liquidity or another defined subjectAgreement with a written codebook on held-out examples
RetrievalFind passages relevant to a research question across a filing archiveWhether relevant evidence is retrieved and belongs to the right issuer and period
Summarisation and generationProduce a concise briefing from selected disclosuresEach factual claim against its source, including qualifications and uncertainty

Named-entity recognition finds mentions such as organisation names; linking a mention to a particular security or issuer is an additional problem. Text embeddings encode text as vectors that can support retrieval or classification. They are representations, not sentiment labels by definition. Retrieval-augmented generation supplies retrieved material to a generator; retrieving a relevant passage still leaves its use in the answer to be checked.

This breadth is visible in Stanford's CoreNLP overview, which includes token boundaries, named entities, grammatical relations, references between mentions, sentiment and other annotations. A research pipeline may need several such operations before its output is useful.

A count you can reproduce

Take the synthetic headline “Company reports strong growth”, assumed already released, received and available before the research decision. “Company” is a placeholder, not an identified issuer. This is an illustration of text representation, not a real news observation.

Freeze these conventions:

  • Lowercase the text and take each contiguous run of ASCII letters a through z as a token.
  • Keep every token. Apply no stemming, lemmatisation or stop-word removal.
  • Declare the complete toy positive-word lexicon to be {strong, growth}. Count matched token occurrences, then divide by all token occurrences.
The resulting tokens are company, reports, strong, growth. The match indicators are 0, 0, 1, 1: two matches across four tokens, so the positive-word hit fraction is 2/4 = 0.5. This proportion is neither the probability that the headline is positive nor a predicted return.
Synthetic headline Company reports strong growth becomes four lowercase tokens. Only strong and growth match the declared toy lexicon, giving two matched occurrences divided by four total tokens, or 0.5.
Synthetic headline Company reports strong growth becomes four lowercase tokens. Only strong and growth match the declared toy lexicon, giving two matched occurrences divided by four total tokens, or 0.5.
Original synthetic count illustration with a declared ASCII-letter tokenizer and toy lexicon. All tokens remain in the denominator; the hit fraction is not validated sentiment or predicted return.

For this example, the arithmetic is the easy part. A real tokenizer must make choices about company names, decimals, hyphens, contractions and languages without spaces. A subword tokenizer used by a language model can split the same headline differently. Its token count need not equal the word count above. An empty token sequence has no defined hit fraction under this convention; record it as missing rather than quietly assigning zero.

The Text Representation lesson develops corpus choice, tokenisation, bag-of-words features and document weighting. Its preview is public; the full lesson requires membership.

Counting words is a measurement choice

A lexicon is transparent, but its matches need interpretation. The phrase “not strong” still contains a hit under the toy rule: it has no negation handling. “Growth” could describe costs, a competitor or a past period. The entity, what is growing and the surrounding sentence matter. Discarding those relationships can erase precisely the information a researcher wanted.

Domain also matters. Loughran and McDonald's financial dictionary work addresses words whose financial usage differs from generic sentiment lists. A financial lexicon remains a specified measurement instrument, with a version and a target medium. The toy lexicon here is independently invented and is not their dictionary.
For financial sentiment analysis, define the target before selecting the method: tone toward which entity, about what economic quantity, over which horizon? A supervised classifier learns from labelled examples; a generative model may produce a label or explanation from instructions. Both require evaluation against the intended task, including difficult cases, rather than trusting fluent output or a plausible score name. Text Classification develops the distinction between a written dictionary rule and a mapping learned from coded documents, with held-out evaluation. The full lesson requires membership and has a public preview.

Language quality and investment value have different tests

A useful extraction system can save research time without predicting prices. A well-measured tone feature can describe disclosures without producing an implementable trading edge. To investigate a trading application, preserve point-in-time data: the original document version, its publication time, receipt time and the processing delay before the output could be used. A fiscal period-end is not the release time, and an edited transcript cannot silently replace the version available earlier.

The model has a clock too. A later pretrained checkpoint may contain subsequent filings or event outcomes. Calling a historical prompt “zero-shot” does not establish that its response was obtainable then. Document the checkpoint, permitted knowledge, prompts and any fitted preprocessing; distinguish retrospective analysis from a feasible historical strategy test.

Keep related documents and repeated passages from leaking across evaluation splits, and account for model, dictionary and prompt choices made after viewing results. If the goal is trading, assess a frozen policy on later untouched data with feasible execution and costs. NLP Signal Validation connects document availability and research selection to that separate economic test. Its preview is public; the full lesson requires membership.

Finally, check rights for the actual corpus, dictionary and model use. A readable news page or transcript does not itself establish permission for bulk collection, redistribution or commercial processing. Reproducibility includes documenting those inputs and permitted uses, alongside the transformation that produced the feature.

Sources

  • Daniel Jurafsky and James H. Martin, Speech and Language Processing, third-edition online manuscript, released 19 August 2026. The chapter map spans tokens, classification, embeddings, retrieval, generation, named entities and information extraction.
  • Stanford NLP Group, CoreNLP overview, “About,” “Pipeline” and “Annotations”: examples of linguistic processing beyond keyword counts.
  • Tim Loughran and Bill McDonald, When Is a Liability Not a Liability? Textual Analysis, Dictionaries, and 10-Ks, Journal of Finance 66(1), 2011, pp. 35–36, on financial context and dictionary misclassification; official dictionary repository for list versions and stated use terms. The headline and lexicon above are original teaching examples.
Last updated
  • natural language processing
  • text as data
  • tokenisation
  • financial text
  • measurement
  • point in time data
← Back to the glossaryBack to top ↑