Applied Data Science in Finance

Week 1 – Introduction

Jérôme Deyris & Thomas Rigou

2026-11-09

0. Practical information

Introductions

  • Jérôme Deyris, Maître de conférences in economics
  • What I do
    • My PhD was on central banks, finance and the climate crisis
    • More generally, interested in how politics influence central bank policies, through:
      • disagreements and ideology inside monetary policy committees
      • strategic communication in public facing speeches
      • formal and informal interactions with politicians

Who are you?

This class: when, where and who?

When and where?

  • 6 classes of 3 hours, on Mondays (9:30 – 12:30)
  • Room TBD

Who?

  • I teach the first 2 classes, and come back for the evaluation
  • Thomas Rigou takes over from session 3 onwards, including S2

But you will see me again: 2 other classes in S2

  • “Financial markets analysis and risk assessment” with external speakers
  • “PhD track”, to help those interested in doing a PhD (are you?)

What? How?

  • “Applied Data Science in Finance” (S1) and “Applied Big Data” (S2) both focus on how to use textual data in economics and finance
    • covering all the steps of the data pipeline, from text collection to final uses
    • in research, business intelligence and other professional environments
  • A hands-on coding course
    • Typically, a first hour of theory / lecture
    • Then exercises + your own project

Today, the programme is a bit different:

  1. Text as data in theory
  2. Giving you ideas by presenting examples
  3. Reminders on Python basics + Google Collab

Grading

  • Group projects on earnings calls
  • 3 to 4 students per project
  • Show us you are able to use the course methods
  • 15-minute oral presentation on January 4th

Details to be expanded (TBD with Thomas).

Programme

Session Instructor Topic
1 JD Introduction to text as data and Python
2 JD Data collection and web scraping
3 TR Natural language processing
4 TR Central bank communication
5 TR Sentiment analysis
6 JD & TR Project presentations

Questions?

1. Text as data in theory

Our goal

Learn how to turn unstructured textual data into meaningful quantified metrics

  • … that you can then use in analyses, econometric regressions, investment decisions, etc.
  • Such methods are booming!
    • Why do you think that is the case?

Data abundance

  • For a long time, text was used sparingly because it was cumbersome to work with at scale
    • Collect: cumbersome to gather (or even transcribe) all relevant writings
    • Consume: impossible to read collections of documents filled with billions of words
    • Organize: turning what you read into data (e.g. sorting texts into relevant categories)
  • Social scientists had to focus on small corpora, raising problems of generalization
    • Rarely used by economists to make inferences about human behavior

Corpora (plural of corpus): a Latin word often used to describe a collection — a database — of texts, with or without their metadata.

Data abundance

Recent developments have changed this.

New and more data

  • Data on the web: digitized text, historical archives, administrative records, open data
  • Data from the web: social media, websites
  • Generally unstructured data not not produced by researchers (think surveys or experiments)

More feasible to collect the population rather than a sample

New methods and computing power

  • More powerful computers and hardware (mostly GPUs)
  • More powerful algorithms, methods and models (AI)

Allows to train more complex models, and to reduce their cost for researchers (e.g. the advent of LLMs in research)

Two promises

Two promises of the growing availability of big (textual) data:

1. Empirical

2. Methodological

Two promises… but beware!

1. Empirical: big data ≠ rich data

  • Designed data (surveys, censuses) are built with a question in mind: a high information-to-data ratio
  • Organic data are by-products of digital systems (searches, tweets, transactions): massive, cheap, timely — but produced for other purposes, so the signal must be dug out of the noise

2. Methodological: big ≠ representative

  • Organic data are like “typewriters that have an unknown set of keys disabled”: we don’t know who or what is missing
  • Small but carefully designed samples often beat messy, uncontrolled big data
    • Literary Digest vs Gallup polls, 1936 election (Landon vs Roosevelt)

The payoff lies in combining designed and organic data, not in one type alone (Groves, 2011).

Six principles (Grimmer et al., 2022)

  1. Social science theories and substantive knowledge are essential for research design
  2. Text analysis does not replace humans — it augments them (see also Do et al., 2024)
  3. Building, refining and testing social science theories requires iteration and cumulation
  4. Text analysis methods distill generalizations from language
  5. The best method depends on the task
  6. Validations are essential and depend on the theory and the task

1. The importance of theory

  • The data you collect, the patterns you look for, the methods you use for inference: all are contingent on your pre-existing knowledge, on your theory of the world
    • You are in an economics/finance programme, not in computer science
    • LLMs can already code better than all of us — that is not the point
    • You need drive, direction, goals

This does not mean your approach should be purely deductive, nor that you shouldn’t pivot during the project! See principle 3.

1. The importance of theory

Try to ask yourself these questions

  • What is your research question?
  • What are your hypotheses?
  • Why? Which academic references led you to them?
  • Test theories: Mandates and objectives should change how central banks talk about climate change
  • Fill theory gaps: The Fed may not only be attacked by politicians trying to influence monetary policy - what about the other way around

2. Augmenting, not replacing humans

  • New text analysis methods help us read differently, not avoid reading
    • Computational methods are best for systematic labeling / coding, not for untangling deep and subtle nuances
    • They can pre-sort relevant texts to be more consistent and exhaustive — but you still have to know what’s inside your corpus!
  • This allows you to qualify what you measure and be aware of measurement limitations.
  • Detecting the Fed’s fiscal commentary… that is about other countries
  • Detecting political pressure on the Fed… that is not about monetary policy

3. Iteration and cumulation

  • The importance of an iterative approach
    • Constant back and forth with your corpus, to improve your understanding and fine-tune your definitions
    • Be mindful of context!
  • Good measurement requires that
    • you understand what is (and what is not) in your corpus
    • categories are properly defined “for good” after an iterative process

Source: Grimmer et al. (2022, p. 15).

  • Banque de France and overindebtedness, or coalition building
  • Fiscal Fed with calls for expansion in 2000

4. Dimensionality reduction

  • Text analysis methods compress the high-dimensional information in text into a lower-dimensional representation
    • Distillation (reduction) of information is necessary to compare, aggregate and relate texts to one another — compression is the point of the exercise
    • But no matter your method, crude or elaborate, you will lose meaning in the process

Central bank speeches often summarized by their topic, sentiment, complexity

5. No single best method

  • Be pragmatic: depending on your research question, corpus and document sizes, and computing power, you will have to adapt
    • Often, combining several methods — in parallel or in sequence — is the most effective strategy

A broad dictionary-based screening step designed to maximize recall (minimizing false negatives), followed by LLM-based classification to improve precision.

6. Validate, validate, validate

Two questions:

  1. Is what you are measuring really what you were trying to measure?
    • Statistical methods applied to text only capture one (or several) dimensions of text — they always leave some meaning / content behind
    • Be mindful of what your methods / results can and cannot tell
  2. Is what you are measuring biased against human benchmarks?
    • After getting the output of your methods, dive into the data again!
  • Topic modeling on parliamentary transcripts about the Banque de France
  • Political pressures on the Fed (Bonaparte, 2026).

2. Text as data in practice

Three games to find examples

Game 1

From recently published paper titles, can you guess the text data used by the authors?

Game 2

For each type of actor, what text traces can we find that may be useful to researchers?

Game 3

From research questions, find relevant data sources to tap into

Game 1 - Recent papers

Acemoglu et al. (2022)

Journal of Labor Economics · Vol. 40 · No. S1 · 2022

Artificial Intelligence and Jobs: Evidence from Online Vacancies

Daron Acemoglu
David Autor
Jonathon Hazell
Pascual Restrepo

We study the impact of artificial intelligence (AI) on labor markets using establishment-level data on the near universe of online vacancies in the United States from 2010 onward. There is rapid growth in AI-related vacancies over 2010–18 that is driven by establishments whose workers engage in tasks compatible with AI’s current capabilities. As these AI-exposed establishments adopt AI, they simultaneously reduce hiring in non-AI positions and change the skill requirements of remaining postings. While visible at the establishment level, the aggregate impacts of AI-labor substitution on employment and wage growth in more exposed occupations and industries is currently too small to be detectable.

What text data did they use?

Ash et al. (2026)

The Quarterly Journal of Economics · Vol. 141 · Issue 1

Ideas Have Consequences: The Impact of Law and Economics on American Justice

Elliott Ash
Daniel L. Chen
Suresh Naidu

This article empirically studies the effects of the early law and economics movement on the U.S. judiciary. We focus on the Manne Economics Institute for Federal Judges, an intensive economics course that trained almost half of federal judges between 1976 and 1999. Using the universe of published opinions in U.S. Circuit Courts and 1 million District Court criminal sentencing decisions, we estimate the within-judge effect of Manne program attendance. Selection into attendance was limited, as the program was popular among judges of all backgrounds, frequently oversubscribed, and admitted participants on a first-come, first-served basis. We find that after attending economics training, participating judges use more economics language in their opinions, rule against regulatory agencies more often, and impose more severe criminal sentences. We argue that economics, as a rigorous social science, was especially effective in persuading judges. JEL codes: D7, K0, Z1.

What text data did they use?

Almelhem et al. (2026)

The Quarterly Journal of Economics · Vol. 141 · Issue 1

Enlightenment Ideals and Belief in Progress in the Run‑up to the Industrial Revolution: A Textual Analysis

Ali Almelhem
Murat Iyigun
Austin Kennedy
Jared Rubin

We trace the evolution of the language of science, religion, and political economy in the centuries leading to the British Industrial Revolution. Using textual analysis of 264,443 works printed in England between 1500 and 1900, we test whether British culture manifested a belief in progress associated with science and industry. Our analysis yields three main findings. First, there was a separation in the languages of science and religion beginning in the mid-eighteenth century. Second, volumes using language at the nexus of science and political economy became more progress-oriented during the Enlightenment. Third, volumes using industrial language—especially those at the science-political economy nexus—were more progress-oriented beginning in the eighteenth century. JEL codes: C81, C88, N33, N63, O14, Z11.

What text data did they use?

Andre et al. (2026)

The Review of Economic Studies · 2026 · doi:10.1093/restud/rdag014

Narratives about the Macroeconomy

Peter Andre · Ingar Haaland · Christopher Roth
Mirko Wiederholt · Johannes Wohlfart

We study narratives about the macroeconomy—the stories people tell to explain macroeconomic phenomena—in the context of a historic surge in inflation. In our empirical analysis, we field surveys with more than 10,000 US households and 100 academic experts, measure economic narratives in open-ended questions, and represent them as Directed Acyclic Graphs. Households’ narratives are strongly heterogeneous, coarser than experts’ narratives, focus more on the supply than demand side, and often feature politically charged explanations. Moreover, narratives shape how households form inflation expectations and interpret new information, which we demonstrate in a series of experiments. Informed by these findings, our theoretical analysis incorporates narratives into an otherwise conventional New Keynesian model and demonstrates their importance for aggregate outcomes through their effect on agents’ expectations.

What text data did they use?

Voth et al. (2026)

American Economic Review · Vol. 116 · No. 10 · October 2026

Fighting for Growth: Labor Scarcity and Technological Progress during the British Industrial Revolution

Hans-Joachim Voth
Bruno Caprettini
Alex Trew

We establish a link between labor scarcity and the adoption of laborsaving technology in industrializing England. During the Napoleonic Wars, more than 10 percent of the male population served in the armed forces. Where recruitment was heavy, more machines economizing on labor were adopted. Naval recruitment, instrumented by warships’ coastal access, provides exogenous variation in labor scarcity and suggests that the link between labor shortages and adoption is causal. Where mechanical skills were abundant, the impact of labor scarcity on adoption appears to be larger. JEL codes: J24, N13, N43, N63, N73, O14, O31.

What text data did they use?

Game 2 - Actors’ traces

What useful textual traces could an economist use?

Companies / producers

  • Disclosures and filings (e.g. 10-K / 10-Q annual and quarterly reports)
  • Job postings
  • Product descriptions on marketplaces
  • Advertising campaigns
  • Patents
  • …

Policymakers / regulators

  • Speeches
  • Meeting minutes and transcripts
  • Court rulings
  • Legislative debates or final legislation
  • etc.

Consumers / workers

  • Reviews
  • Search queries
  • Social media
  • Résumés / CVs
  • Complaints, etc.

Game 3 - Research questions

What data for these research questions?

Documenting political pressures on a central bank beyond its de jure independence

Differentiating doves vs hawks by characterizing central bankers’ policy preferences

What data for these research questions?

How do markets react to central bank communication?

Do political connections matter in finance?

  • Financial firms that met Geithner at the New York Fed gained ~12% when he was named Treasury Secretary (Acemoglu et al., 2016)
  • A director’s Légion d’honneur lifts the firm’s stock price: a signal of access to policymakers (Benveniste et al., 2026)
  • Banks that meet ECB officials behind closed doors outperform (Haselmann et al., mimeo)

3. Hands-on Python

Google Colab

  • Jupyter notebooks in your browser, run on Google’s servers
    • Nothing to install: you only need a Google account
    • The usual libraries are already there (pandas, scikit-learn, PyTorch…)
    • Free access to GPUs, useful later for language models
  • Start here

Save your work in Google Drive: files uploaded to a Colab session are deleted when it stops.

A notebook in practice

  • Two kinds of cells
    • Code cells: run with Shift + Enter
    • Text cells (Markdown): explain what you do
  • Cells run in the order you run them, not the order on the page
    • Weird results? Runtime → Restart and run all
  • Install a missing library with !pip install
# Install a library (in a code cell)
!pip install pypdf

# Access your Google Drive
from google.colab import drive
drive.mount("/content/drive")

# Your files are then here
path = "/content/drive/MyDrive/"

Comment your code! In code cells, anything after # is ignored (Ctrl + / or ⌘ + / toggles it). Between cells, text cells explain each step. Say why, not only what.

Python reminder: objects and types

year = 2026                       # int
rate = 2.25                       # float
bank = "ECB"                      # str
hawkish = rate > 2                # bool: True

banks = ["ECB", "Fed", "BoE"]     # list: ordered, starts at 0
banks[0]                          # "ECB"

rates = {"ECB": 2.25, "Fed": 4.00}   # dict: key → value
rates["Fed"]                      # 4.0

type(rates)                       # dict
  • Python infers types at runtime: no need to declare them
  • print() shows a value; type() tells you what it is

Python reminder: conditions, loops, functions

for bank in banks:
    if rates.get(bank, 0) > 3:
        print(bank, "is above 3%")
    else:
        print(bank, "is below 3% or unknown")
def count_words(text):
    """Number of words in a text."""
    return len(text.split())

count_words("Inflation remains too high")   # 4
  • Indentation defines blocks: no brackets, no end
  • for loops over any collection (lists, dict keys, rows…)
  • def creates reusable functions: you will write many for text
  • Libraries extend Python: import pandas as pd

pandas: tables in Python

  • The library to load, clean, explore and reshape tabular data
    • DataFrame: a table (rows × columns), like a sheet in Excel or a Stata dataset
    • Series: one column
  • Reads almost any format
import pandas as pd

df = pd.read_csv("file.csv")          # also: read_excel, read_json, read_parquet...

First look at a dataset

df.head()          # first 5 rows
df.shape           # (number of rows, number of columns)
df.columns         # column names
df.dtypes          # type of each column
df.info()          # types + missing values
df.describe()      # summary statistics of numeric columns

Always look at your data before analyzing it: how many documents, which period, which variables, what is missing?

Selecting and filtering

df["company"]                               # one column (a Series)
df[["company", "date"]]                     # several columns

df[df["year"] >= 2020]                      # rows that meet a condition
df[(df["year"] >= 2020) & (df["sector"] == "Banks")]

df.sort_values("date")                      # sort
df["company"].value_counts()                # how many rows per company
df.groupby("year")["n_words"].mean()        # average by group

Dates and text columns

df["date"] = pd.to_datetime(df["date"])              # text → date
df["year"] = df["date"].dt.year                      # extract the year

df["n_words"] = df["text"].str.split().str.len()     # words per document
df["mentions_ai"] = df["text"].str.contains("artificial intelligence", case=False)

df["mentions_ai"].mean()                             # share of documents mentioning AI
  • .str gives you string methods on a whole column: lower(), contains(), replace(), len()…
  • Your first text-as-data measure, in one line (with all the limits of keywords: retrieval bias!)

Exercise: your dataset for the year

Load the earnings calls dataset you will work on for the rest of the year

  1. Open a new Colab notebook and save it in your Drive
  2. Load the dataset with pandas
  3. Explore it
    • How many calls? Which companies, which period?
    • What does one transcript look like? How long are they?
    • Which metadata do you have, and what is missing?

Good habits in Colab

  • Keep API keys out of your code
    • Use the Secrets panel (key icon on the left), then userdata.get("MY_KEY")
  • Make it reproducible
    • Installs and imports in the first cells
    • Fix random seeds
    • Restart and run all before sharing or submitting
  • Work as a group without overwriting each other
    • Colab does not merge edits: one notebook per task
    • Save a copy in Drive for your own tests
    • File → Revision history to go back
  • AI assistants are allowed, but…
    • You must understand, test and be able to explain every line
from google.colab import userdata
api_key = userdata.get("MY_KEY")      # never write the key itself in the notebook

To go further

References

Acemoglu, D., Autor, D., Hazell, J., & Restrepo, P. (2022). Artificial intelligence and jobs: Evidence from online vacancies. Journal of Labor Economics, 40(S1), S293–S340.
Acemoglu, D., Johnson, S., Kermani, A., Kwak, J., & Mitton, T. (2016). The value of connections in turbulent times: Evidence from the United States. Journal of Financial Economics, 121(2), 368–391. https://doi.org/10.1016/j.jfineco.2015.10.001
Almelhem, A., Iyigun, M., Kennedy, A., & Rubin, J. (2026). Enlightenment Ideals and Belief in Progress in the Run-up to the Industrial Revolution: A Textual Analysis. The Quarterly Journal of Economics, 141(1), 263–314. https://doi.org/10.1093/qje/qjaf054
Apel, M., Blix Grimaldi, M., & Hull, I. (2022). How Much Information Do Monetary Policy Committees Disclose? Evidence from the FOMC’s Minutes and Transcripts. Journal of Money, Credit and Banking, 54(5), 1459–1490. https://doi.org/10.1111/jmcb.12885
Ash, E., Chen, D. L., & Naidu, S. (2026). Ideas Have Consequences: The Impact of Law and Economics on American Justice. The Quarterly Journal of Economics, 141(1), 845–887. https://doi.org/10.1093/qje/qjaf042
Baker, S. R., Bloom, N., & Davis, S. J. (2016). Measuring Economic Policy Uncertainty*. The Quarterly Journal of Economics, 131(4), 1593–1636. https://doi.org/10.1093/qje/qjw024
Bennani, H., & Neuenkirch, M. (2017). The (home) bias of European central bankers: New evidence based on speeches. Applied Economics, 49(11), 1114–1131. https://doi.org/10.1080/00036846.2016.1210782
Benveniste, S., Coulomb, R., & Sangnier, M. (2026). The (Market) Value of State Honors. Journal of Law, Economics, and Organization.
Bianchi, F., Gómez-Cram, R., Kind, T., & Kung, H. (2023). Threats to central bank independence: High-frequency identification with twitter. Journal of Monetary Economics, 135, 37–54. https://doi.org/10.1016/j.jmoneco.2023.01.001
Bonaparte, Y. (2026). Independence under pressure: Quantifying presidential influence on the federal Reserve. Finance Research Letters, 102, 110042. https://doi.org/10.1016/j.frl.2026.110042
Campiglio, E., Deyris, J., Romelli, D., & Scalisi, G. (2025). Warning words in a warming world: Central bank communication and climate change. European Economic Review, 178, 105101. https://doi.org/10.1016/j.euroecorev.2025.105101
Do, S., Ollion, É., & Shen, R. (2024). The augmented social scientist: Using sequential transfer learning to annotate millions of texts with human-level accuracy. Sociological Methods & Research, 53(3), 1167–1200.
Drechsel, T. (2026). Political Pressure on the Fed. The Review of Economic Studies, rdag030. https://doi.org/10.1093/restud/rdag030
Ehrmann, M., Gnan, P., & Rieder, K. (2026). Central bank communication by ??? The economics of monetary policy leaks. Journal of Monetary Economics, 103959. https://doi.org/10.1016/j.jmoneco.2026.103959
Ehrmann, M., & Talmi, J. (2020). Starting from a blank page? Semantic similarity in central bank communication and market volatility. Journal of Monetary Economics, 111, 48–62. https://doi.org/10.1016/j.jmoneco.2019.01.028
Fernandez-Fuertes, R. (2025). Monetary Policy Shocks: A New Hope — Large Language Models and Central Bank Communication [{SSRN} {Scholarly} {Paper}]. Social Science Research Network. https://doi.org/10.2139/ssrn.5669212
Gorodnichenko, Y., Pham, T., & Talavera, O. (2023). The Voice of Monetary Policy. American Economic Review, 113(2), 548–584. https://doi.org/10.1257/aer.20220129
Grimmer, J., Roberts, M. E., & Stewart, B. M. (2022). Text as data: A new framework for machine learning and the social sciences. Princeton University Press.
Groves, R. M. (2011). Three Eras of Survey Research. Public Opinion Quarterly, 75(5), 861–871. https://doi.org/10.1093/poq/nfr057
Istrefi, K. (2019). In Fed Watchers’ Eyes: Hawks, Doves and Monetary Policy [{SSRN} {Scholarly} {Paper}]. Social Science Research Network. https://doi.org/10.2139/ssrn.3441659
Romer, C. D., & Romer, D. H. (2004). A New Measure of Monetary Shocks: Derivation and Implications. American Economic Review, 94(4), 1055–1084. https://doi.org/10.1257/0002828042002651
Sautner, Z., Van Lent, L., Vilkov, G., & Zhang, R. (2023). Firm-Level Climate Change Exposure. The Journal of Finance, 78(3), 1449–1498. https://doi.org/10.1111/jofi.13219
Schwartz, M., Andrews, I., & Shapiro, J. M. (2026). An LLM Workflow That Reproduces, Improves, and Extends Published Economics Research [Working {Paper}]. National Bureau of Economic Research. https://doi.org/10.3386/w35782

Thank you!

jerome.deyris@univ-paris1.fr