mergeron.gen.data_generation

Methods to generate data for analyzing merger enforcement policy.

Module Contents

mergeron.gen.data_generation.H5_CHUNK_SIZE = 1000000[source]
class mergeron.gen.data_generation.SamplingFunctionKWArgs[source]

Bases: TypedDict

Keyword arguments of sampling methods defined below.

sample_size : int[source]

number of draws to generate

seed_data : mergeron.gen.SeedSequenceData | None[source]

seed data to ensure independent and replicable draws

nthreads : int[source]

number of parallel threads to use

class mergeron.gen.data_generation.MarketSample[source]

Parameter specification for market data generation.

share_spec : mergeron.gen.MarketShareSpec[source]

Market-share specification, see MarketShareSpec

pcm_spec : mergeron.gen.PCMSpec[source]

Margin specification, see PCMSpec

price_spec : mergeron.gen.PriceSpec[source]

Price specification, see PriceSpec

hsr_filing_test_type : mergeron.gen.SSZConstant[source]

Method for modeling HSR filing thresholds, see SSZConstant

sample_size : int[source]

number of draws to simulate

seed_data : mergeron.gen.SeedSequenceData[source]

sequence of SeedSequences to ensure replicable data generation with appropriately independent random streams

nthreads : int[source]

number of parallel threads to use

dataset : mergeron.gen.MarketsData | None[source]
enf_counts : mergeron.gen.UPPTestsCounts | None[source]
generate_sample(/)[source]

Populate data with generated data.

Return type:

None

estimate_enf_counts(_enf_parm_vec, _upp_test_regime, /)[source]

Populate enf_counts with estimated UPP test counts.

Parameters:
_enf_parm_vec : mergeron.core.guidelines_boundaries.MGThresholds

Threshold values for various Guidelines criteria

_upp_test_regime : mergeron.gen.UPPTestRegime

Specifies whether to analyze enforcement, clearance, or both and the GUPPI and diversion ratio aggregators employed, with default being to analyze enforcement based on the maximum merging-firm GUPPI and maximum diversion ratio between the merging firms

Return type:

None

to_archive(zip_, _subdir='', /, *, save_dataset=False)[source]

Serialize market sample to Zip archive.

static from_archive(zip_, _subdir='', /, *, restore_dataset=False)[source]

Deserialize market sample from Zip archive.

classmethod to_yaml(_r, _d)[source]

Serialize market sample to YAML representation.

classmethod from_yaml(_c, _n)[source]

Deserialize market sample from YAML representation.