Lévy Area and Iterated Stochastic Integrals
StochasticDiffEqLevyArea provides Fourier-series approximations of Lévy areas and iterated stochastic integrals. It supports direct random sampling, pre-generated coefficients for deterministic reuse, and Brownian-path reconstruction within a time step.
Algorithms
StochasticDiffEqLevyArea.AbstractIteratedIntegralAlgorithm — Type
abstract type AbstractIteratedIntegralAlgorithm endAbstract type for algorithms for the simulation of iterated stochastic integrals.
StochasticDiffEqLevyArea.Fourier — Type
Fourier()Basic Fourier-series approximation of Lévy areas. Its truncation error has convergence order $1/2$ in the number of retained Fourier terms.
StochasticDiffEqLevyArea.Milstein — Type
Milstein()Fourier-series Lévy-area approximation with Milstein's Gaussian tail approximation. Its truncation error has convergence order $1/2$ in the number of retained Fourier terms.
StochasticDiffEqLevyArea.Wiktorsson — Type
Wiktorsson()Wiktorsson's Fourier-series Lévy-area approximation with a Gaussian tail-sum correction. Its truncation error has convergence order $1$ in the number of retained Fourier terms.
StochasticDiffEqLevyArea.MronRoe — Type
MronRoe()Mrongowius–Rößler Fourier-series Lévy-area approximation with an improved tail-sum correction. Its truncation error has convergence order $1$ in the number of retained Fourier terms.
Error norms
StochasticDiffEqLevyArea.AbstractErrorNorm — Type
abstract type AbstractErrorNorm endAbstract type for different error norms for iterated integral approximation.
StochasticDiffEqLevyArea.MaxL2 — Type
MaxL2Error-norm type that takes the maximum of the entrywise $L^2$ norms of an iterated-integral approximation. Construct an instance with MaxL2().
StochasticDiffEqLevyArea.FrobeniusL2 — Type
FrobeniusL2Error-norm type that takes the Frobenius norm of the entrywise $L^2$ norms of an iterated-integral approximation. Construct an instance with FrobeniusL2().
Coefficients and iterated integrals
StochasticDiffEqLevyArea.LevyAreaCoefficients — Type
LevyAreaCoefficients{T}Stores the pre-generated random numbers (Fourier coefficients) needed by a Lévy area algorithm. Separating coefficient generation from area computation enables:
- Deterministic Lévy area given the same coefficients
- Path reconstruction from the Fourier expansion
- Consistent iterated integrals across step-size changes
StochasticDiffEqLevyArea.coefficient_length — Function
coefficient_length(m, n, alg)Total number of random values stored in LevyAreaCoefficients for the given algorithm. Equals norv(m, n, alg).
StochasticDiffEqLevyArea.generate_coefficients — Function
generate_coefficients(m, n, alg, rng = default_rng(); T = Float64)Generate Fourier coefficients for Lévy area computation. The layout of X and Y depends on the algorithm:
- Fourier, Milstein, Wiktorsson: X is n×m, Y is m×n
- MronRoe: X is m×n, Y is n×m
StochasticDiffEqLevyArea.levyarea — Function
levyarea(W, n, alg; rng = default_rng())
levyarea(W, n, alg, coeffs)Approximate the antisymmetric Lévy-area matrix for the normalized Wiener increment W using n Fourier terms and algorithm alg.
The keyword form draws the required random coefficients from rng. Passing pre-generated LevyAreaCoefficients makes the computation deterministic. Use iterated_integrals to obtain the complete matrix of iterated integrals over a time step of length h.
StochasticDiffEqLevyArea.terms_needed — Function
terms_needed(dim, stepsize, eps, alg, norm)Returns the number of terms needed to achieve error at most eps.
StochasticDiffEqLevyArea.optimal_algorithm — Function
optimal_algorithm(dim, stepsize, eps = stepsize^(3 / 2), norm = MaxL2())Returns the optimal algorithm (fewest random numbers) for the given parameters.
StochasticDiffEqLevyArea.iterated_integrals — Function
iterated_integrals(W::AbstractVector, h, eps=h^(3/2); ...)Simulate iterated stochastic integrals ∫₀ʰ∫₀ˢdWᵢ(t)dWⱼ(s) for all pairs i,j.
iterated_integrals(W::AbstractVector, h, coeffs::LevyAreaCoefficients; ...)Compute iterated integrals using pre-generated Fourier coefficients (deterministic).
iterated_integrals(W::AbstractVector, q_12, h, eps; ...)Q-Wiener process version.
StochasticDiffEqLevyArea.reconstruct_path — Function
reconstruct_path(dW, h, coeffs, t_points)Reconstruct the Brownian motion at specified time points within [0, h] using the Karhunen-Loève (Fourier) expansion:
W_j(t) = (t/h)*dW_j + Σ_{k=1}^n a_{j,k} * √(2h)/(kπ) * sin(kπt/h)where a_{j,k} are the Fourier coefficients stored in coeffs.
Returns a vector of m-dimensional vectors, one per time point.
Note: The coefficient layout differs by algorithm. For Fourier/Milstein/Wiktorsson, coeffs.X[k,j] = a{j,k}. For MronRoe, coeffs.X[j,k] = a{j,k}.
StochasticDiffEqLevyArea.iterated_integrals_subinterval — Function
iterated_integrals_subinterval(
dW, h, coeffs, t_start, t_end;
n_quadrature = 64, ito_correction = true
)Compute iterated Stratonovich integrals over the sub-interval [tstart, tend] ⊂ [0, h] by reconstructing the Brownian path from Fourier coefficients and computing via Riemann sums.
Returns an m×m matrix J where:
- With itocorrection=true: J{jk} = Ito iterated integral ∫∫ dWj dWk
- With itocorrection=false: J{jk} = Stratonovich iterated integral
The accuracy improves with n_quadrature (number of evaluation points within the sub-interval) and with the truncation level n in the coefficients.