Ito's lemma
In mathematics, Ito's lemma is used in Ito stochastic calculus to find the differential of a function of a particular type of stochastic process. It is the stochastic calculus counterpart of the chain rule in ordinary calculus and is best memorized using the Taylor series expansion and retaining the second order term related to the stochastic component change. The lemma is widely employed in mathematical finance.

# Ito processes
In its simplest form, Ito's lemma states that for an Ito process
and any twice continuously differentiable function f on the real numbers, then f(X) is also an Ito process satisfying
\begin{align}
df(X_t) &= f^\prime(X_t)\,dX_t + \frac{1}{2}f^{\prime\prime}(X_t)\sigma^2_t\,dt\\
&= f^\prime(X_t)\sigma_t\,dB_t + \left(f^\prime(X_t)\mu_t+\frac{1}{2}f^{\prime\prime}(X_t)\sigma^2_t\right)\,dt.
\end{align}

# Continuous semimartingales
More generally, Ito's lemma applies for any continuous d-dimensional semimartingale X=(X1,X2,...,Xd), and twice continuously differentiable and real valued function f on Rd. Then, f(X) is a semimartingale satisfying
In this expression, the term f,i represents the partial derivative of f(x) with respect to xi, and  is the quadratic covariation process of Xi and Xj.

# Non-continuous semimartingales
Ito's lemma can also be applied to general d-dimensional semimartingales, which need not be continuous. In general, a semimartingale is a cadlag process, and an additional term needs to be added to the formula to ensure that the jumps of the process are correctly given by Ito's lemma.
For any cadlag process Yt, the left limit in t is denoted by Yt-, which is a left-continuous process. The jumps are written as Yt = Yt - Yt-. Then, Ito's lemma states that if X = (X1,X2,...,Xd) is a d-dimensional semimartingale and f is a twice continuously differentiable real valued function on Rd then f(X) is a semimartingale, and
\begin{align}
f(X_t)= & f(X_0)+\sum_{i=1}^d\int_0^t f_{,i}(X_{s-})\,dX^i_s + \frac{1}{2}\sum_{i,j=1}^d \int_0^t f_{,ij}(X_{s-})\,d_s\\
&+\sum_{s\le t}\left(\Delta f(X_s)-\sum_{i=1}^df_{,i}(X_{s-})\Delta X^i_s-\frac{1}{2}\sum_{i,j=1}^d f_{,ij}(X_{s-})\Delta X^i_s\Delta X^j_s\right).
\end{align}
This differs from the formula for continuous semimartingales by the additional term summing over the jumps of X, which ensures that the jump of the right hand side at time t is f(Xt).

# Informal derivation
A formal proof of the lemma requires us to take the limit of a sequence of random variables, which is not done here.  Instead, we can derive Ito's lemma by exampling a Taylor series and applying the rules of stochastic calculus.
Assume the Ito process is in the form of
Expanding f(x, t) in a Taylor series in x and t we have
and substituting a dt + b dB for dx gives
In the limit as dt tends to 0, the dt2 and dt dB terms disappear but the dB2 term tends to dt. The latter can be shown if we prove that
The proof of this statistical property is however beyond the scope of this article.
Deleting the dt2 and dt dB terms, substituting dt for dB2, and collecting the dt and dB terms, we obtain
as required.
The formal proof is beyond the scope of this article.

# Examples

## Geometric Brownian motion
A process S is said to follow a geometric Brownian motion with volatility  and drift  if it satisfies the stochastic differential equation dS = S(dB + dt), for a Brownian motion B.
Applying Ito's lemma with f(S) = log(S) gives
\begin{align}
d\log(S) &= f^\prime(S)\,dS + \frac{1}{2}f^{\prime\prime}(S)S^2\sigma^2\,dt \\
&= \frac{1}{S}\left( \sigma S\,dB + \mu S\,dt\right) - \frac{1}{2}\sigma^2\,dt \\
&= \sigma\,dB +(\mu-\sigma^2/2)\,dt.
\end{align}
It follows that log(St) = log(S0) + Bt + ( - 2/2)t, and exponentiating gives the expression for S,

## The Doleans exponential
The Doleans exponential (or stochastic exponential) of a continuous semimartingale X is defined to be the solution to the SDE dY = YdX with initial condition Y0 = 1. It is sometimes denoted by Template:Unicode(X).
Applying Ito's lemma with f(Y)=log(Y) gives
\begin{align}
d\log(Y) &= \frac{1}{Y}\,dY -\frac{1}{2Y^2}\,d \\
&= dX - \frac{1}{2}\,d.
\end{align}
Exponentiating gives the solution

## BlackScholes formula
Ito's lemma can be used to derive the BlackScholes formula for an option. Suppose a stock price follows an exponential Brownian motion given by the stochastic differential equation dS = S(dB + dt).
Then, if the value of an option at time t is f(t,St), Ito's lemma gives
The term (f/S) dS represents the change in value in time dt of the trading strategy consisting of holding an amount f/S of the stock. If this trading strategy is followed, and any cash held is assumed to grow at the risk free rate r, then the total value V of this portfolio satisfies the SDE
This strategy replicates the option if V = f(t,S).
Combining these equations gives the Black-Scholes formula