MLE estimation with serially correlated errors I want to estimate the parameters of $a_t = a_{t-1}+\theta+\epsilon_t$ using MLE. Assume errors $\epsilon_t$ are serially correlated, then how would I choose the likelihood function?
This is model is known an GARCH(general autoregressive conditional heteroskedasticity) where the AR component of the observable series $\{a_t\}$ is equal to unity. 

The likelihood is determined by your model assumptions on the innovation terms $\varepsilon_t$ and $e_t$.

If you are looking for a canned function to estimate an GARCH see https://www.kevinsheppard.com/MFE_Toolbox. If you are looking for some more theory on how to form the likelihood see http://www.math.elte.hu/probability/markus/AlkmatTS1/ARCH_GARCH_Eload.html.