# Proving martingale property

I have problem in proving a martingale property. Assume a random variable $\tau$ with a exponential distribution with parameter $\lambda$.

Then define $Y_t = 1_{\{\tau \leq t \}}$. We then can prove $E Y_t=1 - e^{-\lambda t}$, the distributional property of $\tau$. We then define $M_t := Y_t - (1-e^{-\lambda t})$, so that $E M_t=0$ for all $t \geq 0$.

Now the problem is in proving that the process $M$ is a martingale with respect to the natural filtration $\mathbb{F}$ of $Y$, denoted $(\mathcal{F}^Y_t)_{t \geq 0 }$.

I've started with the expression $$E[M_t-M_s|\mathcal{F}^Y_s]$$ with the objective to prove that it is equal to zero. By definition of $M$ we can rewrite this to $$E[ Y_t-Y_s+e^{-\lambda t}-e^{-\lambda s}|\mathcal{F}^Y_s].$$

Since the exponential terms are deterministic the objective is now equivalent to proving that $$E[ Y_t-Y_s|\mathcal{F}^Y_s]=-e^{-\lambda t}+e^{-\lambda s}.$$

By properties of the indicator we reduce this to $$P[s<\tau\leq t|\mathcal{F}^Y_s]=-e^{-\lambda t}+e^{-\lambda s}.$$

Here is where I'm (maybe too late) uncertain of my approach. Since $\tau$ is fixed for a given $\omega$ (we view all random variables as measurable functions off a probability space), in the conditioning we are only interested if $Y_s$ is either one or zero, since this gives us the information if $\tau$ is larger than or less than $s$.

Hence we can write $$P[s<\tau\leq t|\mathcal{F}^Y_s]=P[s<\tau\leq t|\tau \leq s] + P[s<\tau\leq t|\tau > s].$$

This should make sence, but the first term is zero and the second is equal to $-e^{-\lambda t}+e^{-\lambda s}/e^{-\lambda s}$ via standard methods of integration and using the PDF of a exponential distributed RV.

What am I doing wrong here? I know the martingale property should hold. Should I introduce in the conditioning $\tau \leq u$ and integrate over all $u$ from zero to $s$?

The compensator of $Y$ is the $(\mathcal F_s^Y)$-adapted process $t\mapsto\lambda\min(t,\tau)$, which has expected value $1-e^{-\lambda t}$. That is, $M_t:=1_{\{\tau\le t\}}-\lambda\min(t,\tau)$ is a martingale.
Added detail: The idea is that the process to subtract from $Y$ to make it a martingale (the compensator of $Y$) should be the integral from $0$ to $t$ of the "infinitesimal" conditional expectation \eqalign{\Bbb E[Y_{t+dt}-Y_t|\mathcal F_t^Y] &=\Bbb P[t<\tau\le t+dt|\mathcal F_t^Y]\cr &=1_{t<\tau}\lambda\,dt.\cr } The second equality here uses the memoryless property of the exponential distribution: $\{t<\tau\}$ is $\mathcal F_t^Y$-measurable, and on this event, $\tau-t$ is independent of $\mathcal F_t^Y$ with the exponential law of parameter $\lambda$; thus, on $\{t<\tau\}$, the conditional probability that $\tau-t$ is at most $dt$ is equal to $1-e^{-\lambda \cdot dt}=\lambda\cdot dt$ (neglecting smaller order terms). Thus, the compensator of $Y$ ought to be $$\int_0^t 1_{\{s<\tau\}}\lambda\,ds=\int_0^{t\wedge\tau}\lambda\,ds=\lambda\min(t,\tau).$$ and so $M_t:=Y_t-\lambda\min(t,\tau)$ ought to be a martingale. It's pretty straightforward at this point to use the memorylessness of the exponential random variable $\tau$ to check that $M$ is indeed an $(\mathcal F_t^Y)$ martingale.