CoxIngersollRossProcess[μ,σ,θ,x0]
represents a Cox–Ingersoll–Ross process with long‐term mean μ, volatility σ, speed of adjustment θ, and initial condition x0.
CoxIngersollRossProcess
CoxIngersollRossProcess[μ,σ,θ,x0]
represents a Cox–Ingersoll–Ross process with long‐term mean μ, volatility σ, speed of adjustment θ, and initial condition x0.
Details
- CoxIngersollRossProcess is also known as the CIR process.
- CoxIngersollRossProcess is a continuous‐time and continuous‐state random process.
- The state
of the Cox–Ingersoll–Ross process satisfies an Ito differential equation
, where
follows a standard WienerProcess[]. - CoxIngersollRossProcess allows x0 to be any positive real number, σ to be any nonzero real number, and θ and μ to be any nonzero real numbers of the same sign.
- CoxIngersollRossProcess can be used with such functions as Mean, PDF, Probability, and RandomFunction.
Examples
open all close allBasic Examples (3)
Simulate a Cox–Ingersoll–Ross process:
data = RandomFunction[CoxIngersollRossProcess[.3, .5, 1, 2], {0, 1, 0.01}]ListLinePlot[data, Filling -> Axis]Mean[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t]]Variance[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t]]CovarianceFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]], s, t]Plot3D[CovarianceFunction[CoxIngersollRossProcess[.3, .5, 1, 2], s, t], {s, 0, 5}, {t, 0, 5}, ColorFunction -> "Rainbow"]Scope (14)
Basic Uses (9)
Simulate an ensemble of random paths for a Cox–Ingersoll–Ross process:
data = RandomFunction[CoxIngersollRossProcess[.3, .5, 1, 2], {0, 1, 0.01}, 3]ListLinePlot[data, Filling -> Axis]Simulate with arbitrary precision:
RandomFunction[CoxIngersollRossProcess[1 / 10, 1 / 3, 1, 2], {0, 1, 1 / 4}, WorkingPrecision -> 20]["Path"]Compare paths for different values of the drift parameter:
sample[μ_] := (SeedRandom[14];RandomFunction[CoxIngersollRossProcess[μ, .3, .4, 1], {0, 1, .01}])ListStepPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["μ = ", ToString[#]]]& /@ {.3, 1, 2}Compare paths for different values of the volatility parameter:
sample[σ_] := (SeedRandom[1];RandomFunction[CoxIngersollRossProcess[.5, σ, .4, 1], {0, 1, .01}])ListStepPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["σ = ", ToString[#]]]& /@ {-1, 0.2, 1}Compare paths for different values of the speed adjustment parameter:
sample[θ_] := (SeedRandom[1];RandomFunction[CoxIngersollRossProcess[.5, 1, θ, 1], {0, 1, .01}])ListStepPlot[sample[#], Filling -> Axis, PlotLabel -> StringJoin["θ = ", ToString[#]]]& /@ {0.2, 1, 4}Simulate a Cox–Ingersoll–Ross process with different starting points:
proc[x_] := CoxIngersollRossProcess[1, .4, .3, x];pts = {.5, 1, 3};SeedRandom[2];
ListLinePlot[RandomFunction[proc[#], {0, 10, .01}]& /@ pts, Filling -> Axis, PlotLegends -> (StringJoin["x = ", ToString[#]]& /@ pts)]data = RandomFunction[CoxIngersollRossProcess[.3, .5, 1, 2], {0, 100, 0.01}];EstimatedProcess[data, CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]]]CorrelationFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]], s, t]Absolute correlation function:
AbsoluteCorrelationFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]], s, t]Process Slice Properties (5)
First-order probability density function for the slice distribution:
proc = CoxIngersollRossProcess[.3, .5, 1, 2];times = {.5, 1, 2};Plot[Evaluate@Table[PDF[proc[t], x], {t, times}], {x, 0, 3}, Filling -> Axis, PlotLegends -> {StringJoin["t = ", ToString[#]]& /@ times}]PDF[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], x]Multivariate slice distributions:
Plot3D[PDF[CoxIngersollRossProcess[-.9, 1.2, -2.1, 3][{1, 2}], {x, y}], {x, 0, 10}, {y, 0, 15}]PDF[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][{1, 2}], {x, y}]Compute the expectation of an expression:
Expectation[x[t] ^ 2, xCoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]]]Calculate the probability of an event:
Probability[x[t] < 6, xCoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]]]Skewness[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t]]//Simplify[#, σ > 0]&Kurtosis[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t]]//SimplifyMoment[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], r]CharacteristicFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], w]MomentGeneratingFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], w]CentralMoment and its generating function:
CentralMoment[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], 2]CentralMomentGeneratingFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], w]FactorialMoment and its generating function:
FactorialMoment[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], 2]FactorialMomentGeneratingFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], w]Cumulant and its generating function:
Cumulant[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], r]CumulantGeneratingFunction[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]][t], w]Properties & Relations (3)
A Cox–ingersoll–Ross process is not weakly stationary:
WeakStationarity[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]]]Conditional cumulative distribution function:
Table[Plot[NProbability[(x[5] <= Subscript[x, 2])(x[2] == Subscript[x, 1]), xCoxIngersollRossProcess[.3, 1, .3, 1.2]], {Subscript[x, 2], 0, 6}, Filling -> Axis, PlotLabel -> Row[{"SubscriptBox[x, 1] = ", Subscript[x, 1]}]], {Subscript[x, 1], {.3, 1, 2.3, 3}}]A Cox–ingersoll–Ross process is a special ItoProcess:
ItoProcess[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]]]As well as StratonovichProcess:
StratonovichProcess[CoxIngersollRossProcess[μ, σ, θ, Subscript[x, 0]]]Neat Examples (3)
Simulate a Cox–Ingersoll–Ross process in two dimensions:
SeedRandom[103];sample = RandomFunction[CoxIngersollRossProcess[.3, .5, 1, 2], {0, 1, .001}, 2]["ValueList"];ListLinePlot[Transpose@sample, ColorFunction -> "FallColors"]Simulate a Cox–Ingersoll–Ross process in three dimensions:
proc = CoxIngersollRossProcess[-.4, .5, -1.3, 2];
SeedRandom[123];
sample = Table[RandomFunction[proc, {0, 1, 0.01}, 3]["ValueList"], {6}];Graphics3D@Table[{ColorData["SolarColors"][RandomReal[]], Tube@Line@sample[[i]]}, {i, 6}]Simulate 500 paths from a Cox–Ingersoll–Ross process:
data = RandomFunction[CoxIngersollRossProcess[.4, .5, .3, 2], {0, 1, .01}, 500];Take a slice at 1 and visualize its distribution:
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 -> 62]&[HistogramList[sd, {Range[Min[sd], Max[sd], (Max[sd] - Min[sd]) / 20]}]];Plot paths and histogram distribution of the slice distribution at 1:
ListLinePlot[data, ImageSize -> 400, PlotRange -> All,
AspectRatio -> 3 / 4, Epilog -> Inset[sliced, {1.01, 2}, {0, 10}], PlotStyle -> (cf /@ Rescale[sd]), BaseStyle -> Directive[Thin, Opacity[0.5]], PlotRangePadding -> {{0, .25}, {.5, .5}}]Related Guides
History
Text
Wolfram Research (2012), CoxIngersollRossProcess, Wolfram Language function, https://reference.wolfram.com/language/ref/CoxIngersollRossProcess.html.
CMS
Wolfram Language. 2012. "CoxIngersollRossProcess." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CoxIngersollRossProcess.html.
APA
Wolfram Language. (2012). CoxIngersollRossProcess. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CoxIngersollRossProcess.html
BibTeX
@misc{reference.wolfram_2026_coxingersollrossprocess, author="Wolfram Research", title="{CoxIngersollRossProcess}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CoxIngersollRossProcess.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_coxingersollrossprocess, organization={Wolfram Research}, title={CoxIngersollRossProcess}, year={2012}, url={https://reference.wolfram.com/language/ref/CoxIngersollRossProcess.html}, note=[Accessed: 13-June-2026]}