Skip to content

Keep the digital American at-expiry price accurate at low volatility - #2855

Open
mkzung wants to merge 1 commit into
lballabio:masterfrom
mkzung:fix/digital-american-at-expiry-small-variance
Open

mkzung wants to merge 1 commit into
lballabio:masterfrom
mkzung:fix/digital-american-at-expiry-small-variance

Conversation

@mkzung

@mkzung mkzung commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

AmericanPayoffAtExpiry, which AnalyticDigitalAmericanEngine uses for a payoff at expiry, sets Y_ to zero whenever N(D2) underflows. At low volatility the power (H/S)^(2 mu) that multiplies N(D2) is large enough that the product is not negligible. At vol 0.1%, r -2% and q 3%, a down-and-in put on a barrier at 95 paying 10 at expiry in one year prices at 1.0002, where the same formula in 50-digit arithmetic gives 1.0176.

Where N(D2) underflows or the power overflows, the product is now formed in logs, with the asymptotic tail of log N where N underflows. Below the threshold at which the variance counts as zero nothing changes.

Over 1152 options with volatility from 10% down to 1e-6, master has 4 values more than 1e-6 away from the 50-digit closed form, the worst 1.7% off. With this change the largest relative difference is 1.6e-8.

testCashAtExpiryOrNothingAmericanLowVolatility checks four such cases and fails on master. DigitalOptionTests and the full suite pass.

The at-hit calculator has a related problem, which a separate pull request covers; the two touch different files.

AmericanPayoffAtExpiry drops the (H/S)^(2 mu) N(D2) term whenever N(D2)
underflows to zero. At low volatility the power it multiplies is large
enough that the product is not negligible: at vol 0.1%, r -2% and q 3%, a
down-and-in put on a barrier at 95 paying 10 at expiry priced at 1.0002
against 1.0176. Where N(D2) underflows or the power overflows, the product
is now formed in logs, with the asymptotic tail of log N.

Over 1152 options with volatility from 10% down to 1e-6, master had 4
values more than 1e-6 away from the closed form in 50-digit arithmetic,
up to 1.7%; with this change the largest difference is 1.6e-8.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 78.252% (+0.001%) from 78.251% — mkzung:fix/digital-american-at-expiry-small-variance into lballabio:master

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