Skip to content

[QL-9.x][DEFER] FDM remainder: sparse operators, Krylov, boundaries and multidimensional engines #636

Open

Description

@benbenbang

Audited 2026-09-27 against released v0.29.0. Deferred framework remainder, under #71. The baseline now includes European, American and Bermudan Black-Scholes FD pricing; the old European-only description is obsolete.

Delivered

The FD implementation includes meshes, tridiagonal operators, step/boundary abstractions, Douglas and 1-D implicit-Euler rollback, solver wrappers and Greeks (#635). American and Bermudan exercise conditions shipped in #826/#827. The engine is available through Python/C/Go (#1108/#1109). These are not outstanding framework tasks.

Remaining

  • Matrix export (toMatrix/toMatrixDecomp), sparse-matrix representation and NumericalDifferentiation/nonuniform derivative-weight coverage. The released FdmLinearOp trait still omits matrix export.
  • BiCGstab/GMRES and the multidirectional implicit-Euler branch; ImplicitEulerScheme rejects that branch today.
  • Concrete Dirichlet/Neumann boundaries and a pricing consumer using a nonempty boundary set. Generic boundary hooks are already present.
  • Actual multidimensional mixed/directional operators and splitting consumers beyond 1-D Black-Scholes.
  • Non-Black-Scholes FD operators/engines, including Heston, CEV, CIR, Bates and SABR, activated in individually scoped increments.
  • MakeFdBlackScholesVanillaEngine builder/remaining constructor surface.
  • [QL-9.x][FDM][DEFER] FD vanilla engine dividend/escrowed/quanto/local-vol paths #828: cash-dividend, escrowed, quanto and local-vol vanilla paths; that issue owns their detailed checklist.

Activation and acceptance

Remain deferred until a concrete downstream engine requires each capability. Start from that consumer's dependencies; do not port the full framework speculatively. Each increment needs matrix/operator or solver reference tests plus an end-to-end numerical oracle. Existing FD prices, Greeks, early-exercise conditions and platform-specific regression tolerances must remain unchanged. Pair new public pricing surfaces with Python/C/Go bindings, and document Rust-only generic machinery explicitly. Close only when the remaining scope is completed or explicitly superseded by agreed trackers.

Activity

  1. benbenbang commented on Jul 28, 2026

    @benbenbang
    MemberAuthor

    Batch-2 deferrals recorded (all verified unreached by any batch-2 oracle, gate-confirmed):

  2. benbenbang commented on Jul 28, 2026

    @benbenbang
    MemberAuthor

    Two more calculator deferrals from B2-T3 (#647), documented in the module doc of utilities/fdminnervaluecalculator.rs:

    • FdmZeroInnerValue (fdminnervaluecalculator.hpp:93) - trivial (~4 lines); only consumers are the swing/VPP engines (fdsimplebsswingengine.cpp:69 + experimental). Pull forward whenever a consumer lands.
    • FdmLogBasketInnerValue (hpp:80) - needs the unported BasketPayoff; only consumer fd2dblackscholesvanillaengine.cpp:76, so it belongs with the basket work.

    Also noting from B2-T2 (#646) for the batch-3 oracle ticket: the mesher's 24.0*maturity intermediate-step constant is source-verified but UNPINNED by any test (both mesher fixtures are monotone between dividends, so the intermediate samples never bind on mi/ma; a mutation to 0.1 stays green). The batch-3/4 oracles do not discriminate it either - do not let a green suite justify simplifying that loop.

  3. benbenbang commented on Jul 30, 2026

    @benbenbang
    MemberAuthor

    Batch-4 (final) deferrals - the European Black-Scholes FD vertical closes with batch 4 (#665-669); everything below is explicitly OUT of the epic, verified unreached by testFdEngines/testFdEngineWithNonConstantParameters (gate-confirmed):

    • 7 FDM schemes: CrankNicolson, ExplicitEuler, MethodOfLines, Hundsdorfer, CraigSneyd, ModifiedCraigSneyd, TrBDF2 - their FdmSchemeDesc factories AND FdmBackwardSolver dispatch arms (currently a typed Err citing this issue).
    • testPDESchemes (full 9-scheme, europeanoption.cpp:1479), testLocalVolatility (:1295), testDouglasVsCrankNicolson (:1633).
    • Dividends / early exercise: Spot + Escrowed cash-dividend models, EscrowedDividendAdjustment, FdmEscrowedLogInnerValueCalculator, FdmDividendHandler, FdmAmericanStepCondition, FdmBermudanStepCondition, full FdmStepConditionComposite::vanillaComposite.
    • Quanto (FdmQuantoHelper), local-vol engine path, MakeFdBlackScholesVanillaEngine fluent builder + the 3 extra engine ctors.
    • 2-D solvers (FdmHestonSolver + the fdmlinearop.cpp Heston createSolverDesc path).
      These unblock later FD engines (American/barrier/local-vol/Heston-FD) - none needed for the European vanilla vertical.
  4. benbenbang commented on Aug 9, 2026

    @benbenbang
    MemberAuthor

    Batch FDM-A record (orchestrator): COMPLETE, awaiting merge. Stack: main <- fable/826 (8a05369, American FD: FdmAmericanStepCondition + vanilla_composite + engine wiring + Ju/window oracles) <- fable/827 (da44225, Bermudan FD: BermudanExercise + FdmBermudanStepCondition + 3-arm degeneracy oracle). Both gated PASS; suite 2496 -> 2515; all probes bit, incl. the European-aliasing trap caught by the 9.065 Ju row and the no-op-condition trap caught by the strict-above-European arm. Deferral #828 (dividends/Escrowed/quanto/localVol) on the board; the rest of #636 (toMatrix/Krylov/N-D/non-BS) unchanged.

  5. changed the title [-][QL-9.x][EPIC-9][DEFER] FDM machinery beyond the European BS vertical (toMatrix/SparseMatrix, Krylov, boundaries, N-D, non-BS ops)[/-] [+][QL-9.x][DEFER] FDM remainder: sparse operators, Krylov, boundaries and multidimensional engines[/+] on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions