the APF. Alternative algorithms for estimating this information are also available [@DelMoralDoucetSingh2010; @PoyiadjisDoucetSingh2011].

The gradient of the parameter log-posterior is given by $$\begin{aligned}
    \mathsf{S}_T(\theta) = \Dtheta \log p(\theta) + \Dtheta \log p_{\theta}(\mathbf{y}),
    \label{eq:deffirst order}\end{aligned}$$ where it is assumed that the gradient of the log-prior $\Dtheta \log p(\theta)$ can be calculated explicitly. The gradient of the log-likelihood $\Dtheta \log p_{\theta}(\mathbf{y})$ can, using *Fisher’s identity* [@CappeMoulinesRyden2005], be expressed as $$\begin{aligned}
    \Dtheta \log p_{\theta}(\mathbf{y}) 
    &= 
    %\dint 
    %\Dtheta \log p(\mathbf{x},\mathbf{y}) 
    %p(\mathbf{x}|\mathbf{y}) 
    %\dd \mathbf{x} \nonumber
    %\\
    %&= 
    \mathbb{E}_{\theta} \left[ \Dtheta \log p_{\theta}(\mathbf{x},\mathbf{y}) \Big| \mathbf{y} \right],
    \label{eq:FishersIdentity}  \end{aligned}$$ where for an SSM we can write the gradient of the complete data log-likelihood as $$\begin{aligned}
    \Dtheta \log p_{\theta}(\mathbf{x},\mathbf{y})
    &=
    \sum_{t=1}^T
    \xi_{\theta}(x_t,x_{t-1}), \text{ where}
    \label{eq:jointdistSSM} \\
    \xi_{\theta}(x_t,x_{t-1}) &= 
    \Dtheta \log f_{\theta}(x_t|x_{t-1}) + \Dtheta \log g_{\theta}(y_t|x_{t}). \nonumber\end{aligned}$$ Combining with Fisher’s identity yields $$\begin{aligned}
\Dtheta \log p_{\theta}(\mathbf{y}) 
&=
\sum_{t=1}^{T} \dint
\xi_{\theta}(x_{t}, x_{t-1})
p_{\theta}(x_{t-1:t}|\mathbf{y}) \dd x_{t-1:t},\end{aligned}$$ which depends on the (intractable) two-step smoothing distribution $p_{\theta}(x_{t-1:t}|\mathbf{y})$. To approximate this quantity we use the FL smoother which relies on the assumption that there is a decaying influence of future observations $y_{t+\Delta:T}$ on the state $x_t$. This means that $$\begin{aligned}
p_{\theta}(x_{t-1:t}|\mathbf{y}) \approx p_{\theta}(x_{t-1:t}|y_{1:\kappa_t}),\end{aligned}$$ holds for some large enough $\kappa_t=\min\{t+\Delta,T\}$. Here, $\Delta$ denotes a pre-determined 