mergeron 2025.739341.8__tar.gz → 2025.739341.9__tar.gz
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-2025.739341.8 → mergeron-2025.739341.9}/PKG-INFO +2 -2
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/pyproject.toml +5 -6
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/__init__.py +1 -1
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/empirical_margin_distribution.py +4 -3
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/gen/enforcement_stats.py +13 -12
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/README.rst +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/__init__.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/ftc_merger_investigations_data.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/guidelines_boundaries.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/guidelines_boundary_functions.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/guidelines_boundary_functions_extra.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/pseudorandom_numbers.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/data/__init__.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/data/damodaran_margin_data_serialized.zip +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/data/ftc_merger_investigations_data.zip +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/gen/__init__.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/gen/data_generation.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/gen/data_generation_functions.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/gen/upp_tests.py +0 -0
- {mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/py.typed +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mergeron
|
|
3
|
-
Version: 2025.739341.
|
|
3
|
+
Version: 2025.739341.9
|
|
4
4
|
Summary: Python for analyzing merger enforcement policy
|
|
5
5
|
License: MIT
|
|
6
|
-
Keywords: merger policy
|
|
6
|
+
Keywords: merger enforcement policy,merger guidelines,merger screening,enforcement presumptions,concentration standards,diversion ratio,upward pricing pressure,GUPPI
|
|
7
7
|
Author: Murthy Kambhampaty
|
|
8
8
|
Author-email: smk@capeconomics.com
|
|
9
9
|
Requires-Python: >=3.12
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mergeron"
|
|
3
|
-
authors = [
|
|
4
|
-
{ name = "Murthy Kambhampaty", email = "smk@capeconomics.com" },
|
|
5
|
-
]
|
|
3
|
+
authors = [{ name = "Murthy Kambhampaty", email = "smk@capeconomics.com" }]
|
|
6
4
|
description = "Python for analyzing merger enforcement policy"
|
|
7
5
|
readme = "README.rst"
|
|
8
6
|
license = "MIT"
|
|
9
7
|
keywords = [
|
|
10
|
-
"merger policy
|
|
8
|
+
"merger enforcement policy",
|
|
11
9
|
"merger guidelines",
|
|
12
10
|
"merger screening",
|
|
13
|
-
"
|
|
11
|
+
"enforcement presumptions",
|
|
14
12
|
"concentration standards",
|
|
13
|
+
"diversion ratio",
|
|
15
14
|
"upward pricing pressure",
|
|
16
15
|
"GUPPI",
|
|
17
16
|
]
|
|
18
|
-
version = "2025.739341.
|
|
17
|
+
version = "2025.739341.9"
|
|
19
18
|
|
|
20
19
|
# Classifiers list: https://pypi.org/classifiers/
|
|
21
20
|
classifiers = [
|
{mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/empirical_margin_distribution.py
RENAMED
|
@@ -40,6 +40,7 @@ import zipfile
|
|
|
40
40
|
from pathlib import Path
|
|
41
41
|
from types import MappingProxyType
|
|
42
42
|
|
|
43
|
+
import certifi
|
|
43
44
|
import numpy as np
|
|
44
45
|
import urllib3
|
|
45
46
|
from bs4 import BeautifulSoup
|
|
@@ -126,7 +127,7 @@ def margin_data_resampler(
|
|
|
126
127
|
margin_kde.set_bandwidth(bw_method=margin_kde.factor / 3.0)
|
|
127
128
|
|
|
128
129
|
if isinstance(sample_size, int):
|
|
129
|
-
|
|
130
|
+
ret_array: ArrayDouble = margin_kde.resample(
|
|
130
131
|
sample_size, seed=Generator(DEFAULT_BITGENERATOR(_seed))
|
|
131
132
|
).T
|
|
132
133
|
|
|
@@ -144,11 +145,11 @@ def margin_data_resampler(
|
|
|
144
145
|
|
|
145
146
|
for _i in range(_ncol):
|
|
146
147
|
ret_array[:, _i] = dat_list[_i][0]
|
|
147
|
-
|
|
148
|
-
return ret_array
|
|
149
148
|
else:
|
|
150
149
|
raise ValueError(f"Invalid sample size: {sample_size!r}")
|
|
151
150
|
|
|
151
|
+
return ret_array
|
|
152
|
+
|
|
152
153
|
|
|
153
154
|
def margin_data_builder(
|
|
154
155
|
_margin_data_dict: DamodaranMarginData | None = None,
|
|
@@ -7,6 +7,7 @@ import numpy as np
|
|
|
7
7
|
from scipy.interpolate import make_interp_spline # type: ignore
|
|
8
8
|
|
|
9
9
|
from .. import VERSION, ArrayBIGINT, Enameled, this_yaml # noqa: TID252
|
|
10
|
+
from ..core import INVData, INVTableData # noqa: TID252
|
|
10
11
|
from ..core import ftc_merger_investigations_data as fid # noqa: TID252
|
|
11
12
|
from . import INVResolution
|
|
12
13
|
|
|
@@ -79,17 +80,15 @@ class SortSelector(str, Enameled):
|
|
|
79
80
|
|
|
80
81
|
# Parameters and functions to interpolate selected HHI and ΔHHI values
|
|
81
82
|
# recorded in fractions to ranges of values in points on the HHI scale
|
|
82
|
-
HHI_DELTA_KNOTS = np.array(
|
|
83
|
-
|
|
84
|
-
)
|
|
85
|
-
HHI_POST_ZONE_KNOTS = np.array([0, 1800, 2400, 10001], dtype=np.int64)
|
|
83
|
+
HHI_DELTA_KNOTS = np.array([0, 100, 200, 300, 500, 800, 1200, 2500, 5001], int)
|
|
84
|
+
HHI_POST_ZONE_KNOTS = np.array([0, 1800, 2400, 10001], int)
|
|
86
85
|
hhi_delta_ranger, hhi_zone_post_ranger = (
|
|
87
86
|
make_interp_spline(_f / 1e4, _f, k=0)
|
|
88
87
|
for _f in (HHI_DELTA_KNOTS, HHI_POST_ZONE_KNOTS)
|
|
89
88
|
)
|
|
90
89
|
|
|
91
90
|
|
|
92
|
-
HMG_PRESUMPTION_ZONE_MAP = {
|
|
91
|
+
HMG_PRESUMPTION_ZONE_MAP: dict[int, dict[int, tuple[int, int, int]]] = {
|
|
93
92
|
HHI_POST_ZONE_KNOTS[0]: {
|
|
94
93
|
HHI_DELTA_KNOTS[0]: (0, 0, 0),
|
|
95
94
|
HHI_DELTA_KNOTS[1]: (0, 0, 0),
|
|
@@ -135,7 +134,7 @@ ZONE_DETAIL_STRINGS_DELTA = {
|
|
|
135
134
|
|
|
136
135
|
|
|
137
136
|
def enf_cnts_obs_by_group(
|
|
138
|
-
_invdata_array_dict:
|
|
137
|
+
_invdata_array_dict: INVData,
|
|
139
138
|
_study_period: str,
|
|
140
139
|
_table_ind_grp: IndustryGroup,
|
|
141
140
|
_table_evid_cond: OtherEvidence,
|
|
@@ -193,7 +192,7 @@ def enf_cnts_obs_by_group(
|
|
|
193
192
|
|
|
194
193
|
|
|
195
194
|
def enf_cnts_obs_byfirmcount(
|
|
196
|
-
_data_array_dict:
|
|
195
|
+
_data_array_dict: INVData,
|
|
197
196
|
_data_period: str = "1996-2003",
|
|
198
197
|
_table_ind_group: IndustryGroup = IndustryGroup.ALL,
|
|
199
198
|
_table_evid_cond: OtherEvidence = OtherEvidence.UNR,
|
|
@@ -247,7 +246,7 @@ def enf_cnts_obs_byfirmcount(
|
|
|
247
246
|
|
|
248
247
|
|
|
249
248
|
def enf_cnts_obs_byhhianddelta(
|
|
250
|
-
_data_array_dict:
|
|
249
|
+
_data_array_dict: INVData,
|
|
251
250
|
_data_period: str = "1996-2003",
|
|
252
251
|
_table_ind_group: IndustryGroup = IndustryGroup.ALL,
|
|
253
252
|
_table_evid_cond: OtherEvidence = OtherEvidence.UNR,
|
|
@@ -301,7 +300,7 @@ def enf_cnts_obs_byhhianddelta(
|
|
|
301
300
|
|
|
302
301
|
|
|
303
302
|
def table_no_lku(
|
|
304
|
-
_data_array_dict_sub: Mapping[str,
|
|
303
|
+
_data_array_dict_sub: Mapping[str, INVTableData],
|
|
305
304
|
_table_ind_group: IndustryGroup = IndustryGroup.ALL,
|
|
306
305
|
_table_evid_cond: OtherEvidence = OtherEvidence.UNR,
|
|
307
306
|
/,
|
|
@@ -416,9 +415,11 @@ def enf_cnts_byconczone(_cnts_array: ArrayBIGINT, /) -> ArrayBIGINT:
|
|
|
416
415
|
# in both cases does make life easier
|
|
417
416
|
_ndim_in = 2
|
|
418
417
|
_nkeys = 3
|
|
419
|
-
cnts_byhhipostanddelta
|
|
420
|
-
|
|
421
|
-
|
|
418
|
+
cnts_byhhipostanddelta: ArrayBIGINT = np.zeros(
|
|
419
|
+
(1, _nkeys + _cnts_array.shape[1] - _ndim_in), dtype=int
|
|
420
|
+
)
|
|
421
|
+
cnts_byconczone: ArrayBIGINT = np.zeros(
|
|
422
|
+
(1, _nkeys + _cnts_array.shape[1] - _ndim_in), dtype=int
|
|
422
423
|
)
|
|
423
424
|
|
|
424
425
|
# Prepare to tag clearance stats by presumption zone
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/guidelines_boundaries.py
RENAMED
|
File without changes
|
{mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/core/guidelines_boundary_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mergeron-2025.739341.8 → mergeron-2025.739341.9}/src/mergeron/gen/data_generation_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|