OrnsteinUhlenbeckProcess[μ,σ,θ]
表示稳态 Ornstein–Uhlenbeck 过程,其中长期均值为 μ,波动率为
,均值回归速度 θ.
OrnsteinUhlenbeckProcess[μ,σ,θ,x0]
表示一个 Ornstein–Uhlenbeck 过程,其中初始条件为 x0.
OrnsteinUhlenbeckProcess
OrnsteinUhlenbeckProcess[μ,σ,θ]
表示稳态 Ornstein–Uhlenbeck 过程,其中长期均值为 μ,波动率为
,均值回归速度 θ.
OrnsteinUhlenbeckProcess[μ,σ,θ,x0]
表示一个 Ornstein–Uhlenbeck 过程,其中初始条件为 x0.
更多信息
- OrnsteinUhlenbeckProcess 是一个连续时间和连续状态随机过程.
- OrnsteinUhlenbeckProcess 也被称为 Vasicek 模型.
- Ornstein–Uhlenbeck 过程的状态
满足 Ito 微分方程
,其中
服从标准 WienerProcess[]. - OrnsteinUhlenbeckProcess[μ,σ,θ] 的初始值是随机的,并且服从 NormalDistribution[μ,σ/
]. - 时间 t 处的 OrnsteinUhlenbeckProcess[μ,σ,θ] 服从 NormalDistribution[μ,σ/
]. - 时间 t 处的 OrnsteinUhlenbeckProcess[μ,σ,θ,x0] 服从 NormalDistribution[x0 exp(-θ t)+μ(1-exp(-θ t)),
]. - OrnsteinUhlenbeckProcess 允许 μ 和 x0 是任意实数,并且 σ 和 θ 是任意正实数.
- OrnsteinUhlenbeckProcess 可以用于诸如 Mean、PDF、Probability 和 RandomFunction 等函数.
范例
打开所有单元 关闭所有单元基本范例 (3)
模拟具有随机初始条件的 Ornstein–Uhlenbeck 过程:
data = RandomFunction[OrnsteinUhlenbeckProcess[0, .1, .3], {0, 10, .1}]ListLinePlot[data, Filling -> Axis]data = RandomFunction[OrnsteinUhlenbeckProcess[0, .1, .3, 1], {0, 20, .1}];ListLinePlot[data, Filling -> Axis]Mean[OrnsteinUhlenbeckProcess[μ, σ, θ][t]]Variance[OrnsteinUhlenbeckProcess[μ, σ, θ][t]]Mean[OrnsteinUhlenbeckProcess[μ, σ, θ, x][t]]Variance[OrnsteinUhlenbeckProcess[μ, σ, θ, x][t]]CovarianceFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], s, t]Plot3D[CovarianceFunction[OrnsteinUhlenbeckProcess[0, 1, .2], s, t], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]CovarianceFunction[OrnsteinUhlenbeckProcess[μ, σ, θ, x], s, t]Plot3D[CovarianceFunction[OrnsteinUhlenbeckProcess[0, 1, .2, 1], s, t], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]范围 (12)
基本用途 (7)
data = RandomFunction[OrnsteinUhlenbeckProcess[.3, .5, .4], {0, 1, 0.01}, 4]ListLinePlot[data, Filling -> Axis]RandomFunction[OrnsteinUhlenbeckProcess[1 / 10, 1 / 3, 1 / 2], {0, 1, 1 / 4}, WorkingPrecision -> 20]["Path"]sample[θ_] := (SeedRandom[14];RandomFunction[OrnsteinUhlenbeckProcess[0, 1, θ], {0, 1, .01}])ListStepPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["θ = ", ToString[#]]]& /@ {.1, 1, 10}points = {-2, -1, 0, 1};
sample[x_] := RandomFunction[OrnsteinUhlenbeckProcess[0, .5, .3, x], {0, 10, 0.1}];ListLinePlot[sample[#]& /@ points, PlotRange -> All, Filling -> Axis, PlotLegends -> (StringJoin["x = ", ToString[#]]& /@ points)]data = RandomFunction[OrnsteinUhlenbeckProcess[0.8, 1, .2], {0, 1000, 0.01}];EstimatedProcess[data, OrnsteinUhlenbeckProcess[μ, σ, θ]]m = {"LeastSquares", "MaximumConditionalLikelihood"};FindProcessParameters[data, OrnsteinUhlenbeckProcess[μ, σ, θ, x0], ProcessEstimator -> #]& /@ mCorrelationFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], s, t]CorrelationFunction[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]], s, t]AbsoluteCorrelationFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], s, t]AbsoluteCorrelationFunction[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]], s, t]过程切片属性 (5)
单变量 SliceDistribution:
OrnsteinUhlenbeckProcess[μ, σ, θ][t]Plot[PDF[OrnsteinUhlenbeckProcess[0, 1, 1 / 3][t], x], {x, -3, 3}, Filling -> Axis]PDF[OrnsteinUhlenbeckProcess[μ, σ, θ][t], x]SliceDistribution[OrnsteinUhlenbeckProcess[μ, σ, θ, x0], t]Plot[Evaluate@Table[PDF[OrnsteinUhlenbeckProcess[0, 1, .5, 2][t], x], {t, {1 / 2, 1, 2}}], {x, -3, 3}, Filling -> Axis, PlotLegends -> {"t = 1/2", "t = 1", "t = 2"}]PDF[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]][t], x]SliceDistribution[OrnsteinUhlenbeckProcess[0, 1, 2], {s, t}]SliceDistribution[OrnsteinUhlenbeckProcess[0, 1, 2, 1], {1, 2, 3}]Mean[%]Expectation[x[t] + x[t] ^ 2, xOrnsteinUhlenbeckProcess[μ, σ, θ]]//SimplifyProbability[x[t] > -1, xOrnsteinUhlenbeckProcess[μ, σ, θ]]Skewness[OrnsteinUhlenbeckProcess[μ, σ, θ][t]]Skewness[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]][t]]Kurtosis[OrnsteinUhlenbeckProcess[μ, σ, θ][t]]Kurtosis[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]][t]]Moment[OrnsteinUhlenbeckProcess[μ, σ, θ][t], r]CharacteristicFunction[OrnsteinUhlenbeckProcess[μ, σ, θ][t], w]MomentGeneratingFunction[OrnsteinUhlenbeckProcess[μ, σ, θ][t], w]CentralMoment 和它的母函数:
CentralMoment[OrnsteinUhlenbeckProcess[μ, σ, θ][t], r]CentralMomentGeneratingFunction[OrnsteinUhlenbeckProcess[μ, σ, θ][t], w]FactorialMoment 在符号式阶数下没有解析形式:
FactorialMoment[OrnsteinUhlenbeckProcess[μ, σ, θ][t], r]FactorialMoment[OrnsteinUhlenbeckProcess[μ, σ, θ][t], 3]FactorialMomentGeneratingFunction[OrnsteinUhlenbeckProcess[μ, σ, θ][t], w]Cumulant 和母函数:
Cumulant[OrnsteinUhlenbeckProcess[μ, σ, θ][t], r]CumulantGeneratingFunction[OrnsteinUhlenbeckProcess[μ, σ, θ][t], w]推广和延伸 (1)
𝒫 = TransformedProcess[p[2t + 1] ^ 2 + 3, pOrnsteinUhlenbeckProcess[0, 1, 0.2], t];data = RandomFunction[𝒫, {0, 30, 0.1}, 3];ListLinePlot[data, PlotRange -> All]{Mean[𝒫[t]], Variance[𝒫[t]]}data1 = RandomVariate[𝒫[1.9], 2000];{Mean[data1], Variance[data1]}属性和关系 (9)
从随机数开始的 OrnsteinUhlenbeckProcess 是弱稳态的:
WeakStationarity[OrnsteinUhlenbeckProcess[μ, σ, θ]]WeakStationarity[OrnsteinUhlenbeckProcess[μ, σ, θ, a]]FourierTransform[CovarianceFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], h], h, ω, FourierParameters -> {1, 1}]Ornstein–Uhlenbeck 过程具有定义良好的 StationaryDistribution:
StationaryDistribution[OrnsteinUhlenbeckProcess[μ, σ, θ]]StationaryDistribution[OrnsteinUhlenbeckProcess[μ, σ, θ, a]]Ornstein–Uhlenbeck 过程不具有独立的增量:
proc = OrnsteinUhlenbeckProcess[μ, σ, θ];Expectation[(x[t2] - x[t1])(x[t4] - x[t3]), xproc, Assumptions -> 0 < t1 < t2 < t3 < t4]//SimplifyExpectation[(x[t2] - x[t1]), xproc, Assumptions -> 0 < t1 < t2] * Expectation[(x[t4] - x[t3]), xproc, Assumptions -> 0 < t3 < t4]% === %%proc = OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]];Expectation[(x[t2] - x[t1])(x[t4] - x[t3]), xproc, Assumptions -> 0 < t1 < t2 < t3 < t4]//SimplifyExpectation[(x[t2] - x[t1]), xproc, Assumptions -> 0 < t1 < t2] * Expectation[(x[t4] - x[t3]), xproc, Assumptions -> 0 < t3 < t4]% === %%Table[Plot[Evaluate@Probability[(x[5] <= Subscript[x, 2])(x[2] == Subscript[x, 1]), xOrnsteinUhlenbeckProcess[0, 1, .2]], {Subscript[x, 2], -4, 6}, Filling -> Axis, PlotLabel -> StringJoin["SubscriptBox[x, 1] = ", ToString[Subscript[x, 1]]]], {Subscript[x, 1], {-1.5, -.4, 1.3, 3}}]Probability[(x[Subscript[t, 2]] ≤ Subscript[x, 2])(x[Subscript[t, 1]] == Subscript[x, 1]), xOrnsteinUhlenbeckProcess[μ, σ, θ], Assumptions -> 0 < Subscript[t, 1] < Subscript[t, 2] && 0 ≤ Subscript[x, 1] ≤ Subscript[t, 1] && 0 ≤ Subscript[x, 2] ≤ Subscript[t, 2]]//Simplify具有固定初始条件的 Ornstein–Uhlenbeck 过程是一个特殊的 ItoProcess:
ItoProcess[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]]]StratonovichProcess[OrnsteinUhlenbeckProcess[μ, σ, θ, Subscript[x, 0]]]Ornstein–Uhlenbeck 过程是随机微分方程
的解:
μ = 1.2;σ = 0.3;θ = 1;T = 5;noisysol = RandomFunction[OrnsteinUhlenbeckProcess[μ, σ, θ, 2], {0, T, 0.01}, 10 ^ 2];
meanFunction = TimeSeriesThread[Mean, noisysol];Show[ListLinePlot[noisysol, PlotStyle -> Directive[Opacity[.1]]], ListLinePlot[meanFunction, PlotStyle -> Directive[Black, Thick]]]smoothsol = NDSolve[{P'[t] == θ(μ - P[t]), P[0] == 2}, P, {t, 0, T}]Plot[P[t] /. smoothsol, {t, 0, T}, PlotRange -> {0.5, 2.5}]具有三个参数的 Ornstein–Uhlenbeck 是均值遍历的:
proc = OrnsteinUhlenbeckProcess[μ, σ, θ];WeakStationarity[proc]abscorr[h_] = AbsoluteCorrelationFunction[proc, h]int[t_] = 1 / (2 * t)Integrate[(1 - Abs[u] / (2 * t))abscorr[u], {u, -2 * t, 2 * t}, Assumptions -> t > 0 && θ > 0]Limit[int[t], t -> ∞, Assumptions -> θ > 0]整数时间处的 Ornstein–Uhlenbeck 过程的表现与一阶 ARProcess 类似:
ou = OrnsteinUhlenbeckProcess[μ, σ, θ];创建矩方程用来求 ARProcess 的参数:
momEq = And[Mean[ou[t]] == Mean[ARProcess[c, {a}, b][t]],
CovarianceFunction[ou, h] == CovarianceFunction[ARProcess[c, {a}, b], h]]{sol} = Solve[And[(momEq /. h -> 0), momEq /. h -> 1], {a, b, c}, Reals]//FullSimplify[#, θ != 0 && σ > 0]&创建 ARProcess:
ar = ARProcess[c, {a}, b] /. solMean /@ {ou[t], ar[t]}//FullSimplifyCovarianceFunction[#, h]& /@ {ou, ar}//FullSimplify巧妙范例 (3)
模拟二维空间中的 Ornstein–Uhlenbeck 过程:
SeedRandom[19];sample = RandomFunction[OrnsteinUhlenbeckProcess[-1, 1, .3], {0, 1, .001}, 2]["ValueList"];ListLinePlot[Transpose@sample, ColorFunction -> "FallColors"]模拟三维空间中的 Ornstein–Uhlenbeck 过程:
SeedRandom[123];
sample = Table[RandomFunction[OrnsteinUhlenbeckProcess[0, 1, 1 / 4, 0], {0, 1, 0.01}, 3]["ValueList"], {8}];Graphics3D@Table[{ColorData["SolarColors"][RandomReal[]], Tube@Line@sample[[i]]}, {i, 8}]模拟来自 Ornstein–Uhlenbeck 过程的500条路径:
data = RandomFunction[OrnsteinUhlenbeckProcess[0, 1, 1 / 3, 2], {0, 1, .01}, 500];sd = data["SliceData", 1];cf = ColorData["Rainbow"];
sliced = BarChart[Last[#], Axes -> False, BarOrigin -> Left, AspectRatio -> 4, ChartStyle -> (cf /@ Rescale[MovingAverage[First[#], 2], {Min[sd], Max[sd]}, {0, 1}]), ImageSize -> 68]&[HistogramList[sd, {Range[-3, 6, .3]}]];ListLinePlot[data, ImageSize -> 400, PlotRange -> All,
AspectRatio -> 3 / 4, Epilog -> Inset[sliced, {1.01, 0}, {0, 8}], PlotStyle -> (cf /@ Rescale[sd]), BaseStyle -> Directive[Thin, Opacity[0.5]], PlotRangePadding -> {{0, .25}, {.5, .5}}]文本
Wolfram Research (2012),OrnsteinUhlenbeckProcess,Wolfram 语言函数,https://reference.wolfram.com/language/ref/OrnsteinUhlenbeckProcess.html.
CMS
Wolfram 语言. 2012. "OrnsteinUhlenbeckProcess." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/OrnsteinUhlenbeckProcess.html.
APA
Wolfram 语言. (2012). OrnsteinUhlenbeckProcess. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/OrnsteinUhlenbeckProcess.html 年
BibTeX
@misc{reference.wolfram_2026_ornsteinuhlenbeckprocess, author="Wolfram Research", title="{OrnsteinUhlenbeckProcess}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/OrnsteinUhlenbeckProcess.html}", note=[Accessed: 07-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_ornsteinuhlenbeckprocess, organization={Wolfram Research}, title={OrnsteinUhlenbeckProcess}, year={2012}, url={https://reference.wolfram.com/language/ref/OrnsteinUhlenbeckProcess.html}, note=[Accessed: 07-November-2026]}