Prove that a martingale bounded in $L_2$ converges almost surely Hi as the topic states
prove that a martingale bounded in $L_2$ converges almost surely.

Alright, let's do this. We have a martingale $\{X_n\}_{n=0}^{\infty}$ relative the filtration $\{\mathcal{F}_n\}$, and we are assuming it is $L^2$ bounded, i.e. $\sup_{n} \mathbf{E}[X_{n}^{2}] < \infty$. Let $\xi_n = X_n - X_{n-1}$ for $n\ge 1$, so we get the martingale difference sequence $\{\xi_k\}$ as well.
Lemma: For every $n\in \mathbb{N}$, $$\mathbf{E}[X_{n}^{2}] = \mathbf{E}[X_{0}^{2}] + \sum_{k=1}^{n} \mathbf{E}[\xi_{k}^{2}]$$
Proof: Note that $$ X_{n}^{2} = (X_0 + \xi_1 + \cdots \xi_n)^2 = X_{0}^2 + \sum_{k=1}^{n} {\xi_k}^2 + 2 \sum_{1\le j < k \le n} \xi_j \xi_k \tag{1}$$
For any $1\le j \le k$, $$\mathbf{E}[\xi_j \xi_k] = \mathbf{E}[\mathbf{E}[\xi_j \xi_k \, \vert \, \mathcal{F}_{j-1}]] = \mathbf{E}[\xi_k\mathbf{E}[\xi_j \, \vert \, \mathcal{F}_{j-1}]] = \mathbf{E}[\xi_j \cdot 0] = 0$$ where we used that $\xi_k$ is independent of $\mathcal{F}_{j-1}$ to pull it out of the conditional expectation. Thus, taking expectations on both sides of $(1)$ gives the result. 
Since $\sup_{n} \mathbf{E}[X_{n}^{2}] < \infty$, the lemma gives that $\sum_{k=1}^{\infty} \mathbf{E}[\xi_{k}^2]$ converges. The martingale differences $\xi_k$ are $L^2$-orthogonal, so for any $m,n$ it follows $$\mathbf{E}[(X_{m+n} - X_n)^2] = \sum_{k=n+1}^{n+m} \mathbf{E}[\xi_{k}^2]$$ As $m$, $n \to \infty$, the right hand side of this equation goes to zero, so the sequence $\{X_n\}$ is Cauchy in $L^2$. By completeness of $L^2$, the sequence therefore converges to some $X \in L^2$.
Now, we have got to show $X_n \to X$ almost surely. To do this, it will suffice to show the sequence $\{X_n\}$ is almost surely Cauchy. For any fixed $m\in \mathbb{N}$, the sequence $\{X_{n+m} - X_m \}_{n=0}^{\infty}$ is easily checked to be a martingale. So we may apply the maximal inequality. Let $n_k$ such that $\sum_{n=n_k}^{\infty} \mathbf{E}[\xi_{n}^2] < 8^{-k}$, and now the maximal inequality gives: $$P(\sup_{n\ge n_k} |X_n - X_{n_k}| \ge 2^{-k}) \le \frac{\sum_{n\ge n_k} \mathbf{E}[\xi_{n}^2]}{4^{-k}} < 2^{-k}$$ By Borel-Cantelli Lemma, it follows only finitely many of the events $\{\sup_{n\ge n_k} |X_n - X_{n_k}| \ge 2^{-k}\}_{k=1}^{\infty}$ occur. Thus, with probability 1, for all sufficiently large $k$, $$\sup_{n\ge n_k} |X_n - X_{n_k}| < 2^{-k}$$ We conclude $\{X_n\}$ is Cauchy almost surely, and thus $X_n \to X$ almost surely.
