# Martingale of random walk and stopping time

Let $$\{S_n\}$$ be a symmetric random walk such that $$S_0 = a$$ for some $$0 < a < K$$. Let $$T$$ be the stopping time when the walk reaches $$0$$ or $$K$$. Show $$M_n = \sum_{i = 0}^n S_i - \frac{1}{3}S^3_n$$ is a martingale and deduce that $$\mathbb{E}\bigg[ \sum_{i = 0}^T S_i \bigg] = \frac{1}{3}(K^2-a^2)a + a$$.

So far I have tried showing it is both a submartingale and supermartingale and also have tried $$\mathbb{E}[M_{n+1} - M_n \mid X_0,...,X_n] = 0$$ approach. I think the error is in my computing so $$S^3_n$$ but I am not getting that it is a martingale. The second part just seems to be that I need to apply the martingale convergence theorem/optional stopping time.

I got that $$S_n^3 = \sum_{i=0}^n X_i^3 + 6\bigg(\sum_{i < j}X_i^2X_j + \sum_{i < j} X_iX_j^2 + \sum_{i < j < k}X_iX_jX_k \bigg)$$.

Also I know that $$\{S_n\}$$ by itself is a martingale since $$p = \frac{1}{2}$$. So now \begin{align*} M_{n+1} - M_n &= X_{n+1} + \frac{1}{3}(S_{n+1}^3 - S_n^3) \\ &= X_{n+1} + \frac{1}{3}\bigg(X_{n+1}\sum_{i = 0}^nX_i + X_{n+1}^2\sum_{i = 0}^nX_i + X_{n+1}\bigg[\sum_{i = 0}^n X_i \bigg( \sum_{j=i+1}^n X_j\bigg)\bigg]\bigg) \end{align*} .

Which seems quite incorrect.

Clearly,

$$S_{n+1}^3 = (S_n+X_{n+1})^3 = S_{n}^3 +3 S_n X_{n+1}^2 + 3S_n^2 X_{n+1}+X_{n+1}^3$$

which implies ("take out what is known"/"pull out")

$$\mathbb{E}(S_{n+1}^3 \mid \mathcal{F}_n) = S_n^3+3 S_n \underbrace{\mathbb{E}(X_{n+1}^2 \mid \mathcal{F}_n)}_{=\mathbb{E}(X_{n+1}^2)=1} + 3 S_n^2 \underbrace{\mathbb{E}(X_{n+1} \mid \mathcal{F}_n)}_{=\mathbb{E}(X_{n+1})=0} + \underbrace{\mathbb{E}(X_{n+1}^3 \mid \mathcal{F}_n)}_{=\mathbb{E}(X_{n+1}^3)=0}$$

i.e.

$$\mathbb{E}(S_{n+1}^3 \mid \mathcal{F}_n) = S_n^3 + 3 S_n.$$ Using this equation, you shouldn't have much trouble to verify the martingale property of $$(M_n)_{n \in \mathbb{N}}$$.

• I definitely did some calculating wrong. For the second part am I correct that this is an application of optional stopping theorem? It's not quite set up for $\mathbb{E}[M_0] = \mathbb{E}[M_T]$ But it is $\mathbb{E}[M_T + \frac{1}{3}S^3_T]$. but here $\mathbb{E}[M_0] = a - a^3/3$. – all.over Dec 6 '18 at 21:53
• Sorry made edits to the comment above, hit add before I was done. – all.over Dec 6 '18 at 21:58
• @all.over Well you will need to compute $E (S_T^3)$... to this end use $E (S_T)=0$ to find $P (S_T=0)$ and $P (S_T=K)$ – saz Dec 6 '18 at 22:34
• It won't let my at people for some reason. Anyway, isn't $E(S_T) = E(S_0) = a$ by the martingale property? – all.over Dec 6 '18 at 22:48
• @all.over Yeah, sorry, that was a typo. – saz Dec 6 '18 at 23:12