Skip to content

Structural demand estimation using the BLP (1995) framework. Generates synthetic data (Monte Carlo) of the snack food industry, showcases the shortcomings of misspecified models, and performs merger simulations using pyBLP.

License

Notifications You must be signed in to change notification settings

leon-sieverding/structural-demand-blp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Structural Demand Estimation & Merger Simulation (Snack Food Industry)

Overview

This project implements a full structural demand estimation pipeline to analyze market power and merger effects in a differentiated product market. Using Python and pyBLP, I simulate a stylized industry environment, estimate demand using structural econometric models (BLP), and conduct a counterfactual merger simulation.

The goal is to demonstrate the end-to-end workflow of an industrial economist: from data generation and handling endogeneity to policy analysis.

Project Structure

The analysis is divided into three Jupyter Notebooks:

1. Data Simulation (01_data_generation.ipynb)

  • Objective: Construct a synthetic market for a "Snack Food" industry with 4 major firms and differentiated products (Sweet vs. Salty).
  • Method:
    • Simulated consumer heterogeneity using random coefficients for product characteristics.
    • Modeled supply-side costs with random shocks.
    • Solved for Nash-Bertrand equilibrium prices by inverting the demand system.
  • Output: A clean dataset (simulated_snack_data.csv) containing market shares, prices, and characteristics across 750 markets.

2. Estimation (02_estimation_comparison.ipynb)

  • Objective: Recover the true structural parameters from the observational data.
  • Method:
    • OLS Logit: Demonstrated the attenuation bias when endogeneity is ignored.
    • IV Logit: Showed unrealistic substitution patterns due to Independence of Irrelevant Alternatives.
    • Nested Logit: Controlled for within-group substitution patterns (Sweet/Salty nests).
    • BLP (Random Coefficients): Implemented the full random coefficients logit model using pyBLP to capture flexible substitution patterns.

3. Merger Simulation (03_merger_simulation.ipynb)

  • Objective: Simulate a horizontal merger between producers of salty snacks to predict price effects and welfare changes.
  • Key Findings:
    • Price Effect: The merger leads to a significant price increase due to the loss of competition between the merging parties.
    • Efficiency Defense: I tested whether a 8% reduction in marginal costs (synergies) is sufficient to offset the anti-competitive price increases.
    • Welfare Analysis: The simulation shows that consumer surplus drops despite the efficiency gains.

Tech Stack

  • Python: Core programming language.
  • pyBLP: State-of-the-art BLP estimation routine (Conlon & Gortmaker, 2020).
  • NumPy / Pandas: Data manipulation and vectorization.
  • Statsmodels: Reduced-form regression baselines.

Repository

Acknowledgments

This project is an independent, illustrative implementation of a stylized structural demand estimation pipeline using the pyBLP package (Conlon and Gortmaker, 2020). It draws on general concepts commonly taught in graduate Industrial Organization courses, reflecting my training at the Yale Department of Economics. All code and analysis are my own.

About

Structural demand estimation using the BLP (1995) framework. Generates synthetic data (Monte Carlo) of the snack food industry, showcases the shortcomings of misspecified models, and performs merger simulations using pyBLP.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published