WienerProcess[μ,σ]
表示 drift 为 μ、波动率为 σ 的 Wiener 过程.
表示 drift 为 0、波动率为 1 的标准 Wiener 过程.
WienerProcess
WienerProcess[μ,σ]
表示 drift 为 μ、波动率为 σ 的 Wiener 过程.
表示 drift 为 0、波动率为 1 的标准 Wiener 过程.
更多信息
- WienerProcess 也称为布朗运动、连续时间随机游走或者集成高斯白噪声.
- WienerProcess 是一个连续时间和连续状态随机过程.
- 时间 t 处的状态服从 NormalDistribution[μ t,σ
]. - 参数 μ 可以是任意实数,并且参数 σ 可以是任意正实数.
- WienerProcess 可以与诸如 Mean、PDF、Probability 和 RandomFunction 一起使用.
范例
打开所有单元 关闭所有单元基本范例 (3)
data = RandomFunction[WienerProcess[.3, .5], {0, 1, 0.01}]ListLinePlot[%, Filling -> Axis]Mean[WienerProcess[μ, σ][t]]Variance[WienerProcess[μ, σ][t]]CovarianceFunction[WienerProcess[μ, σ], s, t]CovarianceFunction[WienerProcess[], s, t]Plot3D[CovarianceFunction[WienerProcess[], s, t], {s, 0, 5}, {t, 0, 5}, ColorFunction -> "Rainbow"]范围 (12)
基本用途 (7)
data = RandomFunction[WienerProcess[.3, .5], {0, 1, 0.01}, 4]ListLinePlot[data, Filling -> Axis]RandomFunction[WienerProcess[1 / 10, 1 / 3], {0, 1, 1 / 4}, WorkingPrecision -> 20]["Path"]sample[μ_] := (SeedRandom[14];RandomFunction[WienerProcess[μ, 1], {0, 1, .01}])ListStepPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["μ = ", ToString[#]]]& /@ {-2, 0, 2}sample[σ_] := (SeedRandom[4];RandomFunction[WienerProcess[0, σ], {0, 1, .01}])ListStepPlot[sample[#], Filling -> Axis, PlotRange -> {-1, 3}, PlotLabel -> StringJoin["σ = ", ToString[#]]]& /@ {.5, 1, 1.4}data = RandomFunction[WienerProcess[.4, .7], {0, 100, 0.01}];EstimatedProcess[data, WienerProcess[μ, σ]]CorrelationFunction[WienerProcess[μ, σ], s, t]AbsoluteCorrelationFunction[WienerProcess[μ, σ], s, t]过程切片属性 (5)
单变量 SliceDistribution:
SliceDistribution[WienerProcess[μ, σ], t]Plot[Evaluate@Table[PDF[WienerProcess[][t], x], {t, {1 / 2, 1, 2}}], {x, -4, 4}, Filling -> Axis, PlotLegends -> {"t = 1/2", "t = 1", "t = 2"}]PDF[WienerProcess[μ, σ][t], x]PDF[NormalDistribution[μ t, σ Sqrt[t]], x]Simplify[% - %%]SliceDistribution[WienerProcess[μ, σ], {s, t}]WienerProcess[][{1, 2, 3}]//Mean二阶 PDF:
PDF[WienerProcess[μ, σ][{s, t}], {x, y}]高阶 PDF:
PDF[WienerProcess[μ, σ][{1, 3, 7}], {x, y, z}]Expectation[x[t] ^ 2, xWienerProcess[μ, σ]]Probability[x[t] < 6, xWienerProcess[μ, σ]]Skewness[WienerProcess[μ, σ][t]]Kurtosis[WienerProcess[μ, σ][t]]Moment[WienerProcess[μ, σ][t], r]CharacteristicFunction[WienerProcess[μ, σ][t], w]MomentGeneratingFunction[WienerProcess[μ, σ][t], w]CentralMoment 和它的母函数:
CentralMoment[WienerProcess[μ, σ][t], r]CentralMomentGeneratingFunction[WienerProcess[μ, σ][t], w]FactorialMoment 没有符号式阶数的解析式:
FactorialMoment[WienerProcess[μ, σ][t], 3]FactorialMomentGeneratingFunction[WienerProcess[μ, σ][t], w]Cumulant 和它的母函数:
Cumulant[WienerProcess[μ, σ][t], r]CumulantGeneratingFunction[WienerProcess[μ, σ][t], w]应用 (7)
Bessel2 = TransformedProcess[Sqrt[x[t]^2 + y[t]^2], {xWienerProcess[], yWienerProcess[]}, t];data = RandomFunction[Bessel2, {0, 10, 0.01}, 3];ListLinePlot[data, PlotRange -> All]{Mean[Bessel2[t]], Variance[Bessel2[t]]}使用二次 WienerProcess 定义 martingale 过程:
proc = TransformedProcess[w[t] ^ 2 - t, wWienerProcess[], t];Mean[proc[t]]CovarianceFunction[proc, s, t]ListLinePlot[RandomFunction[proc, {0, 2, .01}, 3]]𝒫 = TransformedProcess[E^w[t] - (t/2), wWienerProcess[], t];SeedRandom[5];
data = RandomFunction[𝒫, {0, 10, 0.01}, 3];ListLinePlot[data, PlotRange -> All]{Mean[𝒫[t]], Variance[𝒫[t]]}𝒫2 = ItoProcess[ⅆu[t] == u[t]ⅆw[t], u[t], {u, 1}, t, wWienerProcess[]];SeedRandom[5];
data = RandomFunction[𝒫2, {0, 10, 0.01}, 3];ListLinePlot[data, PlotRange -> All]{Mean[𝒫2[t]], Variance[𝒫2[t]]}直接使用 WienerProcess 来模拟 GeometricBrownianMotionProcess:
μ = 1;σ = 1 / 3;x0 = 2;proc = WienerProcess[μ - σ^2 / 2, σ];
SeedRandom[3];
data = RandomFunction[proc, {0, 1, s = .01}];sample = x0 Exp[data];与相应的 GeometricBrownianMotionProcess 比较:
SeedRandom[3];
gbm = RandomFunction[GeometricBrownianMotionProcess[μ, σ, x0], {s, 1 + s, s}];ListLinePlot[{sample, gbm}, PlotStyle -> {Thick, Dashed}]直接使用 WienerProcess 来模拟 BrownianBridgeProcess:
μ = 0;σ = 1 / 3;t0 = 0;t1 = 2;x0 = 0;x1 = 0;proc = WienerProcess[μ, σ];
SeedRandom[3];
data = RandomFunction[proc, {t0, t1, .01}];sample = TimeSeriesMapThread[x0(x1 - x0)(#1 - t0) / (t1 - t0) + #2 - (#1 - t0) Last[data["Values"]] / (t1 - t0) - (t1 - #1)First[data["Values"]] / (t1 - t0)&, data];与相应的 BrownianBridgeProcess 比较:
SeedRandom[3];
data = RandomFunction[BrownianBridgeProcess[σ, {t0, x0}, {t1, x1}], {t0, t1, .01}];ListLinePlot[{sample, data}, PlotStyle -> {Thick, Dotted}]P[t_, w_] := p E^σ w + (μ - (σ^2/2)) tμ = 2;σ = .1;p = 1;sim = RandomFunction[WienerProcess[], {0, 3, 0.01}, 10 ^ 2];
sol = TimeSeriesMapThread[P[#1, #2]&, sim];paths = ListLinePlot[sol, PlotStyle -> Directive[Opacity[.1]]]meanFunction = TimeSeriesThread[Mean, sol];Show[paths, ListLinePlot[meanFunction, PlotStyle -> Directive[Black, Thick]]]smoothsol = NDSolve[P'[t] == μ P[t] && P[0] == p, P, {t, 0, 3}]Plot[P[t] /. smoothsol, {t, 0, 3}]求具有正偏移的 WienerProcess 浮动到 2 所花的时间分布:
sample = Map[FirstCase[#, _ ? (Last[#] ≥ 2&)]&, RandomFunction[WienerProcess[1, 1], {0, 15, 0.01}, 10 ^ 4]["Paths"]];data0 = DeleteCases[sample, {}][[All, 1]];data = Cases[data0, _ ? Positive];对数据拟合 InverseGaussianDistribution:
edist = EstimatedDistribution[data, InverseGaussianDistribution[μ, λ]]Show[
Histogram[data, 20, "PDF"],
Plot[PDF[edist, x], {x, 0, 10}, PlotStyle -> Thick]]属性和关系 (12)
WeakStationarity[WienerProcess[μ, σ]]proc = WienerProcess[μ, σ];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]//Simplify% === %%Table[Plot[Evaluate@Probability[(x[5] <= Subscript[x, 2])(x[2] == Subscript[x, 1]), xWienerProcess[]], {Subscript[x, 2], -4, 6}, Filling -> Axis, PlotLabel -> Row[{"SubscriptBox[x, 1] = ", 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]), xWienerProcess[], Assumptions -> 0 < Subscript[t, 1] < Subscript[t, 2] && 0 ≤ Subscript[x, 1] ≤ Subscript[t, 1] && 0 ≤ Subscript[x, 2] ≤ Subscript[t, 2]]//SimplifyWiener 过程的相关函数与 RandomWalkProcess 的相同:
CorrelationFunction[RandomWalkProcess[p], s, t]CorrelationFunction[WienerProcess[μ, σ], s, t]Wiener 过程是一个特殊 ItoProcess:
ItoProcess[WienerProcess[μ, σ]]StratonovichProcess[WienerProcess[μ, σ]]模拟标准 WienerProcess 的正侧所花的时间比率:
data[n_] := RandomFunction[WienerProcess[], {0, 1, 1 / n}];ratio[n_] := Count[data[n]["Values"], _ ? Positive] / n在极限下,比率服从 ArcSinDistribution:
sample[n_, walks_] := Table[ratio[n], {i, walks}]Show[Histogram[sample[10 ^ 3, 10 ^ 3], 20, "PDF"], Plot[PDF[ArcSinDistribution[{0, 1}], x], {x, 0, 1}, PlotStyle -> Thick]]求在时间0和1之间 WienerProcess 最后改变符号的分布:
data = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 4];diff = Differences[Sign[data]];paths = diff["Paths"];sample = Map[First[FirstCase[Reverse[#], _ ? (Last[#] =!= 0&)]]&, paths];在极限下,次数服从 ArcSinDistribution:
Show[Histogram[sample, 20, "PDF"], Plot[PDF[ArcSinDistribution[{0, 1}], x], {x, 0, 1}, PlotStyle -> Thick]]求对应于 WienerProcess 最大值的时间分布,直至时间 1:
data = RandomFunction[WienerProcess[], {0, 1, .01}, n = 10 ^ 4]["Paths"];sample = {};
Do[
path = data[[i]];
m = Max[path[[All, 2]]];AppendTo[sample, First@FirstCase[path, _ ? (Last[#] == m&)]], {i, n}]在极限下,次数服从 ArcSinDistribution:
Show[Histogram[sample, 20, "PDF"], Plot[PDF[ArcSinDistribution
[{0, 1}], x], {x, 0, 1}, PlotStyle -> Thick]]proc = TransformedProcess[Sqrt[c]x[t / c], xWienerProcess[], t];Mean[proc[t]]CovarianceFunction[proc, s, t]与 WienerProcess 比较:
Mean[WienerProcess[][t]]CovarianceFunction[WienerProcess[], s, t]proc = TransformedProcess[x[t + u] - x[u], xWienerProcess[], t];Mean[proc[t]]CovarianceFunction[proc, s, t]与 WienerProcess 比较:
Mean[WienerProcess[][t]]CovarianceFunction[WienerProcess[], s, t]GeometricBrownianMotionProcess 是 WienerProcess 的变换:
proc[μ_, σ_, a_] := TransformedProcess[a Exp[(μ - σ^2 / 2)t + σ w[t]], wWienerProcess[], t]ListLinePlot[RandomFunction[proc[0, 1, 3], {0, 1, .001}]]PDF[proc[0, 1, 3][t], x]与相应 GeometricBrownianMotionProcess 的切片分布比较:
PDF[GeometricBrownianMotionProcess[0, 1, 3][t], x]% - %%//FullSimplifyWiener 过程是 BrownianBridgeProcess 的变换:
𝒫 = TransformedProcess[(t + 1)x[t / (t + 1)], xBrownianBridgeProcess[], t];Mean[𝒫[t]]CovarianceFunction[𝒫, s, t]sample = RandomFunction[𝒫, {0, 1, .01}];ListLinePlot[sample, Filling -> Axis]巧妙范例 (3)
SeedRandom[103];sample = RandomFunction[WienerProcess[], {0, 1, .001}, 2]["ValueList"];ListLinePlot[Transpose@sample, ColorFunction -> "FallColors"]proc = WienerProcess[];
SeedRandom[123];
sample = Table[RandomFunction[proc, {0, 1, 0.01}, 3]["ValueList"], {6}];Graphics3D@Table[{ColorData["SolarColors"][RandomReal[]], Tube@Line@sample[[i]]}, {i, 6}]data = RandomFunction[WienerProcess[], {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 -> 70]&[HistogramList[sd, {Range[Min[sd], Max[sd], (Max[sd] - Min[sd]) / 20]}]];ListLinePlot[data, ImageSize -> 400, PlotRange -> All,
AspectRatio -> 3 / 4, Epilog -> Inset[sliced, {1.01, 0}, {0, 10}], PlotStyle -> (cf /@ Rescale[sd]), BaseStyle -> Directive[Thin, Opacity[0.5]], PlotRangePadding -> {{0, .25}, {.5, .5}}]相关指南
-
▪
- 随机微分方程过程 ▪
- 参数式随机过程 ▪
- 有限马可夫过程 ▪
- 随机过程 ▪
- 时间和事件序列数据源
文本
Wolfram Research (2012),WienerProcess,Wolfram 语言函数,https://reference.wolfram.com/language/ref/WienerProcess.html.
CMS
Wolfram 语言. 2012. "WienerProcess." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/WienerProcess.html.
APA
Wolfram 语言. (2012). WienerProcess. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/WienerProcess.html 年
BibTeX
@misc{reference.wolfram_2026_wienerprocess, author="Wolfram Research", title="{WienerProcess}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/WienerProcess.html}", note=[Accessed: 02-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_wienerprocess, organization={Wolfram Research}, title={WienerProcess}, year={2012}, url={https://reference.wolfram.com/language/ref/WienerProcess.html}, note=[Accessed: 02-August-2026]}