mergeron 2024.738953.1__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.

Files changed (39) hide show
  1. mergeron/__init__.py +26 -6
  2. mergeron/core/__init__.py +5 -65
  3. mergeron/core/{damodaran_margin_data.py → empirical_margin_distribution.py} +74 -58
  4. mergeron/core/ftc_merger_investigations_data.py +147 -101
  5. mergeron/core/guidelines_boundaries.py +290 -1078
  6. mergeron/core/guidelines_boundary_functions.py +1128 -0
  7. mergeron/core/{guidelines_boundaries_specialized_functions.py → guidelines_boundary_functions_extra.py} +87 -55
  8. mergeron/core/pseudorandom_numbers.py +16 -22
  9. mergeron/data/__init__.py +3 -0
  10. mergeron/data/damodaran_margin_data.xls +0 -0
  11. mergeron/data/damodaran_margin_data_dict.msgpack +0 -0
  12. mergeron/demo/__init__.py +3 -0
  13. mergeron/demo/visualize_empirical_margin_distribution.py +86 -0
  14. mergeron/gen/__init__.py +258 -246
  15. mergeron/gen/data_generation.py +473 -224
  16. mergeron/gen/data_generation_functions.py +876 -0
  17. mergeron/gen/enforcement_stats.py +355 -0
  18. mergeron/gen/upp_tests.py +171 -259
  19. mergeron-2025.739265.0.dist-info/METADATA +115 -0
  20. mergeron-2025.739265.0.dist-info/RECORD +23 -0
  21. {mergeron-2024.738953.1.dist-info → mergeron-2025.739265.0.dist-info}/WHEEL +1 -1
  22. mergeron/License.txt +0 -16
  23. mergeron/core/InCommon RSA Server CA cert chain.pem +0 -68
  24. mergeron/core/excel_helper.py +0 -257
  25. mergeron/core/proportions_tests.py +0 -520
  26. mergeron/ext/__init__.py +0 -5
  27. mergeron/ext/tol_colors.py +0 -851
  28. mergeron/gen/_data_generation_functions_nonpublic.py +0 -623
  29. mergeron/gen/investigations_stats.py +0 -709
  30. mergeron/jinja_LaTex_templates/clrrate_cis_summary_table_template.tex.jinja2 +0 -121
  31. mergeron/jinja_LaTex_templates/ftcinvdata_byhhianddelta_table_template.tex.jinja2 +0 -82
  32. mergeron/jinja_LaTex_templates/ftcinvdata_summary_table_template.tex.jinja2 +0 -57
  33. mergeron/jinja_LaTex_templates/ftcinvdata_summarypaired_table_template.tex.jinja2 +0 -104
  34. mergeron/jinja_LaTex_templates/mergeron.cls +0 -161
  35. mergeron/jinja_LaTex_templates/mergeron_table_collection_template.tex.jinja2 +0 -90
  36. mergeron/jinja_LaTex_templates/setup_tikz_tables.tex.jinja2 +0 -84
  37. mergeron-2024.738953.1.dist-info/METADATA +0 -93
  38. mergeron-2024.738953.1.dist-info/RECORD +0 -30
  39. /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,93 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mergeron
3
- Version: 2024.738953.1
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
- Routines for downloading and organizing FTC merger investigtions data published in 2004, 2007, 2008, and 2013. Includes a routine for constructing investigations data for non-overlapping periods, and other partitions on the data, subject to the constraints of the reported data.
55
-
56
- mergeron.core.ftc_merger_investigations_data
57
-
58
- Routines for plotting boundaries of (sets of mergers falling within) specified concentration and diversion ratio boundaries and for calibrating GUPPI thresholds to concentration (ΔHHI) thresholds, and vice-versa.
59
-
60
- mergeron.core.guidelines_boundaries
61
-
62
- Routines for generating industry data under various distributions of shares, prices, and margins. 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.
63
-
64
- mergeron.gen.data_generation
65
-
66
- Routines 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. 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.
67
-
68
- mergeron.gen.guidelines_tests
69
-
70
- FTC investigations data and test data are printed to screen or rendered in LaTex to text files (for processing into publication-quality tables) using routines provided in :code:`mergeron.gen.investigations_stats`.
71
-
72
- Programs demonstrating the analysis and reporting facilites provided by the package.
73
-
74
- mergeron.examples
75
-
76
- This package exposes routines 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:
77
-
78
- import mergeron.core.pseudorandom_numbers as prng
79
-
80
- Also included are routines 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:
81
-
82
- import mergeron.core.proportions_tests as prci
83
-
84
- 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:
85
-
86
- import mergeron.ext.tol_colors
87
-
88
- 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:
89
-
90
- import mergeron.core.data_generation as dgl
91
-
92
- help(dgl.gen_market_sample)
93
-
@@ -1,30 +0,0 @@
1
- mergeron/License.txt,sha256=csSkn4lgUmJ0VEw1KAFZ3a8q0L4XccUdJ6Jj6xSNNRY,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=rwZfuO7ZQkvvZ1pHhixtFmVmC5_E-rix0unaTzxz48Y,2110
5
- mergeron/core/damodaran_margin_data.py,sha256=DHTQdFjuZ5Yl3Dbq0db0QR4FHUqJpZj4yi5zdUncLtg,8166
6
- mergeron/core/excel_helper.py,sha256=j-dNz6WVIFIDCn3ldK_eenPr0Gn996zxbbm3SEjVpPM,7823
7
- mergeron/core/ftc_invdata.msgpack,sha256=WBFHgi7Ld4R-h2zL2Zc3TOIlKqVrbVFMH1LoI4-T-M0,264664
8
- mergeron/core/ftc_merger_investigations_data.py,sha256=WLnGFmTB-sh9aswivUAOuaUP0Aa9pmcvD4SJD-lddNU,26983
9
- mergeron/core/guidelines_boundaries.py,sha256=eOEzbfgNQn-XKFZ72pql1xfBaLApQIdbfm3rSXdi0ow,37442
10
- mergeron/core/guidelines_boundaries_specialized_functions.py,sha256=zrnqaPd7a_jIO1qtM9VXhiiADZRMpg6Y-e2m0od4_JM,10448
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=nVvHJiUuTzTcT0mhX1BmneAiLkC1sg3I4X9xdu7OKJg,16248
16
- mergeron/gen/_data_generation_functions_nonpublic.py,sha256=mt3g5sTPhUkJgsLd6luKkSnsT1_okf0y9kRyZtrBGk8,21404
17
- mergeron/gen/data_generation.py,sha256=tud1PeobkTyNZdCk-cMVBHw1MtM7bJKq_cGaYnYFh_I,8863
18
- mergeron/gen/investigations_stats.py,sha256=5j8iOI2EKbd8BZoqfcg4oaK4bFRMEDXadnFVDO3Rlwc,22803
19
- mergeron/gen/upp_tests.py,sha256=IlmedW20AG6XDp9gSG26RCLnZfMOVrm34PdpfJSJiMs,16229
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.738953.1.dist-info/METADATA,sha256=_rIDqv_IzGJMoR3TXh-kun4PEgow1U6smCToxX8qnSY,6330
29
- mergeron-2024.738953.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
- mergeron-2024.738953.1.dist-info/RECORD,,
File without changes