mergeron 2025.739415.0__py3-none-any.whl → 2025.739418.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 +1 -1
- mergeron/core/empirical_margin_distribution.py +9 -7
- mergeron/gen/data_generation.py +14 -10
- {mergeron-2025.739415.0.dist-info → mergeron-2025.739418.0.dist-info}/METADATA +1 -1
- {mergeron-2025.739415.0.dist-info → mergeron-2025.739418.0.dist-info}/RECORD +6 -6
- {mergeron-2025.739415.0.dist-info → mergeron-2025.739418.0.dist-info}/WHEEL +0 -0
mergeron/__init__.py
CHANGED
|
@@ -44,7 +44,7 @@ import certifi
|
|
|
44
44
|
import numpy as np
|
|
45
45
|
import urllib3
|
|
46
46
|
from bs4 import BeautifulSoup
|
|
47
|
-
from joblib import Parallel, delayed # type: ignore
|
|
47
|
+
from joblib import Parallel, delayed, parallel_config # type: ignore
|
|
48
48
|
from numpy.random import Generator, SeedSequence
|
|
49
49
|
from python_calamine import CalamineWorkbook
|
|
50
50
|
from scipy import stats # type: ignore
|
|
@@ -137,13 +137,15 @@ def margin_data_resampler(
|
|
|
137
137
|
ret_array = np.empty(sample_size, float)
|
|
138
138
|
|
|
139
139
|
_ssz, _ncol = sample_size
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
with parallel_config(
|
|
141
|
+
backend="threading", n_jobs=min(nthreads, _ncol), return_as="generator"
|
|
142
|
+
):
|
|
143
|
+
dat_list = Parallel()(
|
|
144
|
+
delayed(margin_kde.resample)(
|
|
145
|
+
_ssz, seed=Generator(DEFAULT_BITGENERATOR(_col_seed))
|
|
146
|
+
)
|
|
147
|
+
for _col_seed in _seed.spawn(_ncol)
|
|
144
148
|
)
|
|
145
|
-
for _col_seed in _seed.spawn(_ncol)
|
|
146
|
-
)
|
|
147
149
|
|
|
148
150
|
for _i in range(_ncol):
|
|
149
151
|
ret_array[:, _i] = dat_list[_i][0]
|
mergeron/gen/data_generation.py
CHANGED
|
@@ -8,7 +8,7 @@ from typing import TypedDict
|
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
from attrs import Attribute, Converter, define, field, validators
|
|
11
|
-
from joblib import Parallel, cpu_count, delayed # type: ignore
|
|
11
|
+
from joblib import Parallel, cpu_count, delayed, parallel_config # type: ignore
|
|
12
12
|
from numpy.random import SeedSequence
|
|
13
13
|
from ruamel import yaml
|
|
14
14
|
|
|
@@ -374,16 +374,20 @@ class MarketSample:
|
|
|
374
374
|
"nthreads": thread_count,
|
|
375
375
|
})
|
|
376
376
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
with parallel_config(
|
|
378
|
+
backend="threading",
|
|
379
|
+
n_jobs=min(thread_count, iter_count),
|
|
380
|
+
return_as="generator",
|
|
381
|
+
):
|
|
382
|
+
res_list = Parallel()(
|
|
383
|
+
delayed(self.__sim_enf_cnts)(
|
|
384
|
+
_enf_parm_vec,
|
|
385
|
+
_sim_test_regime,
|
|
386
|
+
**sim_enf_cnts_kwargs,
|
|
387
|
+
seed_data=_rng_seed_data_ch,
|
|
388
|
+
)
|
|
389
|
+
for _rng_seed_data_ch in rng_seed_data
|
|
384
390
|
)
|
|
385
|
-
for _rng_seed_data_ch in rng_seed_data
|
|
386
|
-
)
|
|
387
391
|
|
|
388
392
|
res_list_stacks = UPPTestsCounts(*[
|
|
389
393
|
np.stack([getattr(_j, _k) for _j in res_list])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mergeron
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.739418.0
|
|
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,6 +1,6 @@
|
|
|
1
|
-
mergeron/__init__.py,sha256=
|
|
1
|
+
mergeron/__init__.py,sha256=0XdqUUBfA6B5ahNGnbGrwLt0qjqofugeKHk-q7lYKB8,6751
|
|
2
2
|
mergeron/core/__init__.py,sha256=4Y_q-Qu7gXENVKHS-lNebn5mPZDy9oPHFwUV7fAW9Nw,3269
|
|
3
|
-
mergeron/core/empirical_margin_distribution.py,sha256=
|
|
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
5
|
mergeron/core/guidelines_boundaries.py,sha256=Q_udRryyqQAtoB7x2EYGOxI-8JNuyYgoDbFJ_EZAOnM,15606
|
|
6
6
|
mergeron/core/guidelines_boundary_functions.py,sha256=qQbpiNUxsq9AE8SrS628yWlEzqBQdNoVIarFurhuGTY,30304
|
|
@@ -10,11 +10,11 @@ mergeron/data/__init__.py,sha256=SAFkR23RBM0zwGam2TeWmw08oHAKmU2YF-Nygj73ies,184
|
|
|
10
10
|
mergeron/data/damodaran_margin_data_serialized.zip,sha256=Wc1v9buSrYTWWAravG8W9nPbgsU07zMtSAR2RvMQU5s,623482
|
|
11
11
|
mergeron/data/ftc_merger_investigations_data.zip,sha256=tiB2TLFyS9LMSFIv8DBA_oEEx12DU4MyjHni4NlsRMU,24002
|
|
12
12
|
mergeron/gen/__init__.py,sha256=xMnzIqxuWaNZ9HQE-C6kCwLfvwdFOEmlpNRUJsObQFg,23866
|
|
13
|
-
mergeron/gen/data_generation.py,sha256=
|
|
13
|
+
mergeron/gen/data_generation.py,sha256=pdQl_uBENCjVt2aPtAcus2md4Qx-j5rOWGJJAzdnlO0,17617
|
|
14
14
|
mergeron/gen/data_generation_functions.py,sha256=hXUq5D2CIUkM4_NdGXiOb4XATYwIUeUcCGadzQGDqLw,26126
|
|
15
15
|
mergeron/gen/enforcement_stats.py,sha256=etTax-sBSn8DveF-IxuBJDdX0XSBD6oFU9vaZe6cYks,14387
|
|
16
16
|
mergeron/gen/upp_tests.py,sha256=gRJISQ2jGmIDmFOvaTIkvYooI4mK-QbgkfgL46RrRio,7445
|
|
17
17
|
mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
18
|
-
mergeron-2025.
|
|
19
|
-
mergeron-2025.
|
|
20
|
-
mergeron-2025.
|
|
18
|
+
mergeron-2025.739418.0.dist-info/METADATA,sha256=LJeeDhQRSvQe-7DJ9i66mshCNw0kATWckoaOsKAVTVE,4261
|
|
19
|
+
mergeron-2025.739418.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
20
|
+
mergeron-2025.739418.0.dist-info/RECORD,,
|
|
File without changes
|