mergeron 2024.738963.0__py3-none-any.whl → 2025.739265.0__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 +26 -6
- mergeron/core/__init__.py +5 -65
- mergeron/core/{damodaran_margin_data.py → empirical_margin_distribution.py} +74 -58
- mergeron/core/ftc_merger_investigations_data.py +142 -93
- mergeron/core/guidelines_boundaries.py +289 -1077
- mergeron/core/guidelines_boundary_functions.py +1128 -0
- mergeron/core/{guidelines_boundaries_specialized_functions.py → guidelines_boundary_functions_extra.py} +76 -42
- mergeron/core/pseudorandom_numbers.py +16 -22
- mergeron/data/__init__.py +3 -0
- mergeron/data/damodaran_margin_data.xls +0 -0
- mergeron/data/damodaran_margin_data_dict.msgpack +0 -0
- mergeron/demo/__init__.py +3 -0
- mergeron/demo/visualize_empirical_margin_distribution.py +86 -0
- mergeron/gen/__init__.py +257 -245
- mergeron/gen/data_generation.py +473 -221
- mergeron/gen/data_generation_functions.py +876 -0
- mergeron/gen/enforcement_stats.py +355 -0
- mergeron/gen/upp_tests.py +159 -259
- mergeron-2025.739265.0.dist-info/METADATA +115 -0
- mergeron-2025.739265.0.dist-info/RECORD +23 -0
- {mergeron-2024.738963.0.dist-info → mergeron-2025.739265.0.dist-info}/WHEEL +1 -1
- mergeron/License.txt +0 -16
- mergeron/core/InCommon RSA Server CA cert chain.pem +0 -68
- mergeron/core/excel_helper.py +0 -259
- mergeron/core/proportions_tests.py +0 -520
- mergeron/ext/__init__.py +0 -5
- mergeron/ext/tol_colors.py +0 -851
- mergeron/gen/_data_generation_functions_nonpublic.py +0 -621
- mergeron/gen/investigations_stats.py +0 -709
- mergeron/jinja_LaTex_templates/clrrate_cis_summary_table_template.tex.jinja2 +0 -121
- mergeron/jinja_LaTex_templates/ftcinvdata_byhhianddelta_table_template.tex.jinja2 +0 -82
- mergeron/jinja_LaTex_templates/ftcinvdata_summary_table_template.tex.jinja2 +0 -57
- mergeron/jinja_LaTex_templates/ftcinvdata_summarypaired_table_template.tex.jinja2 +0 -104
- mergeron/jinja_LaTex_templates/mergeron.cls +0 -161
- mergeron/jinja_LaTex_templates/mergeron_table_collection_template.tex.jinja2 +0 -90
- mergeron/jinja_LaTex_templates/setup_tikz_tables.tex.jinja2 +0 -84
- mergeron-2024.738963.0.dist-info/METADATA +0 -108
- mergeron-2024.738963.0.dist-info/RECORD +0 -30
- /mergeron/{core → data}/ftc_invdata.msgpack +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
((# We force some color defintions here. These could be set in package code. #))
|
|
2
|
-
((* set obs_header_color = "0a6c97" *))
|
|
3
|
-
((* set sim_header_color = "646464" *))
|
|
4
|
-
((* set data_fill_color = "dfeadf" *))
|
|
5
|
-
% Tables in tikz, but first we need to define some colors for nonwhite text backgrounds
|
|
6
|
-
\definecolor{OBSHDRFill}{HTML}{\JINVAR{- obs_header_color -}}
|
|
7
|
-
\definecolor{SIMHDRFill}{HTML}{\JINVAR{- sim_header_color -}}
|
|
8
|
-
\definecolor{DataFill}{HTML}{\JINVAR{- data_fill_color -}}
|
|
9
|
-
% The below are definition's from Paul Tol's website, https://personal.sron.nl/~pault/
|
|
10
|
-
\definecolor{VibrBlue}{HTML}{0077bb}
|
|
11
|
-
\definecolor{BrightGreen}{HTML}{228833}
|
|
12
|
-
\definecolor{HiCoYellow}{HTML}{ddaa33}
|
|
13
|
-
\definecolor{VibrRed}{HTML}{cc3311}
|
|
14
|
-
% Some useful documents from grokking various options used below
|
|
15
|
-
% https://courses.helsinki.fi/sites/default/files/course-material/4611024/LaTeXandFriendsCourseInHelsinki_9_v2.pdf
|
|
16
|
-
% https://tug.org/TUGboat/tb39-1/tb121duck-tikz.pdf
|
|
17
|
-
% https://tug.org/TUGboat/tb41-1/tb127duck-matrix.pdf
|
|
18
|
-
% https://tex.stackexchange.com/questions/22286/coloring-every-other-row-of-a-table-with-vertical-lines
|
|
19
|
-
% https://tex.stackexchange.com/questions/354043/swot-matrix-with-multicolumn-and-multirow
|
|
20
|
-
% https://tex.stackexchange.com/questions/20599/horizontal-row-separation-line-in-tikz-matrix-like-hline-in-tabular
|
|
21
|
-
% https://tex.stackexchange.com/questions/63560/how-to-use-x-coordinate-of-a-point-and-y-coordinate-of-other-point
|
|
22
|
-
% https://tex.stackexchange.com/questions/167944/auto-word-wrapping-in-a-node-in-tikz
|
|
23
|
-
% https://tex.stackexchange.com/questions/132741/typewriter-in-tikz-node
|
|
24
|
-
\tikzset{
|
|
25
|
-
% If you only have numbers, text depth = 0ex; if text, text depth = 0.25ex, (may need tweaking for alignment across cells)
|
|
26
|
-
anytext/.style = {
|
|
27
|
-
align = center,
|
|
28
|
-
font = \sffamily\scriptsize,
|
|
29
|
-
inner sep = 0pt,
|
|
30
|
-
text depth = 0pt,
|
|
31
|
-
}, %
|
|
32
|
-
hdrtext/.style = {
|
|
33
|
-
anytext,
|
|
34
|
-
text = white,
|
|
35
|
-
fill = OBSHDRFill,
|
|
36
|
-
}, %
|
|
37
|
-
notetext/.style = {
|
|
38
|
-
anytext,
|
|
39
|
-
font = \sffamily\tiny,
|
|
40
|
-
align = left,
|
|
41
|
-
},
|
|
42
|
-
anytable/.style = {
|
|
43
|
-
matrix of nodes,
|
|
44
|
-
nodes in empty cells,
|
|
45
|
-
column sep = -1.0\pgflinewidth,
|
|
46
|
-
row sep = -1.0\pgflinewidth,
|
|
47
|
-
inner sep = -0.25\pgflinewidth,
|
|
48
|
-
outer sep = -0.25\pgflinewidth,
|
|
49
|
-
nodes = {anchor = center, minimum height = 12.5pt,}
|
|
50
|
-
},
|
|
51
|
-
datatable/.style = {
|
|
52
|
-
anytable,
|
|
53
|
-
nodes = {
|
|
54
|
-
font = \sffamily\scriptsize\addfontfeatures{Numbers={Monospaced,Lining}},
|
|
55
|
-
align = right,
|
|
56
|
-
inner xsep = 3pt,
|
|
57
|
-
inner ysep = 0pt,
|
|
58
|
-
text depth = 0pt,
|
|
59
|
-
draw = none,
|
|
60
|
-
fill = none,
|
|
61
|
-
},
|
|
62
|
-
every even row/.style = {
|
|
63
|
-
nodes = {fill = DataFill}
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
hrow/.style = {
|
|
67
|
-
anytable,
|
|
68
|
-
nodes = {
|
|
69
|
-
hdrtext,
|
|
70
|
-
draw = none,
|
|
71
|
-
fill = OBSHDRFill,
|
|
72
|
-
text width = 40pt,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
hcol/.style = {
|
|
76
|
-
hrow,
|
|
77
|
-
nodes = {text width = 60pt,},
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
% Define layers for later reference
|
|
81
|
-
% https://tex.stackexchange.com/questions/40840/put-a-node-behind-another-in-a-tikz-diagram
|
|
82
|
-
\pgfdeclarelayer{background}
|
|
83
|
-
\pgfsetlayers{background,main}
|
|
84
|
-
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: mergeron
|
|
3
|
-
Version: 2024.738963.0
|
|
4
|
-
Summary: Analysis of standards defined in Horizontal Merger Guidelines
|
|
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 :: Only
|
|
20
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
-
Requires-Dist: attrs (>=23.2)
|
|
22
|
-
Requires-Dist: bs4 (>=0.0.1)
|
|
23
|
-
Requires-Dist: certifi (>=2023.11.17)
|
|
24
|
-
Requires-Dist: google-re2 (>=1.1)
|
|
25
|
-
Requires-Dist: importlib-metadata (>=7.0.1)
|
|
26
|
-
Requires-Dist: jinja2 (>=3.1)
|
|
27
|
-
Requires-Dist: joblib (>=1.3)
|
|
28
|
-
Requires-Dist: lxml (>=5.0)
|
|
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: numpy (>=1.26)
|
|
34
|
-
Requires-Dist: openpyxl (>=3.1.2)
|
|
35
|
-
Requires-Dist: requests (>=2.31)
|
|
36
|
-
Requires-Dist: requests-toolbelt (>=1.0.0)
|
|
37
|
-
Requires-Dist: scipy (>=1.12)
|
|
38
|
-
Requires-Dist: sympy (>=1.12)
|
|
39
|
-
Requires-Dist: tables (>=3.8)
|
|
40
|
-
Requires-Dist: xlrd (>=2.0)
|
|
41
|
-
Requires-Dist: xlsxwriter (>=3.1)
|
|
42
|
-
Description-Content-Type: text/x-rst
|
|
43
|
-
|
|
44
|
-
mergeron: Merger Policy Analysis with Python
|
|
45
|
-
============================================
|
|
46
|
-
|
|
47
|
-
Download and analyze merger investigations data published by the U.S. Federal Trade Commission in various reports on extended merger investigations during 1996 to 2011. Model the sets of mergers conforming to various U.S. Horizontal Merger Guidelines standards. Analyze intrinsic clearance rates and intrinsic enforcement rates under Guidelines standards using generated data with specified distributions of market shares, price-cost margins, firm counts, and prices, optionally imposing restrictions impled by statutory filing thresholds and/or Bertrand-Nash oligopoly with MNL demand.
|
|
48
|
-
|
|
49
|
-
Intrinsic clearance and enforcement rates are distinguished from *observed* clearance and enforcement rates in that the former do not reflect the effects of screening and deterrence as do the latter.
|
|
50
|
-
|
|
51
|
-
Modules of primary interest
|
|
52
|
-
---------------------------
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Methods for plotting boundaries of (sets of mergers falling within) specified concentration and share-ratio boundaries, are in :code:`mergeron.core.guidelines_boundaries`, where share-ratio, :math:`\delta_{ij}` is defined as :math:`\delta_{ij} = d_{ij} / r_i` with :math:`d_{ij}, r_i` a diversion ratio and recapture rate. This module also includes functions for calibrating GUPPI thresholds to concentration (ΔHHI) thresholds, and vice-versa.
|
|
57
|
-
|
|
58
|
-
Methods for generating industry data under various distributions of shares, prices, and margins are included in, :code:`mergeron.gen.data_generation`. The user can specify whether rates are specified as, "proportional", "inside-out" (i.e., consistent with merging-firms' in-market shares and a default recapture rate), or "outside-in", (i.e., purchase probabilities are drawn at random for :math:`n+1` goods, from which are derived market shares and recapture rates for the :math:`n` goods in the putative market). Price-cost-margins may be specified as symmetric, i.i.d, or consistent with equilibrium conditions for (profit-mazimization in) Bertrand-Nash oligopoly with MNL demand. Prices may be specified as symmetric or asymmetric, and in the latter case, the direction of correlation between merging firm prices, if any, can also be specified. Two alternative approaches for modeling statutory filing requirements (HSR filing thresholds) are implemented.
|
|
59
|
-
|
|
60
|
-
Methods for testing generated industry data against criteria on diversion ratio, gross upward pricing pressure ("GUPPI"), critical marginal cost reduction ("CMCR"), and indicative price rise ("IPR")/partial merger simulation are included in the module, :code:`mergeron.gen.guidelines_tests`. Test data are constructed in parallel and the user can specify number of `threads` and sub-sample size for each thread to manage CPU and memory utilization.
|
|
61
|
-
|
|
62
|
-
FTC investigations data and test data are printed to screen or rendered in LaTex to text files (for processing into publication-quality tables) using methods provided in :code:`mergeron.gen.investigations_stats`.
|
|
63
|
-
|
|
64
|
-
Programs demonstrating the analysis and reporting facilites provided by the sub-package, :code:`mergeron.examples`.
|
|
65
|
-
|
|
66
|
-
This package exposes methods employed for generating random numbers with selected continuous distribution over specified parameters, and with CPU multithreading on machines with multiple virtual, logical, or physical CPU cores. To access these directly:
|
|
67
|
-
|
|
68
|
-
.. code-block:: python
|
|
69
|
-
|
|
70
|
-
import mergeron.core.pseudorandom_numbers as prng
|
|
71
|
-
|
|
72
|
-
Also included are methods for estimating confidence intervals for proportions and for contrasts (differences) in proportions. (Although coded from scratch using the source literature, the APIs implemented in the module included here are designed for consistency with the APIs in, :code:`statsmodels.stats.proportion` from the package, :code:`statsmodels` (https://pypi.org/project/statsmodels/).) To access these directly:
|
|
73
|
-
|
|
74
|
-
.. code-block:: python
|
|
75
|
-
|
|
76
|
-
import mergeron.core.proportions_tests as prci
|
|
77
|
-
|
|
78
|
-
A recent version of Paul Tol's python module, :code:`tol_colors.py` is redistributed within this package. Other than re-formatting and type annotation, the :code:`tol_colors` module is re-distributed as downloaded from, https://personal.sron.nl/~pault/data/tol_colors.py. The tol_colors.py module is distributed under the Standard 3-clause BSD license. To access the tol_colors module directly:
|
|
79
|
-
|
|
80
|
-
.. code-block:: python
|
|
81
|
-
|
|
82
|
-
import mergeron.ext.tol_colors
|
|
83
|
-
|
|
84
|
-
Documentation for this package is in the form of the API Reference. Documentation for individual functions and classes is accessible within a python shell. For example:
|
|
85
|
-
|
|
86
|
-
.. code-block:: python
|
|
87
|
-
|
|
88
|
-
import mergeron.core.data_generation as dgl
|
|
89
|
-
|
|
90
|
-
help(dgl.gen_market_sample)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.. image:: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
|
|
94
|
-
:alt: Poetry
|
|
95
|
-
:target: https://python-poetry.org/
|
|
96
|
-
|
|
97
|
-
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
|
|
98
|
-
:alt: Ruff
|
|
99
|
-
:target: https://github.com/astral-sh/ruff
|
|
100
|
-
|
|
101
|
-
.. image:: https://www.mypy-lang.org/static/mypy_badge.svg
|
|
102
|
-
:alt: Checked with mypy
|
|
103
|
-
:target: https://mypy-lang.org/
|
|
104
|
-
|
|
105
|
-
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
|
|
106
|
-
:alt: License: MIT
|
|
107
|
-
:target: https://opensource.org/licenses/MIT
|
|
108
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
mergeron/License.txt,sha256=7iX-y0EyjkbVJKJLS4ZKzuuE1wd0lryfsD_IytLG8lQ,1246
|
|
2
|
-
mergeron/__init__.py,sha256=_0Bt2k2P8MPlF_WagQKGspaSODn-pkqib0uvSd4gys4,1019
|
|
3
|
-
mergeron/core/InCommon RSA Server CA cert chain.pem,sha256=W8TqydgY8jphQ4fr6WMdT6jLwqFjHLpx8fFr3LXub4s,4292
|
|
4
|
-
mergeron/core/__init__.py,sha256=MWnGSHui-3SpgZ_0Mc84NIpx2sEkCRx3G1cVAMRwpQI,2110
|
|
5
|
-
mergeron/core/damodaran_margin_data.py,sha256=DHTQdFjuZ5Yl3Dbq0db0QR4FHUqJpZj4yi5zdUncLtg,8166
|
|
6
|
-
mergeron/core/excel_helper.py,sha256=XfdKNOEdB5zNJl8LguVyAcDjr5y2wapKDbNgAx6r-es,7831
|
|
7
|
-
mergeron/core/ftc_invdata.msgpack,sha256=WBFHgi7Ld4R-h2zL2Zc3TOIlKqVrbVFMH1LoI4-T-M0,264664
|
|
8
|
-
mergeron/core/ftc_merger_investigations_data.py,sha256=wHF1dKAqWlh1hMvaQv2uOCAKAHnuPvCGnmaOB3CJO9I,26929
|
|
9
|
-
mergeron/core/guidelines_boundaries.py,sha256=UiB1Jf32IhgQZbWNiSq5FiMequf5W0DCDxLFA32D9KE,37393
|
|
10
|
-
mergeron/core/guidelines_boundaries_specialized_functions.py,sha256=xqiNGbka9PUZ6xWanyWfYNhA-2ONg211ksnK5IdMcyM,10377
|
|
11
|
-
mergeron/core/proportions_tests.py,sha256=tCrbya1el5u1OFOXphODP6yWOGywuNY6z9LBTsNRKzM,15320
|
|
12
|
-
mergeron/core/pseudorandom_numbers.py,sha256=uBK_fnhkOSkqnK4gEU8b3r_9B6r-vKmXZ64HViraTK8,9446
|
|
13
|
-
mergeron/ext/__init__.py,sha256=iyfxkX3-SoMS4ZQZKHKPn8JEMN536vpty9oSZf0LHv8,115
|
|
14
|
-
mergeron/ext/tol_colors.py,sha256=wFOHZXWZonbp9mhmSGu9mVujBYhdTsvx9_WikMpoCmo,22229
|
|
15
|
-
mergeron/gen/__init__.py,sha256=3W3EZH934f65msQY0LDY4cjSKE04cGeznF6Bqa5IND8,16554
|
|
16
|
-
mergeron/gen/_data_generation_functions_nonpublic.py,sha256=J6f5l3Kiuv5aqThOrj1evT6vrYxpNf7qZ-6gckmSNbw,21364
|
|
17
|
-
mergeron/gen/data_generation.py,sha256=29o-XuSI760JSY8Hq1QVB9ibJRjmzGPLnU2UOJT7KKc,8887
|
|
18
|
-
mergeron/gen/investigations_stats.py,sha256=4-AY_zhqKSlGE8sQciuYxzg2U4efQs2014dydmWUFz4,22802
|
|
19
|
-
mergeron/gen/upp_tests.py,sha256=nAdcejRH5BnSw32tkAYfkYL_yOofHK3m3kqx3zPDVs0,16521
|
|
20
|
-
mergeron/jinja_LaTex_templates/clrrate_cis_summary_table_template.tex.jinja2,sha256=ae4JiciU-pt8YAM8mRbsmt4W6ePuN1y1NPCWD95oXIo,4833
|
|
21
|
-
mergeron/jinja_LaTex_templates/ftcinvdata_byhhianddelta_table_template.tex.jinja2,sha256=ODEurkC0UHuWpjRUiQpeW85njSeUEUJYRdYg8gqoEq0,3642
|
|
22
|
-
mergeron/jinja_LaTex_templates/ftcinvdata_summary_table_template.tex.jinja2,sha256=h8_DEE0iskT9tnga5lZtxcoevN7pY4iKF-maErt4UU4,2906
|
|
23
|
-
mergeron/jinja_LaTex_templates/ftcinvdata_summarypaired_table_template.tex.jinja2,sha256=Ox0ctiyW_hoOPzoWskOpuygomuV6XWhLeLo40KGRy2U,5224
|
|
24
|
-
mergeron/jinja_LaTex_templates/mergeron.cls,sha256=AV2mk4-uERvAuMkE95Ka7el6LZsb0JZKP4ieiNCnfMU,4562
|
|
25
|
-
mergeron/jinja_LaTex_templates/mergeron_table_collection_template.tex.jinja2,sha256=nr6xUI0_2KHG4Sz9k1JFVQjs2h9qS9BGt1MeE6Tygs8,2429
|
|
26
|
-
mergeron/jinja_LaTex_templates/setup_tikz_tables.tex.jinja2,sha256=WKVxtp3eoMchfGliQAJMj4w2FtBkWG5z2V3-hBYUYUQ,3292
|
|
27
|
-
mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
28
|
-
mergeron-2024.738963.0.dist-info/METADATA,sha256=mlWYt8srM1_7wpJAkUBUFA9aouiELbCpLQzldksbl0E,6925
|
|
29
|
-
mergeron-2024.738963.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
30
|
-
mergeron-2024.738963.0.dist-info/RECORD,,
|
|
File without changes
|