quantdata.dysanos.grid.rndysanos.unconditional_option_test#

Streaming diagnostics for state-independent, single-option arbitrage.

The routines in this module deliberately do not consume z. They count the signs of delta-hedged option returns, and of the long/short net returns after costs, while retaining the simulated path as the statistical cluster.

class quantdata.dysanos.grid.rndysanos.unconditional_option_test.SignAccumulator(instruments)[source]#

Bases: object

Streaming per-instrument signs and path-clustered moments.

update(values, tolerance)[source]#

Accumulate one path batch with shape (S, TAU, J).

arrays()[source]#

Return complete per-instrument arrays using population moments.

quantdata.dysanos.grid.rndysanos.unconditional_option_test.delta_hedged_option_returns(*, dC, delta, dS)[source]#

Return dC - delta*dS without including the spot instrument.

quantdata.dysanos.grid.rndysanos.unconditional_option_test.delta_hedged_option_cost_notionals(*, C, delta, spot)[source]#

Return gross traded notionals |C| + |delta*spot| for options.

quantdata.dysanos.grid.rndysanos.unconditional_option_test.delta_hedged_roundoff_band(*, C, dC, delta, dS, multiplier=32.0)[source]#

Return a conservative absolute error band for float32 hedged returns.

dC was itself formed by subtracting two float32 option values. The scale therefore includes both reconstructed endpoint values and the hedge term, rather than the possibly cancellation-dominated final dH.

quantdata.dysanos.grid.rndysanos.unconditional_option_test.net_return_roundoff_band(values, cost, *, multiplier=32.0)[source]#

Return a float32 arithmetic band for +/- values - cost.

quantdata.dysanos.grid.rndysanos.unconditional_option_test.population_standard_error(total, total_sqr, observations)[source]#

Return population standard deviation divided by sqrt(observations).

quantdata.dysanos.grid.rndysanos.unconditional_option_test.rank_imbalance(accumulator, *, strikes, count=20)[source]#

Return options with the largest requested raw imbalance count.

quantdata.dysanos.grid.rndysanos.unconditional_option_test.rank_no_arbitrage_candidates(long, short, *, strikes, count=20)[source]#

Rank directions by fewest losses, then largest lower mean bound.