quantdata.dysanos.grid.gendysanos.required_runs#
Canonical case construction and statistical checks for required runs.
This module contains the generator-independent part of the experiment. A generator supplies one coherent path block using the common universe schema; the routines below derive every hedge and transaction-cost case without resimulating that block.
- class quantdata.dysanos.grid.gendysanos.required_runs.DerivedCaseArrays(*, returns, costs, numerical_band, instrument_kind, expiry_index, strike_index, return_horizon, hedge, cost_rate)[source]#
Bases:
objectPre-cost returns, costs, and observation-specific numerical bands.
- class quantdata.dysanos.grid.gendysanos.required_runs.OptionCoverageAccumulator[source]#
Bases:
objectStream strike, payoff, and pre-cost sign support by trading time.
- class quantdata.dysanos.grid.gendysanos.required_runs.PathSplit(*, reference, audit, component_counts, audit_fraction, seed)[source]#
Bases:
objectDisjoint proposal-mixture-stratified reference and audit paths.
- class quantdata.dysanos.grid.gendysanos.required_runs.RequiredCase(*, generator, trading_frequency, return_horizon, hedge, cost_rate, path_count, num_trading_times=10, schema_version='1.0')[source]#
Bases:
objectOne of the 48 reported cases at a fixed Monte Carlo path count.
- class quantdata.dysanos.grid.gendysanos.required_runs.TimeSeparatedUnconditionalAccumulator(*, alpha=0.05)[source]#
Bases:
objectStream unit-direction diagnostics without pooling trading times.
- quantdata.dysanos.grid.gendysanos.required_runs.case_configuration(case)[source]#
Return a JSON-safe complete case configuration.
- quantdata.dysanos.grid.gendysanos.required_runs.audit_constant_basket(solution, case, *, split, log_path_weights, importance_components, family_size=480, alpha=0.05, prerequisite_checks_passed)[source]#
Evaluate one frozen reference-fitted constant basket on audit paths.
- quantdata.dysanos.grid.gendysanos.required_runs.certify_unconditional_directions(case, *, split, log_path_weights, importance_components, family_size=131472, alpha=0.05, bootstrap_repetitions=500, seed=1, prerequisite_checks_passed)[source]#
Screen on reference paths and certify frozen unit directions on audit.
The state region is the complete state space, so this is the independent audit for unconditional individual directions. Conditional regions and fitted baskets require their own frozen-region audit.
- quantdata.dysanos.grid.gendysanos.required_runs.clopper_pearson_one_sided(successes, observations, *, alpha=0.05)[source]#
Return exact one-sided lower and upper binomial confidence bounds.
- quantdata.dysanos.grid.gendysanos.required_runs.convergence_report(small, large)[source]#
Check the required importance and path-error convergence invariants.
- quantdata.dysanos.grid.gendysanos.required_runs.derive_case_arrays(universe, *, hedge, cost_rate, roundoff_multiplier=32.0)[source]#
Derive one case from a shared coherent path block.
Expiry and incremental cases contain one spot instrument for every option expiry. For incremental returns the spot leg closes with its expiry group: at exact expiry when it occurs inside the interval and at the next trading time otherwise. Option costs are
q*|C|when raw andq*(|C|+|delta*S|)when delta hedged. No option/spot notional is netted.
- quantdata.dysanos.grid.gendysanos.required_runs.functional_gate_report(checks)[source]#
Evaluate the mandatory 100,000-to-one-million functional gate.
A missing check fails closed. A detailed check mapping must contain a boolean
passedfield, allowing reports to retain the underlying measurements without weakening the gate.
- quantdata.dysanos.grid.gendysanos.required_runs.float64_replay_report(universe, case)[source]#
Replay return and gross-cost identities from primitive arrays in float64.
- quantdata.dysanos.grid.gendysanos.required_runs.propagated_basket_band(action, returns, costs, instrument_band, *, roundoff_multiplier=32.0)[source]#
Propagate instrument bands to a basket without a cash floor.
- quantdata.dysanos.grid.gendysanos.required_runs.positive_relative_weights(log_weights)[source]#
Exponentiate log weights stably for self-normalized calculations.
Likelihood ratios can be arbitrarily close to zero. Subtracting the largest log weight preserves every self-normalized statistic; flooring at the smallest positive float64 value only represents values which would otherwise underflow to zero and has no measurable effect on the result.
- quantdata.dysanos.grid.gendysanos.required_runs.required_cases(path_count)[source]#
Return the complete 48-case matrix for one reported path count.
- quantdata.dysanos.grid.gendysanos.required_runs.solve_constant_basket(case, *, time_index, reference_paths, log_path_weights=None, feasibility_tolerance=1e-10, constraints_per_iteration=128, maximum_iterations=50)[source]#
Solve the constant-basket reference problem by constraint generation.