Skip to content

feat(instruments): add the knock-in and double-barrier call family - #13

Open
ZacKienzle2 wants to merge 1 commit into
mainfrom
feat/barrier-family
Open

feat(instruments): add the knock-in and double-barrier call family#13
ZacKienzle2 wants to merge 1 commit into
mainfrom
feat/barrier-family

Conversation

@ZacKienzle2

Copy link
Copy Markdown
Owner

Summary

Completes the barrier instrument family (roadmap Horizon 2, Instruments).

  • UpAndInCall, DownAndOutCall, DownAndInCall: single-barrier knock-in and knock-out calls reusing the running maximum or minimum already on the path grid.
  • DoubleKnockOutCall: settles only while the path stays strictly inside a corridor.
  • The knock-in variants complete the in-out parity with their knock-out twins (an in plus its out equals the vanilla call). Exported from deephedging and deephedging.instruments.

Tests

Up and down in-out parity reconstructing the vanilla call, corridor breach on either side, the unreachable-barrier and wide-corridor limits equal to vanilla, and input validation.

Gates

ruff, ruff format, pyright (strict, 0 errors), fast suite green locally (188 passed).

Add up-and-in, down-and-out, and down-and-in calls alongside a double-knock-out call settling only while the path stays inside a corridor. Each reuses the running maximum or minimum already carried by the path grid, and the knock-in variants complete the in-out parity with their knock-out twins. Tests pin that parity, the corridor breach behaviour, the unreachable-barrier and wide-corridor limits, and input validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant