davechipshop/BoE-changepoint_detection

Repository for MLDS Research Project: Changepoint detection on text data with an application to Bank of England monetary policy communication. A study of text representations effects on changepoint recovery through a simulation study and Bank of England case study

Jupyter Notebook

0

1 commits

updated Aug 30, 2026

See the code

README

Text Representations for Central Bank Communication Changepoint Detection

This is my Dissertation codebase exploring how different text representations (scalar sentiment scores, TF-IDF, and transformer embeddings) affect changepoint detection on Bank of England Monetary Policy Committee (MPC) minutes, using both real BoE data and synthetic LLM-generated corpora.

Contents

  • text_mining_data_processing.ipynb — scrapes and cleans BoE MPC minutes (1997–2026) from bankofengland.co.uk, extracts features (bank rate, decision direction), and produces the cleaned dataset used downstream.
  • synthetic_text_generation.ipynb — generates synthetic BoE-style documents via a locally-served Ollama model, including a graded hawkish-dovish sentiment ladder, topic-shift corpora, and extreme positive/negative tone corpora, for controlled changepoint simulations.
  • simulation_study.ipynb — Monte Carlo simulation study comparing scalar/TF-IDF/embedding representations and kernel choices for changepoint detection accuracy.
  • CPD_real_BoE_data.ipynb — applies changepoint detection to the real scraped BoE minutes corpus.
  • embedding_exploration.ipynb — exploratory analysis of transformer embedding representations.
  • topic_prevalence_experiment.ipynb — topic prevalence analysis over time.
  • utils/ — shared helper modules (sentiment.py, text_mining.py, kernel_mmd.py, ruptures_wrappers.py).
  • data/ — scraped BoE minutes and synthetic corpora (CSV).

Setup

python -m venv .venv
.venv\Scripts\activate   
pip install -r requirements.txt

Some notebooks (synthetic_text_generation.ipynb) require a locally running Ollama server with a pulled model (e.g. ollama pull mistral) reachable at http://localhost:11434.

Suggested run order

  1. text_mining_data_processing.ipynb
  2. synthetic_text_generation.ipynb
  3. simulation_study.ipynb
  4. CPD_real_BoE_data.ipynb

Notes

This is a research/dissertation repo, not a packaged library — code prioritizes clarity and reproducibility of experiments over production-readiness.

davechipshop/BoE-changepoint_detection

Repository for MLDS Research Project: Changepoint detection on text data with an application to Bank of England monetary policy communication. A study of text representations effects on changepoint recovery through a simulation study and Bank of England case study

Jupyter Notebook

0

1 commits

updated Aug 30, 2026

See the code

README

Text Representations for Central Bank Communication Changepoint Detection

This is my Dissertation codebase exploring how different text representations (scalar sentiment scores, TF-IDF, and transformer embeddings) affect changepoint detection on Bank of England Monetary Policy Committee (MPC) minutes, using both real BoE data and synthetic LLM-generated corpora.

Contents

  • text_mining_data_processing.ipynb — scrapes and cleans BoE MPC minutes (1997–2026) from bankofengland.co.uk, extracts features (bank rate, decision direction), and produces the cleaned dataset used downstream.
  • synthetic_text_generation.ipynb — generates synthetic BoE-style documents via a locally-served Ollama model, including a graded hawkish-dovish sentiment ladder, topic-shift corpora, and extreme positive/negative tone corpora, for controlled changepoint simulations.
  • simulation_study.ipynb — Monte Carlo simulation study comparing scalar/TF-IDF/embedding representations and kernel choices for changepoint detection accuracy.
  • CPD_real_BoE_data.ipynb — applies changepoint detection to the real scraped BoE minutes corpus.
  • embedding_exploration.ipynb — exploratory analysis of transformer embedding representations.
  • topic_prevalence_experiment.ipynb — topic prevalence analysis over time.
  • utils/ — shared helper modules (sentiment.py, text_mining.py, kernel_mmd.py, ruptures_wrappers.py).
  • data/ — scraped BoE minutes and synthetic corpora (CSV).

Setup

python -m venv .venv
.venv\Scripts\activate   
pip install -r requirements.txt

Some notebooks (synthetic_text_generation.ipynb) require a locally running Ollama server with a pulled model (e.g. ollama pull mistral) reachable at http://localhost:11434.

Suggested run order

  1. text_mining_data_processing.ipynb
  2. synthetic_text_generation.ipynb
  3. simulation_study.ipynb
  4. CPD_real_BoE_data.ipynb

Notes

This is a research/dissertation repo, not a packaged library — code prioritizes clarity and reproducibility of experiments over production-readiness.