mergeron 2025.739319.2__py3-none-any.whl → 2025.739341.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mergeron might be problematic. Click here for more details.
- mergeron/__init__.py +21 -23
- mergeron/core/__init__.py +21 -5
- mergeron/core/empirical_margin_distribution.py +213 -158
- mergeron/core/ftc_merger_investigations_data.py +31 -35
- mergeron/core/guidelines_boundaries.py +27 -20
- mergeron/core/guidelines_boundary_functions.py +22 -32
- mergeron/core/guidelines_boundary_functions_extra.py +15 -30
- mergeron/core/pseudorandom_numbers.py +21 -18
- mergeron/data/__init__.py +13 -11
- mergeron/data/damodaran_margin_data_serialized.zip +0 -0
- mergeron/gen/__init__.py +38 -38
- mergeron/gen/data_generation.py +20 -24
- mergeron/gen/data_generation_functions.py +36 -51
- mergeron/gen/enforcement_stats.py +151 -27
- mergeron/gen/upp_tests.py +4 -9
- mergeron-2025.739341.8.dist-info/METADATA +94 -0
- mergeron-2025.739341.8.dist-info/RECORD +20 -0
- {mergeron-2025.739319.2.dist-info → mergeron-2025.739341.8.dist-info}/WHEEL +1 -1
- mergeron/data/damodaran_margin_data.xls +0 -0
- mergeron/demo/__init__.py +0 -3
- mergeron/demo/visualize_empirical_margin_distribution.py +0 -94
- mergeron-2025.739319.2.dist-info/METADATA +0 -174
- mergeron-2025.739319.2.dist-info/RECORD +0 -22
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: mergeron
|
|
3
|
+
Version: 2025.739341.8
|
|
4
|
+
Summary: Python for analyzing merger enforcement policy
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: merger policy analysis,merger guidelines,merger screening,policy presumptions,concentration standards,upward pricing pressure,GUPPI
|
|
7
|
+
Author: Murthy Kambhampaty
|
|
8
|
+
Author-email: smk@capeconomics.com
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Requires-Dist: aenum (>=3.1.15,<4.0.0)
|
|
22
|
+
Requires-Dist: attrs (>=23.2)
|
|
23
|
+
Requires-Dist: bs4 (>=0.0.1)
|
|
24
|
+
Requires-Dist: certifi (>=2023.11.17)
|
|
25
|
+
Requires-Dist: h5py (>=3.13.0,<4.0.0)
|
|
26
|
+
Requires-Dist: jinja2 (>=3.1)
|
|
27
|
+
Requires-Dist: joblib (>=1.3)
|
|
28
|
+
Requires-Dist: linuxdoc (>=20240924,<20240925)
|
|
29
|
+
Requires-Dist: lxml (>=5.3.1,<6.0.0)
|
|
30
|
+
Requires-Dist: matplotlib (>=3.8)
|
|
31
|
+
Requires-Dist: mpmath (>=1.3)
|
|
32
|
+
Requires-Dist: python-calamine (>=0.3.1,<0.4.0)
|
|
33
|
+
Requires-Dist: ruamel-yaml (>=0.18.10,<0.19.0)
|
|
34
|
+
Requires-Dist: scipy (>=1.12)
|
|
35
|
+
Requires-Dist: sympy (>=1.12)
|
|
36
|
+
Requires-Dist: types-beautifulsoup4 (>=4.11.2)
|
|
37
|
+
Requires-Dist: urllib3 (>=2.2.2,<3.0.0)
|
|
38
|
+
Project-URL: Documentation, https://capeconomics.github.io/mergeron/
|
|
39
|
+
Project-URL: Repository, https://github.com/capeconomics/mergeron.git
|
|
40
|
+
Description-Content-Type: text/x-rst
|
|
41
|
+
|
|
42
|
+
mergeron: Python for analyzing merger enforcement policy
|
|
43
|
+
========================================================
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
.. image:: https://img.shields.io/pypi/v/mergeron
|
|
47
|
+
:alt: PyPI - Package Version
|
|
48
|
+
:target: https://pypi.python.org/pypi/mergeron/
|
|
49
|
+
.. image:: https://img.shields.io/pypi/pyversions/mergeron
|
|
50
|
+
:alt: PyPI - Python Version
|
|
51
|
+
:target: https://pypi.python.org/pypi/mergeron/
|
|
52
|
+
.. image:: https://img.shields.io/pypi/status/mergeron
|
|
53
|
+
:alt: PyPI - Package status
|
|
54
|
+
:target: https://pypi.python.org/pypi/mergeron/
|
|
55
|
+
|
|
56
|
+
|
|
|
57
|
+
|
|
58
|
+
.. image:: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
|
|
59
|
+
:target: https://python-poetry.org/
|
|
60
|
+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
|
|
61
|
+
:target: https://github.com/astral-sh/ruff
|
|
62
|
+
.. image:: https://www.mypy-lang.org/static/mypy_badge.svg
|
|
63
|
+
:target: https://mypy-lang.org/
|
|
64
|
+
.. image:: https://img.shields.io/badge/code%20style-black-000000
|
|
65
|
+
:target: https://github.com/psf/black
|
|
66
|
+
.. image:: https://img.shields.io/badge/License-MIT-yellow
|
|
67
|
+
:alt: License: MIT
|
|
68
|
+
:target: https://opensource.org/licenses/MIT
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
*Visualize* the sets of mergers falling within specified concentration and diversion-ratio thresholds. *Analyze* merger investigations data published by the U.S. Federal Trade Commission in various reports on extended merger investigations (Second Requests) during 1996 to 2011.
|
|
72
|
+
*Generate* data under specified distributions of firm counts, market shares, price-cost margins, and prices, optionally imposing equilibrium conditions for Bertrand oligopoly with MNL demand and or restrictions implied by statutory filing thresholds. *Compute* intrinsic enforcement rates or
|
|
73
|
+
intrinsic clearance rates using the generated data, given thresholds for
|
|
74
|
+
concentration;
|
|
75
|
+
diversion ratio;
|
|
76
|
+
gross upward pricing pressure (GUPPI);
|
|
77
|
+
critical marginal cost reduction (CMCR); and
|
|
78
|
+
illustrative price rise (IPR).
|
|
79
|
+
|
|
80
|
+
Installation
|
|
81
|
+
------------
|
|
82
|
+
|
|
83
|
+
To install the package, use the following shell command:
|
|
84
|
+
|
|
85
|
+
.. code:: bash
|
|
86
|
+
|
|
87
|
+
pip install mergeron
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
Documentation
|
|
91
|
+
-------------
|
|
92
|
+
|
|
93
|
+
Usage guide and API reference available `here <https://capeconomics.github.io/mergeron/>`_.
|
|
94
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
mergeron/__init__.py,sha256=teyW3ktycQTdjw8WVqhlwrk9xi9LOI05KgKWLuCHJ9E,5773
|
|
2
|
+
mergeron/core/__init__.py,sha256=NChJfOkahbGPa1Ll1fO3agY5-IoDlEra3xNkXPnKIVM,3259
|
|
3
|
+
mergeron/core/empirical_margin_distribution.py,sha256=qfCsalO3EnsGclYeFxCgRu_-shbXP5kYIMf328lLC80,11455
|
|
4
|
+
mergeron/core/ftc_merger_investigations_data.py,sha256=k4TDkP1rDBmN4uKOYF0SUvSRkYmyVhbsBvLUKDYJqOo,28537
|
|
5
|
+
mergeron/core/guidelines_boundaries.py,sha256=Ct6JiuFjSVuCz-m-yeUc50xTC7F4tLgsyqXitb_nObI,15551
|
|
6
|
+
mergeron/core/guidelines_boundary_functions.py,sha256=ycz0W5tV9oJ9vVH83IVaprOW4RmG68q8t1QROkQcwxU,29048
|
|
7
|
+
mergeron/core/guidelines_boundary_functions_extra.py,sha256=bFRpPGKPHhuhXI67GlEOKtQrNo7WVTK7yMd9NlHCc-M,22095
|
|
8
|
+
mergeron/core/pseudorandom_numbers.py,sha256=-mPveXjJJ446NrBMAmWIa2jI6j0Px0xcCJTGEEsn3bo,10149
|
|
9
|
+
mergeron/data/__init__.py,sha256=CbqheFSkXEe7NOfuAV-NLaaEiNzl9pVCndGjtUUOj9g,1846
|
|
10
|
+
mergeron/data/damodaran_margin_data_serialized.zip,sha256=Wc1v9buSrYTWWAravG8W9nPbgsU07zMtSAR2RvMQU5s,623482
|
|
11
|
+
mergeron/data/ftc_merger_investigations_data.zip,sha256=tiB2TLFyS9LMSFIv8DBA_oEEx12DU4MyjHni4NlsRMU,24002
|
|
12
|
+
mergeron/gen/__init__.py,sha256=vr4B3AynBeohLPYeb6kD_iPdEOtta-dUfA7_Bi-l-jI,23649
|
|
13
|
+
mergeron/gen/data_generation.py,sha256=M7RBJO8distfdFPFQcQM4Mpfi2Etxy9HEw5EoyjWDow,17347
|
|
14
|
+
mergeron/gen/data_generation_functions.py,sha256=f6aLBg6JNqOoBq57k3ovevgvtaLfIAfT-ATzZl11CEA,26076
|
|
15
|
+
mergeron/gen/enforcement_stats.py,sha256=-vxB6U0dyXRmPZzhJ-8LyPESMycbnG4Tf95ydneIgjQ,14246
|
|
16
|
+
mergeron/gen/upp_tests.py,sha256=gRJISQ2jGmIDmFOvaTIkvYooI4mK-QbgkfgL46RrRio,7445
|
|
17
|
+
mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
18
|
+
mergeron-2025.739341.8.dist-info/METADATA,sha256=Toe2o1UJ7X-jQh2qAqL7AIqzLQa6lNKlbVmtYFja6rs,3906
|
|
19
|
+
mergeron-2025.739341.8.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
20
|
+
mergeron-2025.739341.8.dist-info/RECORD,,
|
|
Binary file
|
mergeron/demo/__init__.py
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Plot the empirical distribution derived using the Gaussian KDE with
|
|
3
|
-
margin data downloaded from Prof. Damodaran's website at NYU.
|
|
4
|
-
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import warnings
|
|
8
|
-
from pathlib import Path
|
|
9
|
-
|
|
10
|
-
import numpy as np
|
|
11
|
-
from matplotlib.ticker import StrMethodFormatter
|
|
12
|
-
from numpy.random import PCG64DXSM, Generator, SeedSequence
|
|
13
|
-
from scipy import stats # type: ignore
|
|
14
|
-
|
|
15
|
-
import mergeron.core.empirical_margin_distribution as emd
|
|
16
|
-
from mergeron import WORK_DIR as PKG_WORK_DIR
|
|
17
|
-
from mergeron.core.guidelines_boundary_functions import boundary_plot
|
|
18
|
-
|
|
19
|
-
WORK_DIR = globals().get("WORK_DIR", PKG_WORK_DIR)
|
|
20
|
-
"""Redefined, in case the user defines WORK_DIR betweeen module imports."""
|
|
21
|
-
|
|
22
|
-
SAMPLE_SIZE = 10**6
|
|
23
|
-
BIN_COUNT = 25
|
|
24
|
-
margin_data, margin_data_stats = emd.margin_data_builder()
|
|
25
|
-
|
|
26
|
-
margin_data_obs, margin_data_wts = margin_data[:, 0], margin_data[:, 1]
|
|
27
|
-
|
|
28
|
-
print(repr(margin_data_obs))
|
|
29
|
-
print(repr(margin_data_stats))
|
|
30
|
-
|
|
31
|
-
plt, mgn_fig, mgn_ax, set_axis_def = boundary_plot(mktshare_plot_flag=False)
|
|
32
|
-
mgn_fig.set_figheight(6.5)
|
|
33
|
-
mgn_fig.set_figwidth(9.0)
|
|
34
|
-
|
|
35
|
-
_, mgn_bins, _ = mgn_ax.hist(
|
|
36
|
-
x=margin_data_obs,
|
|
37
|
-
weights=margin_data_wts,
|
|
38
|
-
bins=BIN_COUNT,
|
|
39
|
-
alpha=0.4,
|
|
40
|
-
density=True,
|
|
41
|
-
label="Downloaded data",
|
|
42
|
-
color="#004488", # Paul Tol's High Contrast Blue
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
with warnings.catch_warnings():
|
|
46
|
-
warnings.filterwarnings("ignore", category=UserWarning)
|
|
47
|
-
# Don't warn regarding the below; ticklabels have been fixed before this point
|
|
48
|
-
mgn_ax.set_yticklabels([
|
|
49
|
-
f"{float(_g.get_text()) * np.diff(mgn_bins)[-1]:.0%}"
|
|
50
|
-
for _g in mgn_ax.get_yticklabels()
|
|
51
|
-
])
|
|
52
|
-
|
|
53
|
-
mgn_kde = stats.gaussian_kde(
|
|
54
|
-
margin_data_obs, weights=margin_data_wts, bw_method="silverman"
|
|
55
|
-
)
|
|
56
|
-
mgn_kde.set_bandwidth(bw_method=mgn_kde.factor / 3.0)
|
|
57
|
-
|
|
58
|
-
mgn_ax.plot(
|
|
59
|
-
(_xv := np.linspace(0, BIN_COUNT, 10**5) / BIN_COUNT),
|
|
60
|
-
mgn_kde(_xv),
|
|
61
|
-
color="#004488",
|
|
62
|
-
rasterized=True,
|
|
63
|
-
label="Estimated Density",
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
mgn_ax.hist(
|
|
67
|
-
x=mgn_kde.resample(
|
|
68
|
-
SAMPLE_SIZE, seed=Generator(PCG64DXSM(SeedSequence(pool_size=8)))
|
|
69
|
-
)[0],
|
|
70
|
-
color="#DDAA33", # Paul Tol's High Contrast Yellow
|
|
71
|
-
alpha=0.6,
|
|
72
|
-
bins=BIN_COUNT,
|
|
73
|
-
density=True,
|
|
74
|
-
label="Generated data",
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
mgn_ax.legend(
|
|
78
|
-
loc="best",
|
|
79
|
-
fancybox=False,
|
|
80
|
-
shadow=False,
|
|
81
|
-
frameon=True,
|
|
82
|
-
facecolor="white",
|
|
83
|
-
edgecolor="white",
|
|
84
|
-
framealpha=1,
|
|
85
|
-
fontsize="small",
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
mgn_ax.set_xlim(0.0, 1.0)
|
|
89
|
-
mgn_ax.xaxis.set_major_formatter(StrMethodFormatter("{x:>3.0%}"))
|
|
90
|
-
mgn_ax.set_xlabel("Price Cost Margin", fontsize=10)
|
|
91
|
-
mgn_ax.set_ylabel("Relative Frequency", fontsize=10)
|
|
92
|
-
|
|
93
|
-
mgn_fig.tight_layout()
|
|
94
|
-
plt.savefig(WORK_DIR / f"{Path(__file__).stem}.pdf")
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: mergeron
|
|
3
|
-
Version: 2025.739319.2
|
|
4
|
-
Summary: Analyze merger enforcement policy using Python
|
|
5
|
-
License: MIT
|
|
6
|
-
Keywords: merger policy analysis,merger guidelines,merger screening,policy presumptions,concentration standards,upward pricing pressure,GUPPI
|
|
7
|
-
Author: Murthy Kambhampaty
|
|
8
|
-
Author-email: smk@capeconomics.com
|
|
9
|
-
Requires-Python: >=3.12,<4.0
|
|
10
|
-
Classifier: Development Status :: 4 - Beta
|
|
11
|
-
Classifier: Environment :: Console
|
|
12
|
-
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python
|
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
22
|
-
Requires-Dist: aenum (>=3.1.15,<4.0.0)
|
|
23
|
-
Requires-Dist: attrs (>=23.2)
|
|
24
|
-
Requires-Dist: bs4 (>=0.0.1)
|
|
25
|
-
Requires-Dist: certifi (>=2023.11.17)
|
|
26
|
-
Requires-Dist: h5py (>=3.13.0,<4.0.0)
|
|
27
|
-
Requires-Dist: jinja2 (>=3.1)
|
|
28
|
-
Requires-Dist: joblib (>=1.3)
|
|
29
|
-
Requires-Dist: matplotlib (>=3.8)
|
|
30
|
-
Requires-Dist: mpmath (>=1.3)
|
|
31
|
-
Requires-Dist: msgpack (>=1.0)
|
|
32
|
-
Requires-Dist: msgpack-numpy (>=0.4)
|
|
33
|
-
Requires-Dist: ruamel-yaml (>=0.18.10,<0.19.0)
|
|
34
|
-
Requires-Dist: scipy (>=1.12)
|
|
35
|
-
Requires-Dist: sympy (>=1.12)
|
|
36
|
-
Requires-Dist: types-beautifulsoup4 (>=4.11.2)
|
|
37
|
-
Requires-Dist: urllib3 (>=2.2.2,<3.0.0)
|
|
38
|
-
Requires-Dist: xlrd (>=2.0.1,<3.0.0)
|
|
39
|
-
Requires-Dist: xlsxwriter (>=3.1)
|
|
40
|
-
Description-Content-Type: text/x-rst
|
|
41
|
-
|
|
42
|
-
mergeron: Merger Policy Analysis with Python
|
|
43
|
-
============================================
|
|
44
|
-
|
|
45
|
-
Usage
|
|
46
|
-
-----
|
|
47
|
-
|
|
48
|
-
*Visualizing Guidelines boundaries*
|
|
49
|
-
|
|
50
|
-
.. code:: python
|
|
51
|
-
|
|
52
|
-
%matplotlib inline
|
|
53
|
-
from mergeron.core import guidelines_boundaries as gbl
|
|
54
|
-
from mergeron.core import guidelines_boundary_functions as gbf
|
|
55
|
-
from math import sqrt
|
|
56
|
-
|
|
57
|
-
delta_bound = 0.01
|
|
58
|
-
conc_boundary = gbl.ConcentrationBoundary(delta_bound, "ΔHHI")
|
|
59
|
-
share_boundary = gbl.ConcentrationBoundary(2 * sqrt(delta_bound / 2), "Combined share")
|
|
60
|
-
|
|
61
|
-
divr_boundary_a = gbl.DiversionRatioBoundary(
|
|
62
|
-
gbl.guppi_from_delta(delta_bound, m_star=1.0, r_bar=0.85),
|
|
63
|
-
agg_method=gbl.UPPAggrSelector.AVG
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
divr_boundary_i = gbl.DiversionRatioBoundary(
|
|
67
|
-
gbl.guppi_from_delta(delta_bound, m_star=1.0, r_bar=0.85),
|
|
68
|
-
agg_method=gbl.UPPAggrSelector.MIN
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
divr_boundary_x = gbl.DiversionRatioBoundary(
|
|
72
|
-
gbl.guppi_from_delta(delta_bound, m_star=1.0, r_bar=0.85),
|
|
73
|
-
agg_method=gbl.UPPAggrSelector.MAX
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Plots are written to PDF, typically, with ``backend="pgf"`` as the
|
|
78
|
-
default backend in the function, ``gbf.boundary_plot``. Here, we set the
|
|
79
|
-
backend to ``None`` to skip fine-tuning plots for PDF generation.
|
|
80
|
-
|
|
81
|
-
.. code:: python
|
|
82
|
-
|
|
83
|
-
plt, fig, ax, layout_axis = gbf.boundary_plot(backend=None)
|
|
84
|
-
|
|
85
|
-
ax.set_title("Concentration and Diversion Ratio Boundaries")
|
|
86
|
-
|
|
87
|
-
ax.plot(conc_boundary.coordinates[:, 0], conc_boundary.coordinates[:, 1], color="black", linestyle="-", label="ΔHHI")
|
|
88
|
-
ax.plot(share_boundary.coordinates[:, 0], share_boundary.coordinates[:, 1], color="black", linestyle=":", label="Combined share")
|
|
89
|
-
ax.plot(divr_boundary_a.coordinates[:, 0], divr_boundary_a.coordinates[:, 1], "b-", label="Average Diversion Ratio")
|
|
90
|
-
ax.plot(divr_boundary_i.coordinates[:, 0], divr_boundary_i.coordinates[:, 1], "r-", label="Minimum Diversion Ratio")
|
|
91
|
-
ax.plot(divr_boundary_x.coordinates[:, 0], divr_boundary_x.coordinates[:, 1], "g-", label="Maximum Diversion Ratio")
|
|
92
|
-
|
|
93
|
-
_ = fig.legend(loc=(0.4, 0.7), frameon=False)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*Analyzing FTC Merger Investigations Data*
|
|
97
|
-
|
|
98
|
-
.. code:: python
|
|
99
|
-
|
|
100
|
-
from mergeron.core import ftc_merger_investigations_data as fid
|
|
101
|
-
import tabulate
|
|
102
|
-
|
|
103
|
-
inv_data = fid.construct_data(fid.INVDATA_ARCHIVE_PATH)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
We can now analyze counts of markets reported in the source data, by
|
|
107
|
-
table number. Note that odd-numbered tables report FTC investigations
|
|
108
|
-
data organized by HHI and ΔHHI, while even-numbered tables report by
|
|
109
|
-
firm-count.
|
|
110
|
-
|
|
111
|
-
.. code:: python
|
|
112
|
-
|
|
113
|
-
from mergeron.gen import enforcement_stats as esl
|
|
114
|
-
|
|
115
|
-
print("Enforcement Rates in Markets with Entry Barriers, 1996-2003 vs 2004-2011")
|
|
116
|
-
print()
|
|
117
|
-
counts_by_delta_1 = esl.enf_cnts_bydelta(
|
|
118
|
-
inv_data["1996-2003"]["ByHHIandDelta"]["Table 9.2"].data_array
|
|
119
|
-
)
|
|
120
|
-
counts_by_delta_2 = esl.enf_cnts_bydelta(
|
|
121
|
-
inv_data["2004-2011"]["ByHHIandDelta"]["Table 9.2"].data_array
|
|
122
|
-
)
|
|
123
|
-
observed_enforcement_rates = list(zip(
|
|
124
|
-
(
|
|
125
|
-
{_v: _k for _k, _v in fid.CONC_DELTA_DICT.items()}[i]
|
|
126
|
-
for i in counts_by_delta_1[:, 0]
|
|
127
|
-
),
|
|
128
|
-
(
|
|
129
|
-
f"{_a[1] / _a[-1]: <12.2%}" if _a[-1] else "--"
|
|
130
|
-
for _a in counts_by_delta_1
|
|
131
|
-
),
|
|
132
|
-
(
|
|
133
|
-
f"{_e[1] / _e[-1]: <12.2%}" if _e[-1] else "--"
|
|
134
|
-
for _e in counts_by_delta_2
|
|
135
|
-
),
|
|
136
|
-
))
|
|
137
|
-
|
|
138
|
-
observed_enforcement_rates.append([
|
|
139
|
-
"Total",
|
|
140
|
-
f"{counts_by_delta_1[:, 1].sum() / counts_by_delta_1[:, -1].sum(): <12.2%}",
|
|
141
|
-
f"{counts_by_delta_2[:, 1].sum() / counts_by_delta_2[:, -1].sum(): <12.2%}",
|
|
142
|
-
])
|
|
143
|
-
|
|
144
|
-
print(tabulate.tabulate(
|
|
145
|
-
observed_enforcement_rates,
|
|
146
|
-
tablefmt="simple",
|
|
147
|
-
headers=("ΔHHI", "1996-2003", "2004-2011"),
|
|
148
|
-
stralign="center",
|
|
149
|
-
maxcolwidths=36,
|
|
150
|
-
maxheadercolwidths=36,
|
|
151
|
-
))
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
.. parsed-literal::
|
|
155
|
-
|
|
156
|
-
Enforcement Rates in Markets with Entry Barriers, 1996-2003 vs 2004-2011
|
|
157
|
-
|
|
158
|
-
ΔHHI 1996-2003 2004-2011
|
|
159
|
-
------------- ----------- -----------
|
|
160
|
-
0 - 100 -- 100.00%
|
|
161
|
-
100 - 200 33.33% 50.00%
|
|
162
|
-
200 - 300 33.33% 50.00%
|
|
163
|
-
300 - 500 75.00% 77.78%
|
|
164
|
-
500 - 800 59.09% 54.55%
|
|
165
|
-
800 - 1,200 93.33% 81.82%
|
|
166
|
-
1,200 - 2,500 90.91% 84.38%
|
|
167
|
-
2,500 + 96.00% 100.00%
|
|
168
|
-
Total 81.65% 82.86%
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Generating synthetic market data and analyzing enforcement rates
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
mergeron/__init__.py,sha256=xphVoHY19dbpym2LgjgAi5wedI5x0VsRocAy_dOqqFM,5549
|
|
2
|
-
mergeron/core/__init__.py,sha256=BzL_bXHyOQG8cvo76OP3K48LkeHQCJQN7ZFPRhoOdcE,2850
|
|
3
|
-
mergeron/core/empirical_margin_distribution.py,sha256=PwAxOLc7zgL4OHVH1kQRtxP7m5XAVUPtMVomM2uvnKM,9527
|
|
4
|
-
mergeron/core/ftc_merger_investigations_data.py,sha256=DYqtyxGPnpGyaWbQ8dPHmHmQBOeHbmU5h9snk-YwSN4,28575
|
|
5
|
-
mergeron/core/guidelines_boundaries.py,sha256=hZ3Fiobb9KXCBybQjb_xJj4q_-r8ClmxRjd6Scv7Km4,15238
|
|
6
|
-
mergeron/core/guidelines_boundary_functions.py,sha256=wQdIQcEga888vVe3cAwYsDa7HTaxgqe3RbV48UklmzQ,29064
|
|
7
|
-
mergeron/core/guidelines_boundary_functions_extra.py,sha256=i2CmEpYRUVnMbPakSjlyWodMP11JW-rkVImhKOQlV6g,22355
|
|
8
|
-
mergeron/core/pseudorandom_numbers.py,sha256=YqcVwU-Pgc0F_pKzG9Osn14RnIuYOwE-q7GVDpCUtpI,9998
|
|
9
|
-
mergeron/data/__init__.py,sha256=4yOOvERJ28JIT5KRkIa_t2y9aYmuFdStPM4P38BsufM,1806
|
|
10
|
-
mergeron/data/damodaran_margin_data.xls,sha256=Qggl1p5nkOMJI8YUXhkwXQRz-OhRSqBTzz57N0JQyYA,79360
|
|
11
|
-
mergeron/data/ftc_merger_investigations_data.zip,sha256=tiB2TLFyS9LMSFIv8DBA_oEEx12DU4MyjHni4NlsRMU,24002
|
|
12
|
-
mergeron/demo/__init__.py,sha256=KtjBlZOl7jwBCAUhrTJB9PdrN39YLYytNiSUSM_gRmA,62
|
|
13
|
-
mergeron/demo/visualize_empirical_margin_distribution.py,sha256=N8pYTl11ngG-W5WOjjYDigCIZs5LPVrUNxdgEHLwTHE,2584
|
|
14
|
-
mergeron/gen/__init__.py,sha256=2DqhKw1xJT20r_k9s7Hxpadnes0I6g0yWSiBhAc-cVM,22970
|
|
15
|
-
mergeron/gen/data_generation.py,sha256=x5hlRH0AeTHcoYszTxBKIWx8pyf-Lq9Yf0YYBcD2ofU,17147
|
|
16
|
-
mergeron/gen/data_generation_functions.py,sha256=ozgNg71_dYTRy-emlWafOvleiQI_479hRYrLzTp4NcE,26421
|
|
17
|
-
mergeron/gen/enforcement_stats.py,sha256=UrsZWZNYy7DXWsCu96qmOQINipFbf9qLX0W8iNGgE_Y,11073
|
|
18
|
-
mergeron/gen/upp_tests.py,sha256=qCyIMY8fuaRqGobwlcu3SPpIlD-dDNdM53qC8CTx59k,7480
|
|
19
|
-
mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
20
|
-
mergeron-2025.739319.2.dist-info/METADATA,sha256=UuxtNLK2yBiLtxInkFauiPinQehMikNg7pvaJYf1XLI,6056
|
|
21
|
-
mergeron-2025.739319.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
22
|
-
mergeron-2025.739319.2.dist-info/RECORD,,
|