← Stochastic Differential Equations

13

Time-step choice, negative values and model conditions

A trustworthy SDE result requires more than code that runs: the time grid, state boundaries, coefficient conditions and sensitivity to numerical choices must be examined.

A valid equation does not guarantee a valid numerical path

Euler–Maruyama uses normal increments with unbounded support. Even when the true process should remain in \([0,N]\), a finite-step proposal can be negative or exceed \(N\). The risk grows near boundaries, with large diffusion, or with a large time step.

Time-step requirements

This is different from checking whether a floating-point calculation is approximately zero; exact input conditions and computed numerical residuals require different tests.

Four boundary approaches

ApproachConsequence
Stop and reportExposes invalidity but produces incomplete paths.
Projection or clippingSimple and bounded, but changes the Euler–Maruyama scheme.
Absorbing rule at zeroRepresents extinction once zero is reached, but crossing behaviour remains numerical.
Alternative transformed or positivity-preserving methodCan respect structure better but requires a different numerical method.

No correction should be applied silently.

Interactive sensitivity experiment

Run 500 SIS paths at three time steps. The code records every raw out-of-range proposal before applying the same declared projection rule.

Interactive PythonTime-step and boundary diagnostics

Output

Run the code to see the result.

How to choose a practical time step

  1. Choose a plausible initial \(\Delta t\) from the biological time scale.
  2. Run the same outcome experiment with \(\Delta t/2\) and \(\Delta t/4\).
  3. Compare means, quantiles, extinction measures and correction frequency.
  4. Reduce the step until conclusions are acceptably stable for the question.
  5. Report the chosen step and diagnostic results.

Mathematical coefficient conditions

Standard Euler–Maruyama convergence theory commonly assumes sufficient regularity such as Lipschitz continuity and controlled growth of drift and diffusion. Square-root epidemic diffusion coefficients are not globally Lipschitz at zero, so boundary behaviour deserves particular care. A numerical plot alone is not a proof of convergence.

Validation checklist

What this lesson adds

You can now distinguish model validity from numerical validity, diagnose raw invalid proposals, evaluate a declared boundary rule, perform step-refinement experiments and explain why epidemic square-root diffusions require care near extinction.