Skip to content

Fix Heston ADI term-structure consistency - #115

Open
cfries wants to merge 1 commit into
112-heston-adi-call-prices-disagree-with-fourier-for-mean-reverting-variance-at-zero-and-small-vol-of-volfrom
114-fix-term-structure-inconsistency-fdmhestonmodelgetdrift-using--logdtt-instead-of-instantaneous-rates
Open

cfries wants to merge 1 commit into
112-heston-adi-call-prices-disagree-with-fourier-for-mean-reverting-variance-at-zero-and-small-vol-of-volfrom
114-fix-term-structure-inconsistency-fdmhestonmodelgetdrift-using--logdtt-instead-of-instantaneous-rates

Conversation

@cfries

@cfries cfries commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

What is this PR for?

Fixes the non-flat-curve pricing error in #114. Heston drift and ADI discounting now use instantaneous forward rates, European Heston boundaries use D(T)/D(t), and Douglas stages use the appropriate old/new calendar times. A default discounting-rate accessor preserves other models' existing convention. Production changes and eleven new regression tests are mirrored in both source trees.

For Dr(t)=exp(-0.01*t-0.08*t*t), q=0.02, constant variance 0.04, and S0=K=100, T=1, the fine-grid call improves from 9.2175627974 to 11.3075312066, versus the analytic 11.3129337493. Refining the grid reduces the patched error from 0.01835 to 0.00540.

Dependency: this PR is stacked on #113, whose natural variance-boundary correction is required. The comparison contains only the term-structure patch. Merge #113 first, then retarget this PR to main.

What type of PR is it?

Bug Fix

Todos

What is the related issue?

Fixes #114. Follows the separate term-structure observation in #112.

How should this be tested?

Local validation on Oracle JDK 17.0.12 / Maven 3.6.3, for both java-11 and java-8 source profiles:

  • Clean compilation and Checkstyle passed for both profiles. JavaDoc passed (Java 8 profile with -Ddoclint=none).
  • All 44 tests in 12 finite-difference/Fourier classes passed in each profile (88 total), including all eleven new tests and the six prerequisite boundary tests.
  • Independent negative control on unmodified Fixes the Heston PDE pricing discrepancy in #112 by retaining drift and discounting at natural variance boundaries ... #113: ten compatible new tests produced six expected failures and four passes, including reproduction of the old fine-grid price.
  • All six Java 11/Java 8 file pairs are byte-identical; git diff --check passed.
mvn -B -Pjava-11,-java-8 clean compile javadoc:javadoc checkstyle:check test \
  '-Dtest=net.finmath.finitedifference.**.*Test,net.finmath.fouriermethod.**.*Test,TestCarrMadan'

The Java 8 source-profile run used:

mvn -B -Pjava-8,-java-11 clean compile javadoc:javadoc checkstyle:check test \
  -Ddoclint=none \
  '-Dtest=net.finmath.finitedifference.**.*Test,net.finmath.fouriermethod.**.*Test,TestCarrMadan'

Additional actual-runtime check on Oracle JDK 8u181: all production/test sources compiled, Checkstyle passed, and JavaDoc passed with -Ddoclint=none. Strict Java 8 JavaDoc failed on pre-existing errors in unchanged files such as AbstractTreeProduct.java and ConfigTree.java. The numerical run under x86 emulation was stopped after 12½ minutes with no completed test-class report; actual Java 8 numerical validation remains incomplete locally, despite matching intermediate prices. GitHub Actions provides the full Java 8 runtime test run.

The full repository suite was not run locally; GitHub Actions runs it.

Questions:

Does the licenses files need update?

No.

Are there breaking changes for older versions?

No required interface implementation changes: the new accessor has a default implementation. Non-flat Heston prices intentionally change. Existing scalar-rate constructors retain their interpolation/extrapolation convention, which does not produce flat exponential curves at all maturities.

Does the change require additional documentation?

The helper/accessor JavaDoc describes the numerical rate and compatibility convention. Scope is European Heston 2D ADI; other products and 1D/3D solvers are not fully migrated. Rate differentiation averages adjacent rates at curve knots, and the complete Douglas scheme remains generally first order because discounting stays explicit.

This branch has not been deployed

No deployments
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