Local time of a semimartingale (source code)

= Local time of a semimartingale
{title2=$L_t^a(X)$}

For a <continuous semimartingale> $X$, symmetric local time $L_t^a(X)$ is an occupation density weighted by <quadratic variation>. Its normalization satisfies, for nonnegative <Borel measurable functions> $f$,
$$
\int_0^t f(X_s)d[X]_s=\int_{\mathbb R}f(a)L_t^a(X)da.
$$
It measures accumulated visits near a level on the scale of the process's fluctuations. In the symmetric <Tanaka formula>,
$$
|X_t-a|=|X_0-a|+\int_0^t\operatorname{sgn}(X_s-a)dX_s+L_t^a(X),
$$
use $\operatorname{sgn}(0)=0$. For <Brownian motion>, $d[X]_s=ds$, giving the <Brownian local time> occupation density. A deterministic smooth path instead has zero local time in this sense even if it spends a long ordinary time at one level.

At a reflecting boundary, finite-variation mass can be carried by the level itself. The <right local time of a continuous semimartingale> then differs from symmetric local time. Both satisfy the density identity, which determines values only for almost every spatial level; the chosen <Tanaka formula> fixes the convention at individual levels.