In the mathematical theory of stochastic processes, local time is a stochastic process associated with semimartingale processes such as Brownian motion, that characterizes the amount of time a particle has spent at a given level. Local time appears in various stochastic integration formulas, such as Tanaka's formula, if the integrand is not sufficiently smooth. It is also studied in statistical mechanics in the context of random fields.
For a continuous real-valued semimartingale , the local time of at the point is the stochastic process which is informally defined by
where is the Dirac delta function and is the quadratic variation. It is a notion invented by Paul Lévy. The basic idea is that is an (appropriately rescaled and time-parametrized) measure of how much time has spent at up to time . More rigorously, it may be written as the almost sure limit
which may be shown to always exist. Note that in the special case of Brownian motion (or more generally a real-valued diffusion of the form where is a Brownian motion), the term simply reduces to , which explains why it is called the local time of at . For a discrete state-space process , the local time can be expressed more simply as
Tanaka's formula also provides a definition of local time for an arbitrary continuous semimartingale on 
A more general form was proven independently by Meyer and Wang; the formula extends Itô's lemma for twice differentiable functions to a more general class of functions. If is absolutely continuous with derivative which is of bounded variation, then
where is the left derivative.
If is a Brownian motion, then for any the field of local times has a modification which is a.s. Hölder continuous in with exponent , uniformly for bounded and . In general, has a modification that is a.s. continuous in and càdlàg in .
Tanaka's formula provides the explicit Doob-Meyer decomposition for the one-dimensional reflecting Brownian motion, .
The field of local times associated to a stochastic process on a space is a well studied topic in the area of random fields. Ray-Knight type theorems relate the field Lt to an associated Gaussian process.
In general Ray-Knight type theorems of the first kind consider the field Lt at a hitting time of the underlying process, whilst theorems of the second kind are in terms of a stopping time at which the field of local times first exceeds a given value.
Let (Bt)t >= 0 be a one-dimensional Brownian motion started from B0 = a > 0, and (Wt)t>=0 be a standard two-dimensional Brownian motion W0 = 0 ? R2. Define the stopping time at which B first hits the origin, . Ray and Knight (independently) showed that
where (Lt)t >= 0 is the field of local times of (Bt)t >= 0, and equality is in distribution on C[0, a]. The process |Wx|2 is known as the squared Bessel process.
Let (Bt)t >= 0 be a standard one-dimensional Brownian motion B0 = 0 ? R, and let (Lt)t >= 0 be the associated field of local times. Let Ta be the first time at which the local time at zero exceeds a > 0
Let (Wt)t >= 0 be an independent one-dimensional Brownian motion started from W0 = 0, then
Equivalently, the process (which is a process in the spatial variable ) is equal in distribution to the square of a 0-dimensional Bessel process, and as such is Markovian.