Skip to content

random_ou

random_ou(ndim, rng, skew_scale=0.5)

Random stable Ornstein-Uhlenbeck process with symmetric and skew-symmetric parts.

The drift matrix is B = S + A, with S = Q diag(lambda) Q^T (Q Haar-random orthogonal, lambda_i ~ U[0.1, 2], so B is stable) and A = skew_scale (G - G^T) / 2 (G_ij ~ N(0, 1)). The diffusion is D = 0.5 I. The initial law is far from stationarity: m0 ~ N(0, 9 I) and S0 = R diag(0.1 logspace(-1, 0, ndim)) R^T (R Haar-random).

Parameters:

  • ndim (int) –

    State dimension.

  • rng (Generator) –

    Random generator.

  • skew_scale (float, default: 0.5 ) –

    Scale of the skew-symmetric part; 0 gives a gradient (symmetric) drift.

Returns:

  • B ( ndarray of shape (ndim, ndim) ) –

    Drift matrix, dx = -B x dt + sqrt(2 D) dW.

  • D ( ndarray of shape (ndim, ndim) ) –

    Diffusion matrix.

  • m0 ( ndarray of shape (ndim,) ) –

    Initial mean.

  • S0 ( ndarray of shape (ndim, ndim) ) –

    Initial covariance.