Skip to content

Correct FX digital payout-currency valuation - #260

Open
kadyrbekovhamit-cyber wants to merge 1 commit into
domokane:masterfrom
kadyrbekovhamit-cyber:codex/fix-fx-digital-payout-currency
Open

kadyrbekovhamit-cyber wants to merge 1 commit into
domokane:masterfrom
kadyrbekovhamit-cyber:codex/fix-fx-digital-payout-currency

Conversation

@kadyrbekovhamit-cyber

Copy link
Copy Markdown
Contributor

Summary

FXDigitalOption supports a payout/notional in either the domestic or the
foreign currency. A foreign-currency payout has domestic payoff
S_T * 1(condition), so it is an asset-or-nothing payoff and its
Garman--Kohlhagen value uses N(d1). The existing implementation uses
N(d2), which is the probability term for a domestic cash-or-nothing payout.

The related FXDoubleDigitalOption has two corresponding issues:

  • a domestic-currency interval payout is discounted with the foreign rate;
  • a foreign-currency interval payout uses the d2 probability terms instead
    of the d1 asset terms.

This change uses d1 for foreign-currency single and interval payouts, while
using the already calculated domestic and foreign discount factors for their
respective payoff currencies. Domestic single-digital valuation is unchanged.

Synthetic example

For EURUSD spot 1.20, strike 1.25, one-year expiry, domestic rate 5%, foreign
rate 1%, and volatility 20%, a one-EUR digital call currently returns
0.5449552491 USD. The asset-or-nothing formula gives 0.6397169446 USD.

For an interval from 1.10 to 1.40 under the same inputs:

  • domestic payout: current 0.4474588468, expected 0.4298665323;
  • foreign payout: current 0.5369506162, expected 0.5338519318.

The test oracle uses Python's math.erf, independently of FinancePy's vector
normal-CDF approximation.

Validation

  • focused regression: 6 tests passed;
  • complete unit suite: 964 tests passed, with four pre-existing LSMC
    RankWarning messages;
  • running the new tests against the previous implementation fails the four
    affected cases and passes the two unchanged domestic single-digital
    controls;
  • the two existing FX digital regression scripts still complete.

All inputs are synthetic. This PR makes no claim about a downstream system,
customer position, or financial loss.

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