Skip to contents

stochastic_integral_transform(sys, -1/2) converts an Itô system to the equivalent Stratonovich system and 1/2 converts back, adding correction_factor * sum_k (J g_k) g_k to the drift, where g_k are the noise columns and J their Jacobian. For diagonal noise only the derivative of each noise term with respect to its own state enters, which is the correct correction; ModelingToolkit uses the full Jacobian here, which agrees whenever each noise term depends only on its own state.

Usage

stochastic_integral_transform(sys, correction_factor)

Arguments

sys

A flattened System with noise equations.

correction_factor

-1/2 (Itô to Stratonovich) or 1/2.

Value

The transformed System.

Examples

t <- t_nounits; D <- D_nounits
variables("x(t)"); parameters("a", "b")
sde <- SDESystem(list(D(x) ~ a * x), list(b * x), t, name = "gbm")
equations(stochastic_integral_transform(sde, -1/2))
#> [[1]]
#> Derivative(x(t), t) ~ a*x(t) - 0.5*b^2*x(t) 
#>