mergeron 2025.739319.2__py3-none-any.whl → 2025.739319.3__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/gen/__init__.py +9 -0
- mergeron/gen/data_generation.py +1 -1
- mergeron/gen/data_generation_functions.py +9 -13
- mergeron/gen/enforcement_stats.py +7 -4
- {mergeron-2025.739319.2.dist-info → mergeron-2025.739319.3.dist-info}/METADATA +1 -1
- {mergeron-2025.739319.2.dist-info → mergeron-2025.739319.3.dist-info}/RECORD +8 -8
- {mergeron-2025.739319.2.dist-info → mergeron-2025.739319.3.dist-info}/WHEEL +0 -0
mergeron/__init__.py
CHANGED
mergeron/gen/__init__.py
CHANGED
|
@@ -405,6 +405,15 @@ class PCMSpec:
|
|
|
405
405
|
pcm_restriction: PCMRestriction = field(kw_only=True, default=PCMRestriction.IID)
|
|
406
406
|
"""See :class:`PCMRestriction`"""
|
|
407
407
|
|
|
408
|
+
@pcm_restriction.validator
|
|
409
|
+
def __prv(_i: PCMSpec, _a: Attribute[PCMRestriction], _v: PCMRestriction) -> None:
|
|
410
|
+
if _v == PCMRestriction.MNL and _i.dist_type == PCMDistribution.EMPR:
|
|
411
|
+
print(
|
|
412
|
+
"NOTE: Estimated Firm 2 parameters will not be consistent with "
|
|
413
|
+
"the empirical distribution of margins in the source data. For "
|
|
414
|
+
"consistency, respecify pcm_spec.pcm_restriction = PCMRestriction.IID."
|
|
415
|
+
)
|
|
416
|
+
|
|
408
417
|
|
|
409
418
|
@this_yaml.register_class
|
|
410
419
|
@enum.unique
|
mergeron/gen/data_generation.py
CHANGED
|
@@ -26,10 +26,10 @@ from .. import ( # noqa: TID252 # noqa
|
|
|
26
26
|
from ..core import guidelines_boundaries as gbl # noqa: TID252
|
|
27
27
|
from ..core.guidelines_boundaries import HMGThresholds # noqa: TID252
|
|
28
28
|
from . import (
|
|
29
|
-
PCMRestriction,
|
|
30
29
|
INVResolution, # noqa: F401
|
|
31
30
|
MarketSampleData,
|
|
32
31
|
PCMDistribution,
|
|
32
|
+
PCMRestriction,
|
|
33
33
|
PCMSpec,
|
|
34
34
|
PriceSpec,
|
|
35
35
|
SeedSequenceData,
|
|
@@ -28,9 +28,9 @@ from ..core.pseudorandom_numbers import ( # noqa: TID252
|
|
|
28
28
|
from . import (
|
|
29
29
|
DEFAULT_BETA_BND_DIST_PARMS,
|
|
30
30
|
DEFAULT_FCOUNT_WTS,
|
|
31
|
-
PCMRestriction,
|
|
32
31
|
MarginDataSample,
|
|
33
32
|
PCMDistribution,
|
|
33
|
+
PCMRestriction,
|
|
34
34
|
PCMSpec,
|
|
35
35
|
PriceDataSample,
|
|
36
36
|
PriceSpec,
|
|
@@ -665,9 +665,8 @@ def _gen_margin_data(
|
|
|
665
665
|
_nthreads: int,
|
|
666
666
|
/,
|
|
667
667
|
) -> MarginDataSample:
|
|
668
|
-
dist_type_pcm, dist_parms_pcm,
|
|
669
|
-
getattr(_pcm_spec, _f)
|
|
670
|
-
for _f in ("dist_type", "dist_parms", "pcm_restriction")
|
|
668
|
+
dist_type_pcm, dist_parms_pcm, pcm_restriction_ = (
|
|
669
|
+
getattr(_pcm_spec, _f) for _f in ("dist_type", "dist_parms", "pcm_restriction")
|
|
671
670
|
)
|
|
672
671
|
|
|
673
672
|
pcm_array = (
|
|
@@ -680,7 +679,10 @@ def _gen_margin_data(
|
|
|
680
679
|
beta_min, beta_max = [0.0] * 2 # placeholder
|
|
681
680
|
if dist_type_pcm == PCMDistribution.EMPR:
|
|
682
681
|
pcm_array = margin_data_resampler(
|
|
683
|
-
dist_parms_pcm,
|
|
682
|
+
dist_parms_pcm,
|
|
683
|
+
sample_size=pcm_array.shape,
|
|
684
|
+
seed_sequence=_pcm_rng_seed_seq,
|
|
685
|
+
nthreads=_nthreads,
|
|
684
686
|
)
|
|
685
687
|
else:
|
|
686
688
|
dist_type_: Literal["Beta", "Uniform"]
|
|
@@ -721,16 +723,10 @@ def _gen_margin_data(
|
|
|
721
723
|
pcm_array = (beta_max - beta_min) * pcm_array + beta_min
|
|
722
724
|
del beta_min, beta_max
|
|
723
725
|
|
|
724
|
-
if
|
|
726
|
+
if pcm_restriction_ == PCMRestriction.SYM:
|
|
725
727
|
pcm_array = np.hstack((pcm_array,) * _frmshr_array.shape[1])
|
|
726
|
-
if
|
|
728
|
+
if pcm_restriction_ == PCMRestriction.MNL:
|
|
727
729
|
# Impose FOCs from profit-maximization with MNL demand
|
|
728
|
-
if dist_type_pcm == PCMDistribution.EMPR:
|
|
729
|
-
print(
|
|
730
|
-
"NOTE: Estimated Firm 2 parameters will not be consistent with "
|
|
731
|
-
"the empirical distribution of margins in the source data. For "
|
|
732
|
-
"consistency, respecify pcm_spec.pcm_restriction = PCMRestriction.IID."
|
|
733
|
-
)
|
|
734
730
|
purchase_prob_array = _aggregate_purchase_prob * _frmshr_array
|
|
735
731
|
|
|
736
732
|
pcm_array[:, [1]] = np.divide(
|
|
@@ -335,10 +335,13 @@ def enf_cnts_byconczone(_cnts_array: ArrayBIGINT, /) -> ArrayBIGINT:
|
|
|
335
335
|
# Logical-and of multiple vectors:
|
|
336
336
|
hhi_zone_test = (
|
|
337
337
|
1
|
|
338
|
-
* np.stack(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
338
|
+
* np.stack(
|
|
339
|
+
[
|
|
340
|
+
cnts_byhhipostanddelta[:, _idx] == _val
|
|
341
|
+
for _idx, _val in enumerate(zone_val)
|
|
342
|
+
],
|
|
343
|
+
axis=1,
|
|
344
|
+
)
|
|
342
345
|
).prod(axis=1) == 1
|
|
343
346
|
|
|
344
347
|
cnts_byconczone = np.vstack((
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mergeron
|
|
3
|
-
Version: 2025.739319.
|
|
3
|
+
Version: 2025.739319.3
|
|
4
4
|
Summary: Analyze merger enforcement policy using Python
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: merger policy analysis,merger guidelines,merger screening,policy presumptions,concentration standards,upward pricing pressure,GUPPI
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
mergeron/__init__.py,sha256=
|
|
1
|
+
mergeron/__init__.py,sha256=28Yan2f3uiw5fugxpGMd8mwr0JyWS9tYjkoDXTiAE-U,5549
|
|
2
2
|
mergeron/core/__init__.py,sha256=BzL_bXHyOQG8cvo76OP3K48LkeHQCJQN7ZFPRhoOdcE,2850
|
|
3
3
|
mergeron/core/empirical_margin_distribution.py,sha256=PwAxOLc7zgL4OHVH1kQRtxP7m5XAVUPtMVomM2uvnKM,9527
|
|
4
4
|
mergeron/core/ftc_merger_investigations_data.py,sha256=DYqtyxGPnpGyaWbQ8dPHmHmQBOeHbmU5h9snk-YwSN4,28575
|
|
@@ -11,12 +11,12 @@ mergeron/data/damodaran_margin_data.xls,sha256=Qggl1p5nkOMJI8YUXhkwXQRz-OhRSqBTz
|
|
|
11
11
|
mergeron/data/ftc_merger_investigations_data.zip,sha256=tiB2TLFyS9LMSFIv8DBA_oEEx12DU4MyjHni4NlsRMU,24002
|
|
12
12
|
mergeron/demo/__init__.py,sha256=KtjBlZOl7jwBCAUhrTJB9PdrN39YLYytNiSUSM_gRmA,62
|
|
13
13
|
mergeron/demo/visualize_empirical_margin_distribution.py,sha256=N8pYTl11ngG-W5WOjjYDigCIZs5LPVrUNxdgEHLwTHE,2584
|
|
14
|
-
mergeron/gen/__init__.py,sha256=
|
|
15
|
-
mergeron/gen/data_generation.py,sha256=
|
|
16
|
-
mergeron/gen/data_generation_functions.py,sha256=
|
|
17
|
-
mergeron/gen/enforcement_stats.py,sha256=
|
|
14
|
+
mergeron/gen/__init__.py,sha256=6UZ7u1a2rw9iSaGjnpNf1E9IXukHPU9iIDaauruQ7-g,23450
|
|
15
|
+
mergeron/gen/data_generation.py,sha256=a9RZxlcwN7jInxSTomCZUVKPsIE_YUMSfRabizYN62U,17147
|
|
16
|
+
mergeron/gen/data_generation_functions.py,sha256=8UkO3GBqTTrfFSsxiJ9Z-AbxR7XiKv6QJBkd07sx1f0,26123
|
|
17
|
+
mergeron/gen/enforcement_stats.py,sha256=wtWMbMHK_G3yw4zaNQR9fdmu8crbzeFKjBvY-b1mom4,11132
|
|
18
18
|
mergeron/gen/upp_tests.py,sha256=qCyIMY8fuaRqGobwlcu3SPpIlD-dDNdM53qC8CTx59k,7480
|
|
19
19
|
mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
20
|
-
mergeron-2025.739319.
|
|
21
|
-
mergeron-2025.739319.
|
|
22
|
-
mergeron-2025.739319.
|
|
20
|
+
mergeron-2025.739319.3.dist-info/METADATA,sha256=yoBYK3tulJtDDc4oFIYM93okbyqEN73Kiv97hk1JVKc,6056
|
|
21
|
+
mergeron-2025.739319.3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
22
|
+
mergeron-2025.739319.3.dist-info/RECORD,,
|
|
File without changes
|