Skip to content

Price FX barrier options with the spot-to-delivery forward - #478

Merged
domokane merged 2 commits into
FinancePy-Org:masterfrom
hereiszepedro:fix/fx-barrier-spot-delivery
Nov 26, 2026
Merged

domokane merged 2 commits into
FinancePy-Org:masterfrom
hereiszepedro:fix/fx-barrier-spot-delivery

Conversation

@hereiszepedro

Copy link
Copy Markdown
Contributor

FXVanillaOption grows the forward from the spot date to the delivery date and discounts the payoff from delivery, following the currency pair's settlement conventions. FXBarrierOption used the curves from today to expiry instead, so with a spot lag a knock-in plus the matching knock-out did not add up to the vanilla (off by 9.5e-5 for a 1y EURUSD at-the-money call). This is the same gap #475 closed for the digital options.

This change uses the vanilla's delivery discount factor and spot-to-delivery forward in value() and value_mc(). The first commit adds an in-out parity test that fails without the fix. Existing FX barrier test values move by about 0.05% and are updated, and the FX barrier golden log is regenerated.

AI-assisted (Claude Code). I checked the parity numerically and ran the full unit suite locally.

FXVanillaOption grows the forward from the spot date to the delivery
date and discounts the payoff from delivery, both from the currency
pair's settlement conventions. FXBarrierOption ignored both and used
the curves from today to expiry, so a knock-in plus the matching
knock-out did not add up to the vanilla when the pair has a spot lag.
This is the same gap that FinancePy-Org#475 closed for the digital options.

Use the vanilla's delivery discount factor and spot-to-delivery forward
in value() and value_mc(). Prices move by about 0.05% in the existing
tests, which assert the new values; the FX barrier golden log is
regenerated.
@domokane
domokane merged commit 46ec7ff into FinancePy-Org:master Nov 26, 2026
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.

2 participants