# Why aren't the sample paths of this stochastic process defined?

I read this in a course but I don't understand why.

"As the stochastic integral of an integrand $$\xi \in L^1(X)$$ with respect to a semimartingale $$X$$ exists up to all times $$t\ge 0$$, it defines a new stochastic process $$Y(t)\equiv\int_0^t\xi\,dX$$. However, the integral takes values in the space $$L^0$$ of random variables defined up to almost sure equivalence, which is not enough for the samples paths $$t\mapsto Y(t)$$ to be defined (even on a set of probability one)."

They say if we take a cadlag version of $$Y$$, then the sample paths are defined.

Can you give an explicit example or a proof to help me understand why the sample paths aren't defined ? And why taking a cadlag version is enough for the sample paths to be defined ?

What the quoted passage means is the following (let's assume, for simplicity, $$t\in[0,1]$$): We have defined the "stochastic integral of $$\xi$$ with respect to $$X$$ up to time $$t$$," denote it by $$H_t$$, for each $$t\in[0,1]$$. So by saying "$$Y_t=H_t$$ a.s. for each $$t$$," we can define a process $$Y$$, which may be called the stochastic integral of $$\xi$$ with respect to $$X$$. (Note the "a.s." in the definition of $$Y$$. Random variables are defined up to null sets, i.e., as long as they have the same values on a set of probability one, we consider two random variables "equal.")
Now what's the problem? Let $$A_t\subset\Omega$$ be the event on which $$Y_t$$ is left undefined. Surely $$P(A_t)=0$$ for each $$t$$. But what about $$P(\cup_{0\le t\le 1}A_t)$$? Since $$[0,1]$$ is an uncountable set, we do not know whether $$\cup_{0\le t\le 1}A_t$$ stays null (a countable union of null sets, on the other hand, stays null). And if $$\cup_{0\le t\le 1}A_t$$ ends up having a positive probability, then it means that with positive probability, the path of $$Y$$ is undefined (for $$\omega\in\cup_{0\le t\le 1}A_t$$, there exist points in time $$\{t_1,\ldots,t_n\}$$ such that $$Y_{t_i}$$ are undefined). In fact, as the quoted passage points out, $$\cup_{0\le t\le 1}A_t$$ can even be of probability one.
For an example, suppose we define a process $$Y$$ by "$$Y_t=1$$ a.s. for all $$t\in[0,1]$$." In fact, we'll do the following. Let $$\Omega=[0,1]$$ and $$P=\text{Lebesgue measure on }[0,1]$$. Let $$Y(t,\omega)=1$$ if $$t\ne \omega$$ and $$Y(t,\omega)=\text{undefined}$$ if $$t=\omega$$. Then for each $$t$$, $$Y_t=1$$ a.s. But for each $$\omega\in\Omega$$, there exists one point in time ($$t=\omega$$) for which $$Y_t$$ is undefined, i.e., the path of $$Y$$ is undefined. Note also that if our time index set were countable, say, rational numbers in $$[0,1]$$, then we'd be able to find a set $$\Omega'\subset\Omega$$ with $$P(\Omega')=1$$ on which the path of $$Y$$ is well defined (take $$\Omega'=\text{irrational numbers in }[0,1]$$).
It may seem that this "problem" can easily be fixed by letting $$Y(t,\omega)=1$$ for $$t=\omega$$ or whatever value one prefers. That's true, so the remark in the quoted passage is really about removing ambiguity in the definition of a stochastic integral as a process. Since any definition of $$Y$$ is legitimate (for someone who disregards the remark) as long as one has "$$Y_t=1$$ a.s. for all $$t$$," one person may assign $$Y(t,\omega)=1$$ for $$t=\omega$$ and another $$Y(t,\omega)=0$$. Then, with probability one, the two people will disagree about the path of $$Y$$, which is not pretty.
So long story short, we want the definition of a stochastic integral to be such that its path is unambiguously defined with probability one (or such that the process is unique in the sense of indistinguishability). This can certainly be achieved if we can find a right continuous process $$Z$$ such that $$Z_t=H_t$$ a.s. for all $$t$$ and define it to be the stochastic integral (back to the original example), because then if another person were to come up with another right continuous process $$W$$ with the same property, the paths of $$Z$$ and $$W$$ must be identical with probability one due to their one-sided continuity, i.e., indistinguishable. This is why the last step in the construction of a stochastic integral is to show there exists such a process---and call it the stochastic integral.