## 2 Materials and Methods
### Model with a Non-Gaussian Linear Scalar Filters (nGLSF)  
We consider a family of mortality model with a continuous non-Gaussian scalar linear filter described by  
\[\mu_{x}(t,l)=\mu_{x0}^{l}\exp\{\alpha_{x}^{l}t+\sum_{i=1}^{3}q_{x_{i}}^{l}y^{i} (t,l)\}, \tag{45}\]  
\[dy(t,l)=-\beta_{x_{1}}^{l}y(t,l)dt+\gamma_{x_{1}}^{l}dW(t). \tag{46}\]  
Introducing new variables: \(y_{1}(t,l)=y(t,l),\quad y_{2}(t,l)=y^{2}(t,l),\quad y_{3}(t,l)=y^{3}(t,l)\) and applying the Ito formula, we obtain  
\[dy_{2}(t,l)=[-2\beta_{x_{1}}^{l}y_{2}(t,l)+(\gamma_{x_{1}}^{l})^{2}]dt+2\gamma _{x_{1}}^{l}y_{1}(t,l)dW(t), \tag{47}\]  
\[dy_{3}(t,l)=[-3\beta_{x_{1}}^{l}y_{3}(t,l)+3(\gamma_{x_{1}}^{l})^{2}y_{1}(t,l )]dt+3\gamma_{x_{1}}^{l}y_{2}(t,l)dW(t), \tag{48}\]  
where \(\mu_{x}(t,l)\) is a stochastic process representing a mortality rate for a person aged \(x\) at time \(t\), \(a_{x}^{l}\), \(\beta_{x_{1}}^{l}\), \(q_{1}^{l}\), \(q_{2}^{l}\), \(q_{3}^{l}\), \(\mu_{x0}^{l}\), \(\gamma_{x_{1}}^{l}\) are constant parameters, \(l\in\mathbb{S}\); \(W(t)\) is a standard Wiener process. Taking natural logarithm of both sides of Equation (45) and applying the Ito formula, we find  
\[d\ln\mu_{x}(t,l) =\Big{[}\alpha_{x}^{l}-(\beta_{x_{1}}^{l}q_{1}^{l}-3(\gamma_{x_{ 2}}^{l})^{2})y_{1}(t,l) \tag{49}\] \[-(2\beta_{x_{1}}^{l}q_{1}^{l}-6(\gamma_{x_{2}}^{l})^{2})y_{2}(t,l )-(\gamma_{x_{2}}^{l})^{2}-3\beta_{x_{1}}^{l}q_{3}^{l}y_{3}(t,l)\Big{]}dt\] \[+\Big{[}\gamma_{x_{1}}^{l}q_{1}^{l}+2\gamma_{x_{1}}^{l}q_{2}^{l} y_{2}(t,l)+3\gamma_{x_{1}}^{l}q_{3}^{l}y_{3}(t,l)\Big{]}dW(t).\]Introducing a new vector state  
\[ \begin{split}\mathbf{z}_{x}(t,I)&=[z_{x_{1}}(t,l),z_{x_ {2}}(t,l),z_{x_{3}}(t,l),z_{x_{4}}(t,l)]^{T}\\ &=[\ln\mu_{x}(t,l),y_{1}(t,l),y_{2}(t,l),y_{3}(t,l)]^{T},\end{split}  \tag{50}\]  
Equations (46)-(49) can be rewritten in a vector form  
\[ \begin{split} d\mathbf{z}_{x}(t,l)&=\left[\begin{array}{ ccc}0&-\beta_{x_{1}}^{l}\dot{q}_{1}^{l}+3(\gamma_{x_{1}}^{l})^{2}&-2\beta_{x_{1}}^{l} \dot{q}_{2}^{l}+6(\gamma_{x_{1}}^{l})^{2}&-3\beta_{x_{1}}^{l}\dot{q}_{3}^{l} \\ 0&-\beta_{x_{1}}^{l}&0&0\\ 0&0&-2\beta_{x_{1}}^{l}&0\\ 0&3(\gamma_{x_{1}}^{l})^{2}&0&-3\beta_{x_{1}}^{l}\end{array}\right]\\ &+\left[\begin{array}{c}a_{x}^{l}+q_{2}^{l}(\gamma_{x_{1}}^{l})^{2}\\ 0\\ (\gamma_{x_{1}}^{l})^{2}\\ 0\end{array}&dt+\left[\begin{array}{c}\gamma_{x_{1}}^{l}\dot{q}_{1}^{l}+2 \gamma_{x_{1}}^{l}\dot{q}_{2}^{l}y_{1}(t,l)+3\gamma_{x_{1}}^{l}\dot{q}_{3}^{l} y_{2}(t,l)\\ \gamma_{x_{1}}^{l}\\ 2\gamma_{x_{1}}^{l}y_{1}(t,l)\\ 3\gamma_{x_{1}}^{l}y_{2}(t,l)\end{array}\right]dW(t),\end{split}  \tag{51}\]  
and \(\mathbf{z}_{x}(0,l)=[\ln\mu_{0}^{l},0,0,0]^{T}\). The unknown parameters are: \(\ln\mu_{0}^{l},a_{x}^{l},\beta_{x_{1}}^{l},\gamma_{x_{1}}^{l},q_{i}^{l}\). Similar to Section 2.2, using the method of the moment equations (see, e.g., Appendix B.1), we find the nonstationary solutions of the first and second moment of the process \(z_{x_{1}}(t,l)\) (see, e.g., Appendix B.2)  
\[E[z_{x_{1}}(t,l)]=\alpha_{x}^{l}t+\alpha_{0,x}^{l}, \tag{52}\]  
\[E[z_{x_{1}}^{2}(t,l)]=(\alpha_{x}^{l})^{2}t^{2}+2\alpha_{x}^{l}\alpha_{0,x}^{ l}t-2\alpha_{x}^{l}\frac{(\gamma_{x_{1}}^{l})^{2}}{2\beta_{x_{1}}^{l}}t+c_{0,x}^{l} \tag{53}\]  
where \(\alpha_{0,\text{ }}^{l}\) and \(c_{0,x}^{l}\) are constants of integration. To obtain the differential equations for first- and second-order moments with Markov switchings, we differentiate Equations (52) and (53) and denote in the forms (22)-(24) for first-order moments and (31)-(39) for second-order moments. In the case of first-order moments with Markov switchings, we obtain exactly the same equations and solutions as in the previous chapter. In the case of second-order moments with Markov switchings, we find  
\[\frac{d}{dt}\dot{p}(t)=A\phi(t)+\psi(t),\ \ \ \phi(0)=\phi_{0} \tag{54}\]  
where  
\[\phi_{1}(t)=E[z_{1}^{2}(t,1)],\ \ \phi_{2}(t)=E[z_{1}^{2}(t,2)], \tag{55}\]  
\[\phi(t)=\left[ \begin{array}{c}\phi_{1}(t)\\ \phi_{2}(t)\end{array} \right],\ \ A=\left[ \begin{array}{cc}-\rho_{1}&\rho_{1}\\ \rho_{2}&-\rho_{2}\end{array}