# EOS B17-E acceptance world — the same instrument as B17-C, crashed in TWO steps. # # python3 -m eos_cli run examples/sequential_crash.epl # # crash_1 takes spot 127.62 -> 100 and COMMITS. crash_2 must then start from the COMMITTED spot (100), # not the world's declared prior (127.62). If state carries forward, the two differences sum to the one-step # B17-C loss: # # Δ1 (127.62 -> 100) = -5.4976 # Δ2 (100 -> 85) = -0.1670 <- only correct if event 2 reprices from committed spot=100 # sum = -5.6646 <- equals the single-step B17-C result # # The engine sees "an asset", "a model", "conditions", "a difference", a committed value carried forward — # never an option, a price, or a crash. ecosystem "sequential_crash" { manifest { registry_version: "b17e_v1" } asset "the_call" { type_tag: "instrument" base_measure: "OPTION_NPV" primary_model: "the_call_model" } stakeholder "holder_a" {} stakeholder "holder_b" {} # declared priors — the starting market inputs (crash_1 begins from these; crash_2 begins from committed state) condition "spot" { value: 127.62 } condition "vol" { value: 0.20 } condition "rate" { value: 0.001 } condition "div" { value: 0.0163 } condition "strike" { value: 130 } condition "expiry_days" { value: 182 } condition "day_count" { value: "Actual365Fixed" } model "the_call_model" { requires: [ "spot", "strike", "vol", "rate", "div", "expiry_days", "day_count" ] produces: [ "OPTION_NPV" ] via_boundary: "pricing::bsm_quantlib" } # two events, fired in id order: crash_1 then crash_2 event "crash_1" { modifies: { spot: 100.0 } } event "crash_2" { modifies: { spot: 85.0 } } # both revalue the asset before/after and commit; crash_2's PRE comes from crash_1's committed spot binding "crash_1_on_call" { on_event: "crash_1" affects_asset: "the_call" via_model: "the_call_model" impact: "difference" magnitude_ref: "delta_npv" } binding "crash_2_on_call" { on_event: "crash_2" affects_asset: "the_call" via_model: "the_call_model" impact: "difference" magnitude_ref: "delta_npv" } allocation "alloc_a" { asset: "the_call" to_stakeholder: "holder_a" share: 2 } allocation "alloc_b" { asset: "the_call" to_stakeholder: "holder_b" share: 1 } }