Kernel-based time-varying IV estimation: handle with care

Giraitis et al. (J Econom 224(2):394–415, 2021) proposed a kernel-based time-varying coefficients IV estimator. By using entirely different code, we broadly replicate the simulation results and the empirical application on the Phillips curve, but we note that a possible oversight might have affected some of the reported results. Further, we extend the results by using a different sample and a wider choice of smoothing kernels, including data-based ones; we find that the estimator is remarkably robust across a wide range of smoothing choices, but the effect of outliers may be less obvious than expected.

representation and use the Kalman filter 1 apparatus under the Gaussianity assumption (see, e.g., Hamilton 1994, Section 13.8), but other approaches based on moments estimators (Schlicht 2021), flexible least squares (Kalaba and Tesfatsion 1989), penalized least squares (Hastie and Tibshirani 1993) and a pure nonparametric framework (Vogt 2012) have also been put forward.
In recent years, a method has been proposed that deals with time-varying parameter models in a nonparametric way, where the evolution of the parameters through time can be assumed to be "slow." 2 In a series of works by Giraitis, Kapetanios and several co-authors (Giraitis et al. 2014(Giraitis et al. , 2018Kapetanios et al. 2019), the idea is pursued to generalize the concept of rolling-window regression to kernel-based inference.
One of the advantages of the Giraitis et al. (2014) approach is that it is easily generalizable to many linear models, among which instrumental variable models. IV models with time-varying parameters can, in principle, be handled via a state-space approach, but implementation is far from trivial; for a Bayesian alternative, see Ruisi (2019). None of these approaches, however, match the computational simplicity and flexibility of the kernel-based estimator. On the other hand, in semi-and nonparametric estimation methods one usually has to choose the precise details of the practical implementation of the estimators, and while many of these choices are asymptotically equivalent, in finite samples the numerical results are often affected to quite a large degree.
In this article, we replicate and extend the results presented in Giraitis et al. (2021) (GKM from now on), using a completely independent software implementation 3 and publicly available data. Section 2 briefly describes the model and establishes notation. In Sect. 3, we perform a narrow-sense replication of the original results, while in Sect. 4, we extend the original results in several directions. We find that results are, all in all, rather robust; however, in some cases they can be markedly different across equally legitimate choices. We also find that replicating the original empirical exercise with more recent data, including the COVID-19 pandemic, shows that when large outliers are present, interpretation of the results may be far from obvious. Therefore, it is advisable for practitioners to take great care with the robustness of their results.

The model
We consider the model, for t = 1 . . . T , where y t is the dependent variable, x t is a p × 1 vector of (possibly endogenous) regressors, z t denotes a q × 1 vector of instruments, and the parameters β t and ψ t are allowed to vary over time. The coefficients are assumed to be either smoothly varying deterministic functions or smoothly varying persistent stochastic processes (see Assumptions 2 and 3 in GKM, respectively). Let 0 < r ≤ p the number of elements of x t that are deemed to be endogenous, so x t and z t have ( p − r ) elements in common. This is a slight generalization to GKM, where p = r is assumed throughout. The disturbance terms u t and ν t may be correlated, in which case endogeneity arises. We focus on two different estimators proposed in GKM: an OLS estimatorβ t and an IV estimatorβ t . For their definition, see Sect. A.1 in Appendix A.
In addition, GKM define a time-varying equivalent of the classic Hausman test, for the null hypothesis H 0 : E(u t ν t ) = 0, and a "Global Hausman Test" in which the hypothesis is tested in a given time span [T 0 , T 1 ]. For their definitions, see again Sect. A.1 in Appendix A. Under the null hypothesis, they are both distributed as χ 2 variates. GKM focus on the p = r case, the degrees of freedom of the χ 2 limiting distribution of the Hausman test is given by p, the number of explanatory variables (equation (35) in GKM). However, in the more general case that we analyze (0 < r ≤ p) the degrees of freedom equal the number of endogenous variables r (see Appendix B for a proof).
It should be noted that the p-values for the time-varying Hausman test are computed for individual (local) tests, and when one computes a test statistic at each time then one runs into a multiple testing problem requiring adjustments of critical values. In light of this, it may make sense to first compute the global Hausman test and then, in case of rejection of the global null, rejections from the time-specific Hausman statistics would point to specific time periods when violation of the null occurs. 4

Narrow-sense replication
This section summarizes the narrow-sense replication of the results in GKM. For reasons of space, most details are given in Appendices.

Simulations
In the first part of their article, GKM perform several simulation experiments on the univariate data generating process (DGP) y t = x t β t + u t to assess the quality of the time-varying OLS and IV estimators over a range of possible DGPs. For the precise details of the DGP from which data are simulated, we refer the reader to Sect. 3 in GKM.
We briefly describe the DGP and report the annotated results in Appendix C. Suffice it to say here that the simulation results can be replicated almost exactly; in fact, in some cases, our Monte Carlo results are even closer to the asymptotic figures than the original ones.

Empirical application: the Phillips curve
In this section, we replicate the empirical application reported in Sect. 4 of GKM, where a time-varying version of the Phillips curve is estimated. The following two models are considered: a "traditional," backward-looking version and a "New-Keynesian" version where a forward-looking term is added: Here, π t and u t are the first differences of inflation and unemployment, respectively. GKM do not point to a downloadable dataset, but we consider the usage of the St. Louis FED data as a reasonable reconstruction. To be specific, π t is 100 times the seasonal log difference of the CPIAUCSL variable; unemployment u t is simply a copy of the UNRATE variable. We use the sample from 1959:02 to 2013:07.
In Eq.
(2), u t is considered endogenous and the instruments are the lags of u t from 1 to 4. In Eq. (3), π t+1 is also considered endogenous and the set of instruments is augmented with four lags of π t . Figure 1 shows the replication results. For Eq.
(2), the time paths of estimated coefficients and the associated confidence bands can be replicated almost exactly. We note only very minor discrepancies near the end of the sample, which can be safely attributed to differences in the data vintage used.
On the other hand, the plot for the time-varying Hausman test appears to be rather different, with much lower p-values for the best part of the sample. We believe the discrepancy in Hausman test p-values might be due to the different number of degrees of freedom of the limiting χ 2 distribution considered by GKM. The situation where only u t is considered to be potentially endogenous marks a departure from the standard assumption in GKM ( p = r ) since the number of explanatory variables ( p = 3) does not coincide with that of endogenous ones (r = 1). To substantiate our claim, Fig. 2 compares the time path of the p-value for the Hausman test obtained using the correct number of degrees of freedom (r = 1) and the one obtained using the total number of regressors (r = p = 3). As can be seen, the time path of the p-value with 3 degrees of freedom is much closer to the one reported in GKM at the end of Section 4.
As for the "New-Keynesian" Phillips curve in Eq.
(3), we observe noticeable differences between our results and the original ones. For the three parameters in the model, we are able to almost perfectly replicate the time paths and the confidence intervals of the least squares estimatorβ t . On the contrary, the IV estimates appear to be quite different all over the sample, particularly at the beginning and the end of the time span considered. Since the differences in the OLS estimates are relatively minor, we conjecture that the IV estimator, in an over-identified case such as the present one, may be somewhat sensitive to individual data points. This conjecture is consistent with the evidence we present in Sect. 4.3, where we show the effects on the estimates of one Fig. 1 Replication, h 1 = h 2 = 0.7. Note: the two columns report estimated coefficients and the Hausman test (p-value) related to Eqs. (2) and (3), respectively. With reference to coefficients, the red line denotes the OLS point estimates, while the blue one represents the IV estimator. Dotted lines, with the same colors, represent the boundaries of the 90% confidence intervals. Shaded area denotes the region for p-value ≤ 10%. (Color figure online) extreme outlier, given by the unemployment surge of April 2020. Given these premises, it is obvious that the Hausman test results could not be replicated satisfactorily.
In order to provide the complete set of the results shown by GKM, Fig. 8 in Appendix D reports the replication of the robustness check on the "traditional" Phillips curve, where the parameters h 1 and h 2 are set to 0.5. Similarly to our previous results, the time paths of the coefficients are very similar to the reported ones, although the Hausman p-value plot is not. Fig. 2 Hausman test: comparing degrees of freedom. Note: the two panels report the Hausman test p-value related to the model in Eq. (2), assuming a limiting χ 2 -distribution with 1 (left) and 3 (right) degrees of freedom. Shaded area denotes the region for p-value ≤ 10% Finally, it is worth recalling that the whole replication exercise is based on data provided by the St. Louis FED, while it is not clear where GKM data come from. As a consequence, small differences between our results and the original ones may be due to the nature of the data.

Extended replication
In this section, we extend the empirical example proposed by GKM by investigating robustness of results with respect to two separate issues, namely (a) different choices of the kernel weighting scheme and (b) an extension of the sample used by the authors. As will be argued, both these aspects reveal interesting features of the estimator.

Kernel functions and bandwidth
In this subsection, we replicate the empirical analysis provided in Sect. 3.2 by using four different kernel functions, namely the Gaussian, Epanechnikov and exponential kernels, as well as the rectangular kernel, which is equivalent to a simple rollingwindow estimator.
In GKM, the Gaussian kernel was used, where the kernel weighting function is K (x) = exp(−x 2 /2) and x = | j − t|/T h . The exponential kernel uses the Laplace density instead: K (x) = exp(−|x|). 5 These two kernels have infinite support, so that all observations contribute to the calculation of each element of theβ t andβ t sequences. The other two, instead, have finite support: for |x| < 1, K (x) = 0.75(1 − x 2 ) for the Epanechnikov kernel and K (x) = 1 for the rectangular one; both are 0 for |x| ≥ 1. This implies that in the calculation ofβ t andβ t only "nearby" data matter (although of course with infinite-support kernels small bandwidths achieve the same effect in practice). As will be seen, the distinction between the two kinds has noticeable empirical implications. Figure 3 reports the estimated coefficients and their confidence intervals, plus the Hausman test p-value for the model in Eq. (2). As a benchmark, we consider the same bandwidth parameters used in GKM, that is h 1 = h 2 = 0.7. Using the original sample, the results appear to be qualitatively robust to the choice of kernels. Magnitude of coefficients and confidence intervals are similar across the different smoothing functions, even though estimates relying on finite-support kernels (i.e., rolling window and Epanechnikov) appear more volatile through time and display spiky confidence intervals. As for the Hausman test, results obtained with finite-support kernel functions appear less stable over time. However, this finding has to be considered together with the results in Sect. 4.3 later.
Setting the bandwidth parameters to h 1 = h 2 = 0.5 yields the results reported in Fig. 9 in Appendix E. Here too, the time path of all estimators appears to be quite unstable, even though point estimates are comparable to those in Fig. 3. On the contrary, confidence intervals and the Hausman test are rather sensitive to the bandwidth choice: estimates obtained by using finite-support kernels appear to be volatile at the end of the sample and the time-varying p-value for the Hausman test is markedly unstable.

Data-driven bandwidth selection
As is well known, the finite sample performance of nonparametric estimators and tests depends on bandwidth selection. Moreover, a rigid bandwidth choice, as the one adopted in GKM, may work well for particular signal-to-noise ratios, but not in general. 6 Therefore, we explored the effects of using a data-driven method, namely the corrected AIC proposed by Cai and Tiwari (2000) and Cai (2007). The optimal This method can be applied to the time-varying OLS estimator in a straightforward manner, but its application to IV estimation is more problematic, since it is unclear how to set up the objective function to cover both the first-and second-stage models. The solution we have adopted is to apply the AIC criterion for the selection of the second-stage bandwidth parameter h 1 , given the first-stage parameter h 2 , which we keep at the values originally used in GKM. Table 1 contains the results for the two models in Eqs. (2) and (3).
As can be seen, the bandwidth parameters selected via AIC are quite large for both models, therefore yielding estimates that are much more stable trough time. Figure 4 compares, for the traditional Phillips curve, the IV estimates obtained with the automatic bandwidth selection and those given by setting h 1 = h 2 .
Finally, it should be noted that the bandwidth parameter governs the degree of timevariability of the estimators, which in many cases is an aspect on which the analyst may have strong a priori beliefs, dictated by the details of the problem at hand. In particular, economic reasoning can be used to evaluate ex post how credible the estimated time path of a coefficient is. Therefore, committal to a data-driven approach for bandwidth selection should in most cases be supplemented by traditional robustness checks.

Extending the sample
We now investigate the effects of a sample extension. Figure 5 shows the results for Eq. (2) based on observations ranging from 1948:06 to 2022:09 from the St. Louis FED dataset. This experiment is particularly interesting, because it includes data from the COVID-19 pandemic. As we will show, this provides a very interesting "natural experiment" to assess the performance of the estimator under extreme conditions. 7 The results we obtain, in terms of the robustness of results, are mixed. On the one hand, the parameter estimates appear to be quite robust to the choice of the time span, apart from small differences around 1960 and 2013, due to the new observations at the Fig. 4 Traditional PC: automatic bandwidth selection. Note: each plot compares the IV estimation results obtained with a "second-step" bandwidth h 1 = h 2 (blue line) and those resulting from the automatic selection procedure (red line, see Table 1). Dotted lines denote 90% confidence intervals. (Color figure online) beginning and at the end of the sample. On the other hand, standard errors are quite different from the original ones throughout the sample span. Using infinite-support kernels (Gaussian and exponential), the confidence intervals for the parameter α t in the late 1990s appear much larger than the original ones. This is hardly surprising, given that the standard errors depend on the first stage residuals: extending the sample to include the COVID-19 pandemic has a dramatic effect on the estimated standard errors.

Fig. 6
Excluding Covid-19. Note: the two columns report IV estimates and first-stage residuals of the endogenous variable u t , obtained by excluding (left) the Covid-19 period and with the full sample (right). Gaussian kernel function, bandwidth parameters h 1 = h 2 = 0.7. Shaded area denotes 90% confidence interval In order to show this effect, Fig. 6 reports IV estimates for α t and first stage residuals for u t obtained by excluding the COVID-19 period (left) and by using the full sample to 2022:09 (right). In the pre-COVID-19 sample, residuals do not contain any outliers and the confidence interval of the coefficient is very similar to the one in GKM. When using the full dataset, instead, the first-stage residuals display a huge spike in April 2020, as an effect of the unemployment surge which took place during the first wave of the pandemic: the most striking consequence is the effect this has on estimated standard errors for a wide range of observations. 8 With infinite-support kernels, the "COVID-19 spike" provokes an effect on confidence bands that extends for a very long period, with features that are somewhat counter-intuitive. The standard error for α t reaches its maximum around the year 2000, i.e., nearly 20 years before the pandemic, whereas a similar effect cannot be seen for the standard errors for the 2020-2022 period. In other terms, the influence of a single outlier on the estimates is markedly asymmetric with respect to time. On the contrary, the Hausman test performs satisfactorily in terms of robustness and provides stable results whatever the sample, with substantial discrepancies in the results obtained only with a Rolling Window kernel during the 60's and the 80's. Fig. 7 Bandwidth: local effects on standard errors. Note: the two panels report estimatedα t and 90% confidence intervals for the model in Eq. (2), the kernel is Gaussian. The left panel is obtained with h 1 = h 2 = 0.7 and right one with h 1 = h 2 = 0.5. Shaded area denotes 90% confidence interval Unsurprisingly, the adverse effects shown above are somewhat mitigated by kernel choices that put a greater weight on "local" data when calculating the time-varying quantities: for example, a Gaussian kernel with a narrower bandwidth (see Fig. 7) or finite-support kernels (see Fig. 13 in Appendix). Our overall impression is that, in normal times, the estimator is quite robust across a wide range of possible choices, but in the presence of possible abrupt breaks or otherwise exceptional events much care is needed by the investigator when choosing the precise details of the smoothing scheme to use.

Conclusions
We have presented a replication of the results provided by Giraitis et al. (2021) for their kernel-based instrumental variable regression estimator, in both a narrow and a wide sense.
In the narrow-sense replication, the Monte Carlo experiment and the real data application on the Phillips curve are replicated almost exactly. As for the empirical example, we came across a possible oversight about the degrees of freedom of the Hausman test which might have affected the results shown in GKM.
The wide sense replication focuses on the robustness of results to different aspects: we use different smoothing strategies (including data-driven ones), as well as a larger sample and show the effects on the results. As for the choice of the smoothing kernel, results seem to be sensitive mainly to the choice of finite-support versus infinitesupport kernels. While the latter provide results that are more readily interpretable, the former are more robust to the presence of outliers, which can affect results quite dramatically.
We find that parameter estimates are, in general, strongly robust. On the contrary, the standard errors and the Hausman test appear to be quite sensitive to the bandwidth parameter and to the presence of extreme shocks in the series considered, such as the COVID-19 pandemic period. Although investigating this aspect is outside the scope of the present paper, we believe that further work on the robustness of nonparametric methods with respect to outliers would be very important.
In conclusion, we believe that the time-varying IV estimator put forward by GKM is a very valuable tool that displays remarkable robustness properties under general conditions. However, it is advisable to carry out a comprehensive set of robustness checks in empirical applications, since the consequences of data outliers and/or kernel weighting choices may be far from obvious.

A.1 Estimators and the Hausman test
The two estimators from GKM that we analyze in this paper are 1. The time-varying OLS estimator 2. The time-varying IV estimator 9 is a kernel weight with bandwidth parameter H = T h 1 andψ t is used to indicate the time-varying first-stage OLS estimates of ψ t , possibly allowing for a different kernel bandwidth L = T h 2 in the first stage regression. In GKM, another IV estimator is also analyzed, namelyβ 2,t = T j=1 b H ,| j−t|ψ t z j x j −1 T j=1 b H ,| j−t|ψ t z j y j , that is asymptotically equivalent toβ t ; however, we do not consider it in our replication since the empirical application focuses onβ t , which appears to be the preferred form.
Note that both estimators can be written as where W t and X are matrices with T rows and p columns and y is a T -dimensional vector. While the matrices X and y simply contain the observations of the explanatory and dependent variables, respectively, the W t matrix contains kernel-weighted entries. For example, in the case of the time-varying OLS estimatorβ t (eq. (11) in GKM), the s-th row of W t equals or, in matrix notation (see Kapetanios et al. (2019)), where D t is a diagonal T × T matrix whose element [D t ] i,i equals The time-varying Hausman test is given by the following quadratic form: where ν j andû j denote the of the first-and second-stage residuals, respectively, andx j are the first-stage fitted values.
Conversely, the "Global Hausman Test" proposed by GKM for a given time span [T 0 , T 1 ] is defined as

A.2 Smoothing matrix
Consider the series of the fitted values of the dependent variableŷ = (ŷ 1 , . . . ,ŷ T ) obtained from the model in Eq.
(1). This T -dimensional vector can be expressed aŝ where the "smoothing matrix" H h mentioned in Sect. 4.2 is given by using the same notation of Eq. (A3), with depending on h through W O L S t = D t X or W I V t = D tX , withX denoting the fitted values in the "first stage" regression.

Appendix B: The behavior of the time-varying Hausman test in presence of both exogenous and endogenous covariates
In this appendix, we first provide a proof concerning the degrees of freedom of the Hausman test discussed in Sect. 2 and then we perform a simulation exercise on an ad hoc data generating process that includes both an exogenous and an endogenous variable.

B.1 Proof that the degrees of freedom of the time-varying Hausman test is r
Using the notation in Sect. 2 and Appendix A, the IV estimatorβ t can be written as in Eq. (A3), with where Z * andˆ * are matrices such that Now suppose that X can be split as [X 1 |Y] where X 1 contains the exogenous regressors (that is, those columns that are contained in the space spanned by Z) and Y the endogenous ones, so that they have p − r and r columns, respectively. The parameter vectors can be split accordingly as (B14) Note that in this case the leftmost p−r columns of W I V t coincide with those of W O L S t , and are equal to D t X 1 .
We now prove that the vector of contrastsβ t −β t , which is the essential ingredient of V T ,t in Eq. (A7) (Equation (29) in GKM), can be written as a linear combination ofγ t −γ t , which contains r elements. Consider the OLS and IV residuals for the full sample, based on the estimated parameter vector at time t: For the two estimators considered and any t, the following expression holds: Define the matrix and premultiply Eq. (B16) by S t : since the columns of D t X 1 are a subset of those of W t , so X 1 D tē (t) = 0. Therefore, for the time-varying OLS and IV estimators you get, respectively, and thusα As a consequence, the p-vector of contrastsβ t −β t can be written aŝ that is a linear combination of a vector with r elements. Therefore, for any t the covariance matrix of β t −β t has rank r , and the claim follows.

B.2 Simulation evidence
We perform a simulation exercise to provide finite sample behavior of the time-varying Hausman test when some of the covariates are considered endogenous. Our simulation design is similar to the one used in Section C, but we add an exogenous variable, x exo t to the set of regressors. This additional explanatory variable is drawn from a Gaussian distribution and the related regression parameter follows a √ T -rescaled random walk. Table 2 reports the rejection rate of the Hausman test under the null hypothesis of no endogeneity for a nominal size of 5%. We consider several sample sizes T and bandwidth parameters (h 1 and h 2 ). In the table, d f denotes the considered degrees of freedom of the limiting χ 2 distribution.
As we can see, the percentage of rejections for the test obtained with d f = 1 is close to the nominal size in all the scenarios we consider. As expected, the test with d f = 2 exhibits a large underrejection rate.

Appendix C: Simulation results
GKM propose two simulation designs based on the model in Eq. (1). The first is one is a just-identified model of the type while the second one is an over-identified model where y t is the dependent variable, x t is an explanatory variable, and z ·,t is the instrument; all are drawn from a Gaussian distribution. The error terms, u t and ν t , are generated according to where s = {0, 0.2, 0.5} governs the correlation between the error terms and where e ·,t denotes an i.i.d. Gaussian sequence. Finally, the parameters β t , ψ 1,t and ψ 2,t follow a √ T -rescaled random walk. In the following Tables 3, 4, 5, 6, 7 and 8, we report the same descriptive statistics used in GKM for both OLS and IV estimators: (1) median deviation; (2) absolute median deviation; (3) interdecile range, and (4) 95% coverage rate. 96 basic scenarios are considered, stemming from the possible combinations of (a) exact identification vs over-identification (b) degree of endogeneity of the x t explanatory variable: none, moderate and strong (c) sample size T = 100, 200, 400, 1000 (d) bandwidth choice: h 1 = 0.4, 0.5 and h 2 = 0.4, 0.5. Each table refers to a different design and includes different scenarios concerning the sample size T and the bandwidth parameters h 1 and h 2 . As in GKM, the number of Monte Carlo replications is set to 1000.
Indicators (1) and (2) are broadly consistent with those of GKM, apart from the OLS endogeneity bias being slightly larger in the just-identified case. On the contrary, the decile range is narrower in our simulation for both OLS and IV, which seems to indicate higher efficiency than reported in GKM. 10 As for indicator (4) (the 95% coverage rate), the figures we find are closer to the nominal value for the IV estimator.
The results for the Hausman test are reported in Table 9. For the Global Hausman Test in Table 10, we find a slightly larger rejection rate (closer to the nominal level) under the null compared to the original results, but apart from this we are able to replicate Table 8 in GKM almost perfectly.

Appendix F: The Kalman-filter apparatus: a comparison
In this appendix, we provide a comparison between the time-varying OLS (TV-OLS) estimator discussed in GKM and an estimator obtained by the Kalman-filter apparatus (KF hereafter). To this aim, we compare TV-OLS and KF estimates on simulated data and on the "traditional" Phillips curve proposed in Sect. 3.2.

Fig. 10
Comparing TV-OLS and KF: simulated data. Note: results for β 1,t and β 2,t (above); β 3,t and β 4,t (below). Each panel reports the true value of the parameter (black line), the estimates from TV-OLS (red line) and KF (blue line) and their 95% confidence intervals (light gray and dark gray shaded areas, respectively). TV-OLS bandwidth parameter h ≈ 0.30 In order to obtain the KF estimator, we consider, for t = 1, . . . , T , the following state-space representation of model where the states β t are the time-varying parameters, which are assumed to be independent random walk processes 11 and the rest of notation coincides with the one in Sect. 2.
In the first exercise, we generated data according to the model in Eq. (F26), where the u t terms are random draws from a Gaussian distribution and x k,t , with k = 2, . . . , 4, 12 are generated as independent AR(1) processes with first-order autocorrelation equal to 0.95. In order to simulate time-varying coefficients with a high degree of smoothness, the β t coefficients were generated as detrended cumulated random walk (that is, I (2)) processes. Therefore, we are using a state-space representation that is technically misspecified, given the way we generated the β t processes. Estimation is carried out by maximum likelihood, with a diffuse prior for the state as in Durbin and Koopman (2012); the estimate of the β t parameters can then be recovered by smoothing the state vector. Fig. 11 Comparing TV-OLS and KF: "traditional" Phillips curve. Note: each panel reports the true value of the parameter (black line), the estimates from TV-OLS (red line) and KF (blue line) and their 95% confidence intervals (light gray and dark gray shaded areas, respectively). TV-OLS bandwidth parameter h ≈ 0.65 Figure 10 reports the simulated β t parameters and their estimates via TV-OLS and KF. Here, for the TV-OLS we choose the automatic bandwidth selection outlined in Sect. 4.2. KF and TV-OLS estimates appear to be generally similar with the latter exhibiting a path slightly more volatile then the KF one. Moreover, it must be remarked that TV-OLS is several order of magnitudes less demanding than KF in terms of computational complexity: KF estimates entail a full Maximum-Likelihood estimation routine, which could take a long CPU time to converge, if at all. TV-OLS, on the other hand, requires no numerical optimization.
Finally, Fig. 11 shows the estimated coefficients of the "traditional" Phillips curve in Eq. (2). The results of the KF and TV-OLS estimators are very much alike, as they both provide evidence of very little time-variation of the parameter μ t , while the time paths of γ t and α t are very similar to each other.

Fig. 12
Excluding Covid-19: Epanechnikov kernel. Note: the two columns report IV estimates and firststage residuals of the endogenous variable u t , obtained by excluding (left) the Covid-19 period and with the full sample (right). Epanechnikov kernel function, bandwidth parameters h 1 = h 2 = 0.7. Shaded area denotes 90% confidence interval Fig. 13 Bandwidth: local effects on standard errors. Note: the two panels report estimatedα t and 90% confidence intervals for the model in Eq. (2), Epanechnikov kernel. The left panel is obtained with h 1 = h 2 = 0.7 and right one with h 1 = h 2 = 0.5. Shaded area denotes 90% confidence interval