quantdata.dysanos.tangent_levy.simulator#

Seeded risk-neutral simulation of Tangent Lévy code-books.

class quantdata.dysanos.tangent_levy.simulator.SimulationResult(record_steps, forward_density, alive, failure_step, minimum_gamma, boundary_limited_steps, seed)[source]#

Bases: object

Recorded code-book states and explicit path-failure diagnostics.

property failed_path_fraction: float#

Fraction of paths rejected for a nonpositive or nonfinite state.

property frozen_path_fraction: float#

Fraction of paths for which the paper’s global scale reached zero.

class quantdata.dysanos.tangent_levy.simulator.PricedSimulation(tau, log_moneyness, calls, valid_paths)[source]#

Bases: object

Normalized calls derived from one recorded code-book ensemble.

quantdata.dysanos.tangent_levy.simulator.simulate_codebooks(initial_forward_density, dynamics, *, config=SimulationConfig(num_paths=5000, num_steps=20, seed=15040033, boundary_epsilon=1e-06, record_steps=(1, 5, 8, 20)), factor_risk_premium=None)[source]#

Advance the Musiela code-book with the paper’s scaled Euler scheme.

A candidate path that becomes negative or nonfinite is rejected and remains NaN. No density clipping or shock resampling is performed. Passing a factor risk premium changes the drift to a separately estimated physical measure; omitting it is the risk-neutral implementation.

quantdata.dysanos.tangent_levy.simulator.price_simulated_state(forward_density, *, tau, jump_x, log_moneyness, pricing_config=PricingConfig(integration_upper=160.0, integration_points=1281, strike_chunk_size=256))[source]#

Price one (P,T,X) ensemble with the generic equation (2.36).