# Stochastic differential of a time integral

Suppose that $$S$$ follows a geometric brownian motion: $$dS(u) = r S(u)du + S(u)\sigma(u,S(u))dW(u) ,$$ with $$r$$ a deterministic constant, and let the process $$Z$$ be defined by: $$Z(t) = \int_0^t g(u, S(u))du,$$ where $$g$$ is a deterministic function. I would like to find the stochastic process followed by $$Z$$.

Following the idea shown here, I compute: $$S(t) = S(0) + \int_0^t \alpha(u,S(u))S(u)du + \int_0^t \sigma(u,S(u))S(u)dW(u),$$ and for $$Z$$: $$Z(t) = \int_0^t g(u, S(0)+ \int_0^u \alpha(v,S(v))S(v)dv + \int_0^u\sigma(v,S(v))S(v)dW(v))du,$$ where all the integrals are deterministic, except $$\int_0^u \sigma(v,S(v))S(v)dW(v)$$ which is an Ito integral. At this point, I am not sure on how to differentiate appropriately the equation above in order to get the stochastic process for $$Z$$.

Naively, I would just take advantage of Ito's lemma to write: $$dZ(t) = \left(g(t, S(t)) + \int_0^t g_S(u,S(u))du\cdot \alpha(t,S(t))S(t) + \frac12 \int_0^t g_{SS}(u,S(u))du \cdot\sigma^2(t,S(t))S(t)^2 \right)dt + \int_0^t g_S(u,S(u))du \cdot\sigma(t,S(t))S(t)dW(t),$$ but this does not seem to lead to the correct answer.

What is the satisfactory way of formalising the stochastic process for $$Z$$?

• I do not think you applied Ito correctly. It should be $dZ_t = g(t, S(t))dt$. – Gordon Sep 13 '19 at 15:31
• @Gordon Is it because $Z(t)$ does not depend explicitly on $S(t)$, but only on $t$? – J. D. Sep 13 '19 at 16:17
• You can only take derivative with respect to $t$. Your integrand does not involve $t$, then you can not take derivative within the integral. – Gordon Sep 13 '19 at 17:35