Solution (source code)

= Solution

Only overlapping innovations contribute to the <autocovariance function> of the <moving-average process>. Set $c_0=1,c_1=\theta_1,c_2=\theta_2$. The overlap formula is $\gamma_k=\sigma^2\sum_jc_jc_{j+|k|}$, with coefficients outside $0,1,2$ set to zero. Thus
$$
\boxed{\gamma_k=\begin{cases}
\sigma^2(1+\theta_1^2+\theta_2^2),&k=0,\\
\sigma^2\theta_1(1+\theta_2),&|k|=1,\\
\sigma^2\theta_2,&|k|=2,\\
0,&|k|>2.
\end{cases}}
$$
The <time-series spectral density> is the Fourier sum of this finite <covariance> sequence:
$$
\boxed{f(\lambda)=\frac{\sigma^2}{2\pi}\left[1+\theta_1^2+\theta_2^2+
2\theta_1(1+\theta_2)\cos\lambda+2\theta_2\cos2\lambda\right].}
$$
It also equals $\sigma^2|1+\theta_1e^{-i\lambda}+\theta_2e^{-2i\lambda}|^2/(2\pi)$, which directly verifies nonnegativity. Integrating from $-\pi$ gives the requested <time-series spectral distribution>:
$$
\boxed{F(\lambda)=\frac{\sigma^2}{2\pi}\left[(1+\theta_1^2+\theta_2^2)(\lambda+\pi)
+2\theta_1(1+\theta_2)\sin\lambda+\theta_2\sin2\lambda\right],\quad -\pi\le\lambda\le\pi.}
$$
Extend it by zero below $-\pi$ and by $\gamma_0$ above $\pi$. In particular its total mass is the process <variance>, not necessarily one.