The Ito's formula stated in most books in stochastic calculus is in the form $F(t,X\_t)$, where $F: \mathbb{R}^{d+1} \rightarrow \mathbb{R}$ is a $d+1-$dimensional deterministic $C^{1,2}$ function and $(X\_t)\_{t \geq0}$ is a $d-$ dimensional predictable process.


I am wondering whether the function can be random, e.g. for any stopping time $\tau$, can we apply Ito's formula to the process
$$ \{ F(t,X\_t) \, \mathbf{1}\_{ \{ \tau \leq t \} } \}\_{t \geq 0} \quad \quad ?$$


Also, when I apply Ito's lemma, what is the expression for $dY\_t$, where $Y\_t = \mathbf{1}\_{ \{ \tau \leq t \} }$. There is a jump for each sample path which is not differentiable. 



Version of Ito's lemma applied to a stochastic function
In short, **yes**, however the answer depends on which class of functions you wish to endow the Ito formula upon. 


We must not forget that the Ito formula is just (a stochastic version of) the chain rule, the chain rule naturally arises from how the integral itself is defined. The question you really want to ask is, of the function space, say $\mathbf{D}$, that you wish to endow the Ito formula upon, how is the integral of integrands $f \in \mathbf{D}$ defined with respect to local martingales? That is, how is $\int f \, dM$ defined, where $M$ is a local martingale?


The function $F(t,X\_t)$ is a random function - it is a function of a stochastic process. Recall that a stochastic process is actually a random function itself, therefore what you really have is a composition of random functions. I do not quite understand what you mean by the use of 'deterministic'?


Ito's formula can be easily extended to **convex functions**. (Actually, you will find that a lot of convex analysis deals with generalising differentiation; in an operator sense and in a space sense)


Ito's formula can be extended to **Poisson type integrals** and to **Levy type integrals**. The function spaces of these integrands allow for sharp discontinuities. Is this what you are talking about when you mention functions that are not deterministic?


