Malliavin calculus
The Malliavin calculus, named after Paul Malliavin, is a theory of variational stochastic calculus. In other words it provides the mechanics to compute derivatives of random variables.
The original motivation for the development of the subject was the desirability to provide a stochastic proof that Hormander's condition is sufficient to ensure that the solution of a stochastic differential equation has a density (which was earlier established by PDE techniques).  The calculus also allows important regularity bounds to be obtained for this density.
While this original motivation is still very important the calculus has found numerous other applications; for example in stochastic filtering.  A useful feature is the ability to perform integration by parts on random variables. This may be used in financial mathematics to compute sensitivities of financial derivatives (also known as the Greeks).

# Invariance principle
The usual invariance principle for Lebesgue integration is for any real h the 
following holds
This can be used to derive the integration by parts formula since setting f = gh it implies
\int g' h\, d \lambda.
In the stochastic sense, for a Cameron-Martin-Girsanov direction
an analogue of the invariance principle can be derived and hence an integration
by parts formula
\frac{1}{2}\varepsilon^2 \int_0^1 u_s\, ds \right ) \right ].

# Clark-Ocone formula
One of the most useful results from Malliavin calculus is the Clark-Ocone theorem, which allows the process in the martingale representation theorem to be identified explicitly. A simplified version of this theorem is as follows:
For F : C \to \R satisfying  E(F(X)^2)  which is Lipschitz and such that F has a strong derivative kernel, in the sense that 
for \varphi in C
then
where H is the previsible projection of F'(x, (t,1]) which may be viewed as the derivative of the function F with respect to a suitable parallel shift of the process X over the portion (t,1] of its domain.
This may be more concisely expressed by
Much of the work in the formal development of the Malliavin calculus involves extending this result to the largest possible class of functionals F by replacing the derivative kernel used above by the "Malliavin derivative" denoted D_t in the above statement of the result.

# Skorohod integral
The Skorohod integral operator which is conventionally denoted  is defined as the adjoint of the Malliavin derivative thus for u in the domain of the operator which is a subset of L^2([0,\infty) \times \Omega),
for F in the domain of the Malliavin derivative, we require
where the inner product is that on L^2[0,\infty) viz
The existence of this adjoint follows from the Riesz representation theorem for linear operators on Hilbert spaces.
It can be shown that if u is adapted then
where the integral is to be understood in the Ito sense.   Thus this provides a method of extending the Ito integral to non adapted integrands.

# Arithmetic Asian options
There is no known density function for Asian options and so Malliavin calculus techniques can be used to determine formula that can be used to evaluate the greeks for this option. We give the mathematical formulation for the delta of an arithemtic Asian option.
An arithmetic Asian option's payoff is a function of the arithmetic average of the stock price \overline{S}_T=\frac{1}{T}\int_0^T S_t\, dt. Hence
the payoff can be expressed as
f\left(\overline{S}_T\right)=f\left(\frac{1}{T}\int_0^T S_t\,dt \right), where f is the payoff function. The time is expressed as a fraction of 250, as this this the number of business days in a year. That is T= \frac{i}{250} for i\in\mathbb{N}.
For instance, an Asian call option with strike price K, is a derivative security with payoff
f(\overline{S}_T)=\left( \frac{1}{T}\int_0^T S_t\,dt-K\right)^+.
There is no closed formula for the probability density function of \overline{S}_T=\displaystyle{{\left(\frac{1}{T}\int_0^T S_t\,dt\right)}}, so there is no explicit formula for the price and thus there is no explicit formula for the greeks since the greeks are derivatives of the price of the option. 
The price of an option at time 0 is given by
V_0=e^{-rT}\mathbb{E}_\mathbb{Q}\left(f\left( \frac{1}{T}\int_0^T S_t\,dt\right)\right)=e^{-rT}\mathbb{E}_\mathbb{Q}\left(f(\overline{S}_T)\right).
The delta therefore becomes
The partial derivative of \overline{S}_T with respect to {S_0} is
=\frac{1}{T}\frac{\partial}{\partial S_0}\int_0^T S_t\,dt
=\frac{1}{T}\int_0^T \frac{\partial}{\partial S_0}S_t\,dt
by Leibniz rule.  And since S_t=S_0\exp\left((r-\frac{1}{2}\sigma^2)t+\sigma W_t\right),
 \frac{\partial}{\partial S_0}S_t=\exp\left(\left(r-\frac{1}{2}\sigma^2\right)t+\sigma W_t\right)=\frac{S_t}{S_0}.Thus
\frac{\partial \overline{S}_T}{\partial S_0}=\frac{1}{TS_0}\int_0^T S_t\,dt=\frac{1}{S_0}\overline{S}_T.
But
From this, we then have that
\Delta=\frac{e^{-rT}}{S_0}\mathbb{E}_\mathbb{Q}\left(f(\overline{S}_T)\mathcal{K}\left(\overline{S}_T,\overline{S}_T\right)\right)
where
We first find the Malliavin derivative of \overline{S}_T. This evaluates to
D_t \overline{S}_T=D_t \frac{1}{T}\int_0^T S_r\,dr=\frac{1}{T}\int_0^TD_t S_r\,dr=\frac{\sigma}{T}\int_t^T S_r\,dr,
using the fact that D_t S_r=\sigma S_r and the fact that
(D_tF_s)(\omega)=0 for all \omega\in\Omega if F_s, for s\in, is adapted to the natural filtration generated by the Brownian motion, and t>s. The integral is non-zero for r\in(t,T] and this is reflected in the limits of the integral.
For the Skorohod integral \delta\left(\overline{S}_Th_t(D_\gamma \overline{S}_T)^{-1}\right), we use h_t=S_t for t\in , in D_\gamma \overline{S}_T= \frac{1}{T}\int_0^T(D_t\overline{S}_T)S_t\,dt and we see that
We need to evaluate
the integral \int_0^T\left(\frac{\sigma}{T}\int_t^T S_r\,dr\right)S_t\,dt=\frac{\sigma}{T}\int_0^T\left(\int_t^T S_r\,dr\right)S_t\,dt
in the denominator of the Skorohod integral.
We see that if
\tau=\int_t^T S_r\,dr,
then
d\tau=-S_t\,dt by the Leibniz rule.
Using these substitutions we get that
Hence
=-(0-\frac{1}{2}\left(\int_0^T S_r\,dr\right)^2
=\frac{1}{2}\left(\int_0^T S_r\,dr\right)^2.
From this we get that
\delta\left(\frac{\left( \frac{1}{T}\int_0^T S_t\,dt\right)S_t}{\int_0^T\left(\frac{\sigma}{T}\int_t^T S_r\,dr\right)S_t\,dt} \right)=\delta\left(\frac{\left( \frac{1}{T}\int_0^T S_t\,dt\right)S_t}{\frac{\sigma}{2T}{\left(\int_0^T S_t\,dt\right)^2}} \right)
=\frac{2}{\sigma}\delta\left(\frac{S_t}{\int_0^T S_t\,dt} \right).
Next we need to evaluate
\delta\left(\frac{S_t}{\int_0^T S_t\,dt} \right). For this we use the integration by parts formula:
Let F\in \mathbb{D}_{1,2}(\times \Omega)  and H\in L^2(\times \Omega). Then
\int_0^TFH\,\delta W_t=F\int_0^T H_t\,\delta W_t-\int_0^T(D_tF)H_t\,dt
for all (t,\omega)\in \times \Omega.
We set
F=\frac{1}{\int_0^T S_t\,dt} and H=S_t. Now we see that
since the stock price process S_t is adapted to the filtration generated by the Brownian motion,  \int_0^T S_t\,\delta W_t=\int_0^T S_t\,dW_t
Next, to evaluate
D_t\frac{1}{\int_0^T S_t\,dt},
we use the chain rule with f(x)=\frac{1}{x}.
Hence
After this we evaluate D_t\int_0^TS_t\,dt. We find this to be
Thus
\delta\left(\frac{S_t}{\int_0^T S_t\,dt} \right)=\frac{\int_0^TS_t\,dW_t}{\int_0^T S_t\,dt}+\frac{\int_0^TS_t\left(\int_t^T\sigma S_r\right)\,dt}{\left(\int_0^TS_t\,dt\right)^2}
=\frac{\int_0^TS_t\,dW_t}{\int_0^TS_t\,dt}+\frac{\sigma}{2}\frac{\left(\int_0^TS_t\,dt\right)^2}{\left(\int_0^TS_t\,dt\right)^2}
\frac{\int_0^TS_t\,dW_t}{\int_0^T S_t\,dt}+\frac{\sigma}{2}.
Finally we get that
\frac{2}{\sigma}\delta\left(\frac{S_t}{\int_0^T S_t\,dt} \right)= \frac{2}{\sigma}\frac{\int_0^T S_t\,dW_t}{\int_0^T S_t\,dt}+1.
We can evaluate this expression more. The Ito integral
\int_0^T S_t\,dW_t
can be  worked out by applying the Ito formula on \dfrac{S_t}{\sigma}. Thus
d\left(\frac{S_t}{\sigma}\right)=\frac{1}{\sigma}\left(rS_t\,dt +\sigma S_tdW_t\right).
In integral form,
\frac{S_T}{\sigma}-\frac{S_0}{\sigma}=\frac{r}{\sigma}\int_0^T S_t\,dt +\int_0^TS_t\,dW_t.
Hence
\int_0^TS_t\,dW_t=\frac{S_T}{\sigma}-\frac{S_0}{\sigma}-\frac{r}{\sigma}\int_0^T S_t\,dt
=\frac{1}{\sigma}\left(S_T-S_0-r\int_0^TS_t\,dt\right).
And so,
\frac{2}{\sigma}\frac{\int_0^T S_t\,dW_t}{\int_0^T S_t\,dt}=\frac{2}{\sigma}\frac{\frac{1}{\sigma}\left(S_T-S_0-r\int_0^TS_t\,dt\right)}{\int_0^T S_t\,dt}
=\frac{2(S_T-S_0)}{\sigma^2\int_0^TS_t\,dt}-\frac{2r}{\sigma^2}.
Putting all of this together, we have that
\frac{2}{\sigma}\frac{\int_0^T S_t\,dW_t}{\int_0^T S_t\,dt}+1
=\frac{2(S_T-S_0)}{\sigma^2\int_0^TS_t\,dt}-\frac{2r}{\sigma^2}+1=\frac{2}{\sigma^2}\left( \frac{S_T-S_0}{\int_0^TS_t\,dt}-m\right)
\frac{2}{\sigma^2}\left( \frac{S_T-S_0}{T\left(\frac{1}{T}\int_0^TS_t\,dt\right)}-m\right)
\frac{2}{\sigma^2}\left( \frac{S_T-S_0}{T\overline{S}_T}-m\right)
where m=r-\frac{\sigma^2}{2}.
Finally the delta is
\Delta=\frac{2e^{-rT}}{S_0\sigma^2}\mathbb{E}_\mathbb{Q}\left(f(\overline{S}_T)\left(\frac{S_T-S_0}{T\overline{S}_T}-m\right)\right).