Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Itovsn3

Guides

  • Main

Tech Notes

  • Bessel
  • BlackScholes
  • ItoArea
  • MardiaDryden
  • Reflect
  • Stochastic Integration

Symbols

  • AddDrift
  • AddFixed
  • AddQuadVar
  • Brktbydt
  • BrownBasis
  • BrownSingle
  • BSDQ
  • Drftbydt
  • Drift
  • Fixed
  • GetItoProc
  • InitialValue
  • Introduce
  • ItoD
  • ItoExpand
  • ItoInit
  • ItoIntegral
  • ItoReset
  • Itosde
  • ItoStatus
  • RandomQ
Bessel
Initialize and set up semimartingales
Backwards differential equation for the Bessel process
Second-order analysis of B1
Transition kernel for 3d Bessel process
Ito formula for one-dimensional Brownian motion
Contact Information
Second-order characteristics of Bessel process
Acknowledgements
Probability of hitting one level before another
​
Author Information
Wilfrid S. Kendall
Statistics, University of Warwick,
Coventry CV4 7 AL, UK.
Purpose
This is a Mathematica notebook that demonstrates simple calculations for Bessel processes using Itovsn3.
IMPORTANT
This notebook assumes nothing has been previously defined . Quit Mathematica and reload if this is not the case!
Load package
In[1]:=
Needs["FernandoDuarte`Itovsn3`"]
Initialize and set up semimartingales
Initialize Itovsn3 and set up a three-dimensional Brownian motion (B1,B2,B3).:
In[2]:=
ItoReset
[t,dt]​​
BrownBasis
[{B1,B2,B3},{B10,B20,B30}];
Out[2]//TableForm=
Itovsn3 resetting ...
Itovsn3 initialized
with time semimartingale t
and time differential dt
Inspect the resulting second-order structure.
In[4]:=
ItoStatus
[]
Out[4]=
Summary of current structure of stochastic differentials
Current second-order structure of semimartingale differentials:
dB3
dB2
dB1
dt
dB3
dt
0
0
0
dB2
0
dt
0
0
dB1
0
0
dt
0
dt
0
0
0
0
Current first-order structure of semimartingale differentials:
dB3
dB2
dB1
dt
0
0
0
dt
Current initial values:
B3
B2
B1
t
B30
B20
B10
0
Second-order analysis of B1
First compute the stochastic differential of B1:
In[5]:=
sd=
ItoD
[B1]
Out[5]=
dB1
Now compute its quadratic variation:
In[6]:=
2
sd
Out[6]=
2
dB1
We need to apply the Ito multiplication rules separately:
In[7]:=
ItoExpand
[
2
sd
]
Out[7]=
dt
Now compute its drift:
In[8]:=
Drift
[sd]
Out[8]=
0
Finally, compute the initial value of B1 at time 0:
In[9]:=
InitialValue
[0,B1]
Out[9]=
B10
Ito formula for one-dimensional Brownian motion
Consider the stochastic differential equation for the following general smooth function of time and Brownian motion:
In[10]:=
X=f[t,B1]
Out[10]=
f[t,B1]
The Ito formula is given by
In[11]:=
sd=
ItoD
[X]
Out[11]=
dB1
(0,1)
f
[t,B1]+
1
2
dt
(0,2)
f
[t,B1]+dt
(1,0)
f
[t,B1]
with drift part
In[12]:=
Drift
[sd]
Out[12]=
dt
1
2
(0,2)
f
[t,B1]+
(1,0)
f
[t,B1]
and volatility
In[13]:=
ItoExpand
[
2
sd
]
Out[13]=
dt
2
(0,1)
f
[t,B1]
Second-order characteristics of Bessel process
First construct the radial part of the vector (B1,B2,B3):
In[14]:=
vec={B1,B2,B3}​​R=
vec.vec
Out[14]=
{B1,B2,B3}
Out[15]=
2
B1
+
2
B2
+
2
B3
Now compute its stochastic differential
In[16]:=
sd=
ItoD
[R]
Out[16]=
B1dB1
2
B1
+
2
B2
+
2
B3
+
B2dB2
2
B1
+
2
B2
+
2
B3
+
B3dB3
2
B1
+
2
B2
+
2
B3
-
2
B1
dt
2
3/2
(
2
B1
+
2
B2
+
2
B3
)
-
2
B2
dt
2
3/2
(
2
B1
+
2
B2
+
2
B3
)
-
2
B3
dt
2
3/2
(
2
B1
+
2
B2
+
2
B3
)
+
3dt
2
2
B1
+
2
B2
+
2
B3
Now continue as before: compute its quadratic variation:
In[17]:=
ItoExpand
[
2
sd
]
Out[17]=
2
B1
dt
2
B1
+
2
B2
+
2
B3
+
2
B2
dt
2
B1
+
2
B2
+
2
B3
+
2
B3
dt
2
B1
+
2
B2
+
2
B3
In[18]:=
Simplify
ItoExpand
[
2
sd
]
Out[18]=
dt
Now compute its drift:
In[19]:=
Drift
[sd]
Out[19]=
-
2
B1
2
3/2
(
2
B1
+
2
B2
+
2
B3
)
-
2
B2
2
3/2
(
2
B1
+
2
B2
+
2
B3
)
-
2
B3
2
3/2
(
2
B1
+
2
B2
+
2
B3
)
+
3
2
2
B1
+
2
B2
+
2
B3
dt
In[20]:=
Simplify
Drift
[sd]
Out[20]=
dt
2
B1
+
2
B2
+
2
B3
Finally, compute the initial value at time 0:
Probability of hitting one level before another
Consider the probability of hitting level a before level b: we use the fact that this probability must be a martingale!
First compute the differential equation for p[R] the probability that R hits level a before level b.
So chance of hitting level a before level b if we start at the mid-point level (a+b)/2 is:
Check boundary conditions
Check differential equation (we need to stipulate that a and b are not time-varying!)
Backwards differential equation for the Bessel process
If k[t,R] is the heat kernel for the Bessel process then the following is a martingale:
The corresponding backwards equation is
Transition kernel for 3d Bessel process
Investigate the behaviour of the heat kernel q[t,a,b] for the Bessel process in three dimensions:
We evaluate the Ito differential and drift corresponding to the backwards differential equation. Mathematica is slow in elucidating these quantities when referred to the original constituent Brownian components, so we first introduce a separate BESS(3) process S.
The computation of the stochastic differential leads to a rather long expression!
The computation of the drift yields a similarly long expression, till we apply Together:
It remains to check the behaviour at the pole when t is close to t1 (and S close to S1), when the kernel should behave like the kernel for the standard one-dimensional Brownian motion:
Inspection of the simplified square of this ratio, bearing in mind that t tends to t1 from below, shows that the kernel behaves as required.
(We can't use Limit here because Mathematica cannot tell how to deal with the badly behaved singularity here.)
Contact Information
Email: w.s.kendall@warwick.ac.uk
URL: http://www.warwick.ac.uk/go/WSK
Acknowledgements
The research reported here was supported by EPSRC grants GR/71677 (Stochastic calculus in AXIOM using modules of stochastic differentials) and GR/L56831 (Perfect simulation in stochastic geometry), and a joint EPSRC/BBSRC research grant (Multi-strain species modelling and control via differential algebra reductions). This Mathematica notebook was prepared during a visit to MSRI Berkeley during its 1997-1998 program Stochastic Analysis. Finally it is a pleasure to express my gratitude to my friends Suzanne Scotchmer and Joseph Farrell for the generous hospitality they showed to me during my visit to MSRI.

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com