mergeron 2025.739439.12__py3-none-any.whl → 2025.739439.13__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 +1 -1
- mergeron/core/guidelines_boundaries.py +5 -21
- mergeron/core/guidelines_boundary_functions.py +3 -5
- mergeron/gen/__init__.py +3 -1
- mergeron/gen/data_generation.py +2 -2
- mergeron/gen/data_generation_functions.py +1 -1
- mergeron/gen/upp_tests.py +3 -1
- mergeron/perks/guidelines_boundary_functions_extra.py +3 -6
- {mergeron-2025.739439.12.dist-info → mergeron-2025.739439.13.dist-info}/METADATA +1 -1
- {mergeron-2025.739439.12.dist-info → mergeron-2025.739439.13.dist-info}/RECORD +11 -11
- {mergeron-2025.739439.12.dist-info → mergeron-2025.739439.13.dist-info}/WHEEL +0 -0
mergeron/__init__.py
CHANGED
|
@@ -226,10 +226,7 @@ class DiversionBoundary:
|
|
|
226
226
|
|
|
227
227
|
@diversion_ratio.validator
|
|
228
228
|
def _dvv(
|
|
229
|
-
_instance: DiversionBoundary,
|
|
230
|
-
_attribute: Attribute[float],
|
|
231
|
-
_value: float,
|
|
232
|
-
/,
|
|
229
|
+
_instance: DiversionBoundary, _attribute: Attribute[float], _value: float, /
|
|
233
230
|
) -> None:
|
|
234
231
|
if not (isinstance(_value, decimal.Decimal | float) and 0 <= _value <= 1):
|
|
235
232
|
raise ValueError(
|
|
@@ -237,9 +234,7 @@ class DiversionBoundary:
|
|
|
237
234
|
)
|
|
238
235
|
|
|
239
236
|
recapture_rate: float = field(
|
|
240
|
-
kw_only=False,
|
|
241
|
-
default=DEFAULT_REC,
|
|
242
|
-
validator=validators.instance_of(float),
|
|
237
|
+
kw_only=False, default=DEFAULT_REC, validator=validators.instance_of(float)
|
|
243
238
|
)
|
|
244
239
|
|
|
245
240
|
recapture_form: RECForm | None = field(kw_only=True, default=RECForm.INOUT)
|
|
@@ -270,10 +265,7 @@ class DiversionBoundary:
|
|
|
270
265
|
|
|
271
266
|
@recapture_form.validator
|
|
272
267
|
def _rsv(
|
|
273
|
-
_instance: DiversionBoundary,
|
|
274
|
-
_attribute: Attribute[RECForm],
|
|
275
|
-
_value: RECForm,
|
|
276
|
-
/,
|
|
268
|
+
_instance: DiversionBoundary, _attribute: Attribute[RECForm], _value: RECForm, /
|
|
277
269
|
) -> None:
|
|
278
270
|
if _value and not (isinstance(_value, RECForm)):
|
|
279
271
|
raise ValueError(f"Invalid recapture specification, {_value!r}.")
|
|
@@ -373,11 +365,7 @@ class DiversionBoundary:
|
|
|
373
365
|
|
|
374
366
|
|
|
375
367
|
def guppi_from_delta(
|
|
376
|
-
_delta_bound: float = 0.01,
|
|
377
|
-
/,
|
|
378
|
-
*,
|
|
379
|
-
m_star: float = 1.00,
|
|
380
|
-
r_bar: float = DEFAULT_REC,
|
|
368
|
+
_delta_bound: float = 0.01, /, *, m_star: float = 1.00, r_bar: float = DEFAULT_REC
|
|
381
369
|
) -> float:
|
|
382
370
|
"""
|
|
383
371
|
Translate ∆HHI bound to GUPPI bound.
|
|
@@ -433,11 +421,7 @@ def critical_diversion_share(
|
|
|
433
421
|
|
|
434
422
|
|
|
435
423
|
def share_from_guppi(
|
|
436
|
-
_guppi_bound: float = 0.065,
|
|
437
|
-
/,
|
|
438
|
-
*,
|
|
439
|
-
m_star: float = 1.00,
|
|
440
|
-
r_bar: float = DEFAULT_REC,
|
|
424
|
+
_guppi_bound: float = 0.065, /, *, m_star: float = 1.00, r_bar: float = DEFAULT_REC
|
|
441
425
|
) -> float:
|
|
442
426
|
"""
|
|
443
427
|
Symmetric-firm share for given GUPPI, margin, and recapture rate.
|
|
@@ -205,7 +205,7 @@ def hhi_post_contrib_boundary(
|
|
|
205
205
|
|
|
206
206
|
|
|
207
207
|
# hand-rolled root finding
|
|
208
|
-
def diversion_share_boundary_wtd_avg(
|
|
208
|
+
def diversion_share_boundary_wtd_avg(
|
|
209
209
|
_delta_star: float = 0.075,
|
|
210
210
|
_r_val: float = DEFAULT_REC,
|
|
211
211
|
/,
|
|
@@ -409,7 +409,7 @@ def diversion_share_boundary_wtd_avg( # noqa: PLR0914
|
|
|
409
409
|
)
|
|
410
410
|
|
|
411
411
|
|
|
412
|
-
def diversion_share_boundary_xact_avg(
|
|
412
|
+
def diversion_share_boundary_xact_avg(
|
|
413
413
|
_delta_star: float = 0.075,
|
|
414
414
|
_r_val: float = DEFAULT_REC,
|
|
415
415
|
/,
|
|
@@ -676,9 +676,7 @@ def _diversion_share_boundary_intcpt(
|
|
|
676
676
|
),
|
|
677
677
|
2 * mpf(f"{_r_val}"),
|
|
678
678
|
)
|
|
679
|
-
case None if
|
|
680
|
-
agg_method == "arithmetic mean" and recapture_form == "fixed"
|
|
681
|
-
):
|
|
679
|
+
case None if agg_method == "arithmetic mean" and recapture_form == "fixed":
|
|
682
680
|
_s_intcpt = mp.fsub(_delta_star + 1 / 2, mp.fabs(_delta_star - 1 / 2))
|
|
683
681
|
case _:
|
|
684
682
|
_s_intcpt = s_2_pre
|
mergeron/gen/__init__.py
CHANGED
|
@@ -114,7 +114,9 @@ def _fc_wts_conv(
|
|
|
114
114
|
return _tv if (_tv := np.asarray(_v, float)).sum() == 1 else _tv / _tv.sum()
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
def _shr_dp_conv(
|
|
117
|
+
def _shr_dp_conv(
|
|
118
|
+
_v: Sequence[float] | ArrayFloat | None, _i: MarketShareSpec
|
|
119
|
+
) -> ArrayFloat:
|
|
118
120
|
if _v is None or len(_v) == 0 or np.array_equal(_v, DEFAULT_DIST_PARMS):
|
|
119
121
|
if _i.dist_type == SHRDistribution.UNI:
|
|
120
122
|
return DEFAULT_DIST_PARMS
|
mergeron/gen/data_generation.py
CHANGED
|
@@ -25,12 +25,12 @@ from ..core.guidelines_boundaries import HMGThresholds # noqa: TID252
|
|
|
25
25
|
from . import (
|
|
26
26
|
INVResolution, # noqa: F401
|
|
27
27
|
MarketsData,
|
|
28
|
+
MarketShareSpec,
|
|
28
29
|
PCMDistribution,
|
|
29
30
|
PCMRestriction,
|
|
30
31
|
PCMSpec,
|
|
31
32
|
PriceSpec,
|
|
32
33
|
SeedSequenceData,
|
|
33
|
-
MarketShareSpec,
|
|
34
34
|
SHRDistribution,
|
|
35
35
|
SSZConstant,
|
|
36
36
|
UPPTestRegime,
|
|
@@ -38,8 +38,8 @@ from . import (
|
|
|
38
38
|
)
|
|
39
39
|
from .data_generation_functions import (
|
|
40
40
|
diversion_ratios_builder,
|
|
41
|
-
prices_sampler,
|
|
42
41
|
market_share_sampler,
|
|
42
|
+
prices_sampler,
|
|
43
43
|
)
|
|
44
44
|
from .upp_tests import compute_upp_test_counts
|
|
45
45
|
|
mergeron/gen/upp_tests.py
CHANGED
|
@@ -78,7 +78,9 @@ def compute_upp_test_counts(
|
|
|
78
78
|
|
|
79
79
|
np.divide(
|
|
80
80
|
np.einsum(
|
|
81
|
-
"ij,ij->ij",
|
|
81
|
+
"ij,ij->ij",
|
|
82
|
+
_market_data_sample.pcm_array,
|
|
83
|
+
_market_data_sample.divratio_array,
|
|
82
84
|
),
|
|
83
85
|
1 - _market_data_sample.divratio_array,
|
|
84
86
|
out=ipr_array,
|
|
@@ -6,6 +6,7 @@ and may provide improved precision than core functions, but tend to have
|
|
|
6
6
|
poor performance
|
|
7
7
|
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
from __future__ import annotations
|
|
10
11
|
|
|
11
12
|
from typing import Literal
|
|
@@ -292,13 +293,9 @@ def diversion_share_boundary_distance(
|
|
|
292
293
|
|
|
293
294
|
match agg_method:
|
|
294
295
|
case "arithmetic mean":
|
|
295
|
-
delta_test = minkowski(
|
|
296
|
-
(de_1, de_2), (0.0, 0.0), p=1, w=weights_i
|
|
297
|
-
)
|
|
296
|
+
delta_test = minkowski((de_1, de_2), (0.0, 0.0), p=1, w=weights_i)
|
|
298
297
|
case "distance":
|
|
299
|
-
delta_test = minkowski(
|
|
300
|
-
(de_1, de_2), (0.0, 0.0), p=2, w=weights_i
|
|
301
|
-
)
|
|
298
|
+
delta_test = minkowski((de_1, de_2), (0.0, 0.0), p=2, w=weights_i)
|
|
302
299
|
|
|
303
300
|
_test_flag, _incr_decr = (
|
|
304
301
|
(delta_test > _delta_star, -1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mergeron
|
|
3
|
-
Version: 2025.739439.
|
|
3
|
+
Version: 2025.739439.13
|
|
4
4
|
Summary: Python for analyzing merger enforcement policy
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: merger enforcement policy,merger guidelines,merger screening,enforcement presumptions,concentration standards,diversion ratio,upward pricing pressure,GUPPI
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
mergeron/__init__.py,sha256=
|
|
1
|
+
mergeron/__init__.py,sha256=7EfQoQmwD1jpLMoPnuXOjraGsAmq44OP39XMiqoadxM,6736
|
|
2
2
|
mergeron/core/__init__.py,sha256=zJcc50CAwm0oNKwk4p-P7oRwVfB_Fp4u0Do5dUeUXfI,3027
|
|
3
3
|
mergeron/core/empirical_margin_distribution.py,sha256=61U-KLB563BPWM5zWyWp82c4PhcsAG-IKI0WWYGjBKg,11740
|
|
4
4
|
mergeron/core/ftc_merger_investigations_data.py,sha256=oM4cs2PnyeSwyV1LOE_EYCUEzCKPm7lnCGxLIc6JQY8,28820
|
|
5
|
-
mergeron/core/guidelines_boundaries.py,sha256=
|
|
6
|
-
mergeron/core/guidelines_boundary_functions.py,sha256=
|
|
5
|
+
mergeron/core/guidelines_boundaries.py,sha256=Z8rZvhHrxXBgrLGFpb6yldc8h3lN9rGtGj4yu-fyVBA,15450
|
|
6
|
+
mergeron/core/guidelines_boundary_functions.py,sha256=fdWbqOb3Khz0OkbSTO7amE1q_ao3puZY5tEzj0p4h1o,30695
|
|
7
7
|
mergeron/core/pseudorandom_numbers.py,sha256=CFp-8eu0q2g-81LA0k2oCFltmp6Er7EkrAkoG19G7Os,10138
|
|
8
8
|
mergeron/data/__init__.py,sha256=SAFkR23RBM0zwGam2TeWmw08oHAKmU2YF-Nygj73ies,1845
|
|
9
9
|
mergeron/data/damodaran_margin_data_serialized.zip,sha256=Wc1v9buSrYTWWAravG8W9nPbgsU07zMtSAR2RvMQU5s,623482
|
|
10
10
|
mergeron/data/ftc_merger_investigations_data.zip,sha256=tiB2TLFyS9LMSFIv8DBA_oEEx12DU4MyjHni4NlsRMU,24002
|
|
11
|
-
mergeron/gen/__init__.py,sha256=
|
|
12
|
-
mergeron/gen/data_generation.py,sha256=
|
|
13
|
-
mergeron/gen/data_generation_functions.py,sha256=
|
|
11
|
+
mergeron/gen/__init__.py,sha256=6xUhaG4kWj2Qx8hLjgjupFWcJ0ZzAKDY9TN7mAFrANI,23880
|
|
12
|
+
mergeron/gen/data_generation.py,sha256=cZW3Dc6bNiBUPXjTDHZDwTc6x1sxXq2STCzfsvk6_tw,17638
|
|
13
|
+
mergeron/gen/data_generation_functions.py,sha256=SWzZ3I7ulkGBcL2F5CCKw2IvCm_wEplvqBasnSjSyU0,26129
|
|
14
14
|
mergeron/gen/enforcement_stats.py,sha256=V3ZeVv-iLFUuKPeM503cMKiVVaYeGVrA_6lInAdXA5w,14387
|
|
15
|
-
mergeron/gen/upp_tests.py,sha256=
|
|
15
|
+
mergeron/gen/upp_tests.py,sha256=v-tnhQ85j8zL-TTE52GC61GEZSRFfdCkjaitVQIz0FI,6464
|
|
16
16
|
mergeron/perks/__init__.py,sha256=gGRIuRc7I6OuWLzwSiSZSIE0PEoxAy2DRFWg0VVLlbE,484
|
|
17
|
-
mergeron/perks/guidelines_boundary_functions_extra.py,sha256=
|
|
17
|
+
mergeron/perks/guidelines_boundary_functions_extra.py,sha256=q-Cqk9t5oj4yiAsmZJcsfrH434oGvza4YVspFYpdV0g,22113
|
|
18
18
|
mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
19
|
-
mergeron-2025.739439.
|
|
20
|
-
mergeron-2025.739439.
|
|
21
|
-
mergeron-2025.739439.
|
|
19
|
+
mergeron-2025.739439.13.dist-info/METADATA,sha256=pW4fkwJwFD_eALAZ-TSIryYrJu1AMfczHcoDq1u9LdE,4167
|
|
20
|
+
mergeron-2025.739439.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
21
|
+
mergeron-2025.739439.13.dist-info/RECORD,,
|
|
File without changes
|