Majores Ventures

← All projects

mergerlab

Calibrated merger simulation and antitrust screening in Python.

Python library and CLI · Python, NumPy, SciPy, rich · MIT · v0.1.0 · github.com/Thesimpleex/mergerlab

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.

Predicted price effects of the Heinz/Beech-Nut merger under five demand models
Figure 1. Predicted price effects of the Heinz/Beech-Nut merger under five demand models.

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

  1. Typed inputs for share bases, margins and diversion ratios.
  2. Calibrate logit, nested logit, CES, linear or PCAIDS demand.
  3. Recover marginal costs and solve the post-merger Bertrand equilibrium, accepting only fully converged solutions.
  4. Compute GUPPI, compensating marginal-cost reductions, consumer harm and guideline screens.
  5. Monte Carlo bands over uncertain inputs.
  6. Write a terminal summary and an HTML memo.

Checked against pyblp and the R package antitrust.

3Results

CMCR of products A and B with the correct quantity diversion and with the revenue diversion plugged into the quantity formula
Figure 2. CMCR of products A and B with the correct quantity diversion and with the revenue diversion plugged into the quantity formula.
Terminal table comparing the textbook iteration with the gated solver on the pyblp scenarios and on 400 random nested-logit mergers
Figure 3. Terminal table comparing the textbook iteration with the gated solver on the pyblp scenarios and on 400 random nested-logit mergers.
Pricing pressure and first-order approximation against simulated price effects in 4,500 random markets, and median prediction errors compared with the paper
Figure 4. Pricing pressure and first-order approximation against simulated price effects in 4,500 random markets, and median prediction errors compared with the paper.
First-order concentration-based consumer harm, exact harm with rivals' prices fixed, and the full simulated compensating variation for Heinz / Beech-Nut at four CES elasticities of substitution
Figure 5. First-order concentration-based consumer harm, exact harm with rivals' prices fixed, and the full simulated compensating variation for Heinz / Beech-Nut at four CES elasticities of substitution.
Top of the generated merger memo: summary findings, transaction and market, structural screens
Figure 6. Top of the generated merger memo: summary findings, transaction and market, structural screens.
Price-effect chart and demand-form table of the generated merger memo, followed by the synergy table
Figure 7. Price-effect chart and demand-form table of the generated merger memo, followed by the synergy table.
Terminal output of mergerlab simulate for the Heinz / Beech-Nut case
Figure 8. Terminal output of mergerlab simulate for the Heinz / Beech-Nut case.

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/mergerlab

Python 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.