Skip to content

Fix backwards-in-time solve for SRKs#746

Merged
patrick-kidger merged 2 commits intopatrick-kidger:mainfrom
sammccallum:srk-fix
Apr 20, 2026
Merged

Fix backwards-in-time solve for SRKs#746
patrick-kidger merged 2 commits intopatrick-kidger:mainfrom
sammccallum:srk-fix

Conversation

@sammccallum
Copy link
Copy Markdown
Contributor

The AbstractSRK methods produced incorrect solutions when solving backwards-in-time. The fix proposed in #598 and #599 got the methods to converge but with incorrect strong orders. This PR gets the methods back to their correct strong orders.

The two key points are:

  • AbstractSRK methods have two internal times: unsigned h and signed return from drift.contr(t0, t1)
  • WrapTerm multiplies the Levy areas by direction, but the space-time Levy area H should remain unchanged

The test_sde1.py test has been edited to now check strong order for both forwards and backwards in time.

@sammccallum sammccallum changed the title Fix backwards-in-time solve for srk's Fix backwards-in-time solve for SRKs Apr 10, 2026
@sammccallum
Copy link
Copy Markdown
Contributor Author

The dtype promotion was needed to two more places. Sorry about that, Patrick

@patrick-kidger patrick-kidger merged commit 0f77ba0 into patrick-kidger:main Apr 20, 2026
2 checks passed
@patrick-kidger
Copy link
Copy Markdown
Owner

patrick-kidger commented Apr 20, 2026

No worries! And merged 🎉

Thanks for identifying the problem and the solution :) I appreciate you make this happen!

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