Let $(X_n)$ be a sequence of independent, identically distributed random variables with finite moment-generating function $M(t) = \mathbb{E}\left[\exp(tX_1\right)] < \infty$ for $t \in \mathbb{R}$. Let $S_n = \sum_{i=1}^n X_i$ and $Y_n = \frac{1}{(M(t))^n}\exp(tS_n)$ for $n \geq 0$ and $t \in \mathbb{R}$.
In post Sequence of martingales it was proven that $(Y_n)_{n \geq 0}$ is a martingal. How could one show now that differentiating $Y_n$ at $t=0$ one would still obtain martingals?
What I've tried so far:
$\frac{dX_n}{dt} = -n \frac{\frac{dM(t)}{dt}}{M(t)^{n+1}}e^{tS_n} + \frac{1}{M(t)^{n}}S_ne^{tS_n}$. Taking $t=0$ in the above equation I got $\frac{dX_n}{dt}|_{t=0} = S_n - n$. Or am I missing something?
Thanks