mergerlab
Calibrated merger simulation and antitrust screening in Python.
Abstract
Turns market shares, prices and a few margins into merger-guideline screens, predicted price effects under several demand models, and the cost synergies needed to keep prices flat. For competition economists, strategy consultants and M&A teams who must screen a horizontal deal quickly.

1Motivation
Merger reviews start from a few numbers, but the reference toolkits for calibrated merger simulation are R packages written by agency economists, and Python's pyblp is built for estimation, not quick calibration. mergerlab fills that gap and shows how much the answer depends on the assumed demand curve.
2Method
- Typed inputs for share bases, margins and diversion ratios.
- Calibrate logit, nested logit, CES, linear or PCAIDS demand.
- Recover marginal costs and solve the post-merger Bertrand equilibrium, accepting only fully converged solutions.
- Compute GUPPI, compensating marginal-cost reductions, consumer harm and guideline screens.
- Monte Carlo bands over uncertain inputs.
- Write a terminal summary and an HTML memo.
Checked against pyblp and the R package antitrust.
3Results







4Usage
4.1 Simulate a merger
Screens, price effects with Monte Carlo bands, synergy break-even and an HTML memo.
mergerlab simulate examples/heinz_beech_nut.toml --report memo.html
4.2 Screen concentration
HHI screens under the 2023 and 2010 U.S. guidelines and the EU guidelines.
mergerlab screen --shares 65 17.4 15.4 --merge 2 3
5Installation
pip install git+https://github.com/Thesimpleex/mergerlabPython 3.11 or later. Not on PyPI; installs from GitHub.
6Specification
- Runs
- Python 3.11+, CLI
- Built with
- Python, NumPy, SciPy, rich
- License
- MIT
- Version
- 0.1.0
Source code, issues and releases: github.com/Thesimpleex/mergerlab. License: MIT.