Skip to content

Commit 96a905e

Browse files
andyElkingpatrick-kidger
authored andcommitted
Added Advanced SDE example and a table of SRKs
1 parent 392f16d commit 96a905e

4 files changed

Lines changed: 630 additions & 1 deletion

File tree

docs/api/solvers/sde_solvers.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# SDE solvers
22

3-
See also [How to choose a solver](../../usage/how-to-choose-a-solver.md#stochastic-differential-equations).
3+
See also [How to choose a solver](../../usage/how-to-choose-a-solver.md#stochastic-differential-equations)
4+
and [Advanced SDE example](../../examples/sde_example.ipynb) which gives a walkthrough of how to simulate SDEs
5+
and how to perform optimisation with respect to SDE parameters.
6+
For a table of all SDE solvers and their properties see [SDE solver table](../../devdocs/SDE_solver_table.md).
47

58
!!! info "Term structure"
69

docs/devdocs/SDE_solver_table.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SDE solver table
2+
3+
For an explanation of the terms in the table, see [how to choose a solver](../usage/how-to-choose-a-solver.md#stochastic-differential-equations).
4+
5+
This table is included as a reference that we think *should* be correct, but if you're going to use any of this information in a load-bearing way (for example a publication) then please double-check the information! It's a big table, we might have gotten something wrong.
6+
7+
```
8+
+----------------+-------+------------+------------------------------------+-------------------+----------------+------------------------------------------+
9+
| | SDE | Lévy | Strong/weak order (per noise type) | VF evaluations | Embedded error | Recommended for |
10+
| | type | area +----------+--------------+----------+-------+-----------+ estimation | (and other notes) |
11+
| | | | General | Commutative | Additive | Drift | Diffusion | | |
12+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
13+
| Euler | Itô | BM only | 0.5/1.0 | 0.5/1.0 | 1.0/1.0 | 1 | 1 | No | Itô SDEs when a cheap solver is needed. |
14+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
15+
| Heun | Strat | BM only | 0.5/1.0 | 1.0/1.0 | 1.0/1.0 | 2 | 2 | Yes | Standard solver for Stratonovich SDEs. |
16+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
17+
| EulerHeun | Strat | BM only | 0.5/1.0 | 0.5/1.0 | 1.0/1.0 | 1 | 2 | No | Stratonovich SDEs with expensive drift. |
18+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
19+
| ItoMilstein | Itô | BM only | 0.5/1.0 | 1.0/1.0 | 1.0/1.0 | 1 | 1 | No | Better than Euler for Itô SDEs, but |
20+
| | | | | | | | | | comuptes the derivative of diffusion VF. |
21+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
22+
| Stratonovich | Strat | BM only | 0.5/1.0 | 1.0/1.0 | 1.0/1.0 | 1 | 1 | No | For commutative Stratonovich SDEs when |
23+
| Milstein | | | | | | | | | space-time Lévy area is not available. |
24+
| | | | | | | | | | Computes derivative of diffusion VF. |
25+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
26+
| ReversibleHeun | Strat | BM only | 0.5/1.0 | 1.0/1.0 | 1.0/1.0 | 2 | 2 | Yes | When a reversible solver is needed. |
27+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
28+
| Midpoint | Strat | BM only | 0.5/1.0 | 1.0/1.0 | 1.0/1.0 | 2 | 2 | Yes | Usually Heun should be preferred. |
29+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
30+
| Ralston | Strat | BM only | 0.5/1.0 | 1.0/1.0 | 1.0/1.0 | 2 | 2 | Yes | Usually Heun should be preferred. |
31+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
32+
| ShARK | Strat | space-time | / | / | 1.5/2.0 | 2 | 2 | Yes | Additive noise SDEs. |
33+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
34+
| SRA1 | Strat | space-time | / | / | 1.5/2.0 | 2 | 2 | Yes | Only slightly worse than ShARK. |
35+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
36+
| SEA | Strat | space-time | / | / | 1.0/1.0 | 1 | 1 | No | Cheap solver for additive noise SDEs. |
37+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
38+
| SPaRK | Strat | space-time | 0.5/1.0 | 1.0/1.0 | 1.5/2.0 | 3 | 3 | Yes | General SDEs when embedded error |
39+
| | | | | | | | | | estimation is needed. |
40+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
41+
| GeneralShARK | Strat | space-time | 0.5/1.0 | 1.0/1.0 | 1.5/2.0 | 2 | 3 | No | General SDEs when embedded error |
42+
| | | | | | | | | | estimaiton is not needed. |
43+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
44+
| SlowRK | Strat | space-time | 0.5/1.0 | 1.5/2.0 | 1.5/2.0 | 2 | 5 | No | Commutative noise SDEs. |
45+
+----------------+-------+------------+----------+--------------+----------+-------+-----------+----------------+------------------------------------------+
46+
```

docs/examples/sde_example.ipynb

Lines changed: 578 additions & 0 deletions
Large diffs are not rendered by default.

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ nav:
123123
- Second-order sensitivities: 'examples/hessian.ipynb'
124124
- Nonlinear heat PDE: 'examples/nonlinear_heat_pde.ipynb'
125125
- Underdamped Langevin diffusion: 'examples/underdamped_langevin_example.ipynb'
126+
- Advanced SDE simulation example: 'examples/sde_example.ipynb'
126127
- Basic API:
127128
- 'api/diffeqsolve.md'
128129
- Solvers:
@@ -150,3 +151,4 @@ nav:
150151
- 'devdocs/predictor_dirk.md'
151152
- 'devdocs/adjoint_commutative_noise.md'
152153
- Stochastic Runge-Kutta methods: 'devdocs/srk_example.ipynb'
154+
- Table of SDE solvers: 'devdocs/SDE_solver_table.md'

0 commit comments

Comments
 (0)