# Sparse HP Filter: Finding Kinks in the COVID-19 Contact Rate††thanks: We
would like to thank the editor and an anonymous referee for helpful comments.
This work is in part supported by the Ministry of Education of the Republic of
Korea and the National Research Foundation of Korea (NRF-2018S1A5A2A01033487),
the McMaster COVID-19 Research Fund (Stream 2), the European Research Council
(ERC-2014-CoG-646917-ROMIA) and the UK Economic and Social Research Council
for research grant (ES/P008909/1) to the CeMMAP.

Sokbae Lee Department of Economics, Columbia University, 420 West 118th
Street, New York, NY 10027, USA. Centre for Microdata Methods and Practice,
Institute for Fiscal Studies, 7 Ridgmount Street, London WC1E 7AE, UK. E-mail:
<EMAIL_ADDRESS>Yuan Liao  Department of Economics, Rutgers University,
75 Hamilton St., New Brunswick, NJ 08901, USA. Email<EMAIL_ADDRESS>Myung Hwan Seo Correspondence. Department of Economics, Seoul National
University, 1 Gwanak-ro, Gwanak-gu, Seoul 08826, Korea. E-mail:
<EMAIL_ADDRESS>Youngki Shin Department of Economics, McMaster
University, 1280 Main St. W., Hamilton, ON L8S 4L8, Canada. Email:
<EMAIL_ADDRESS>
###### Abstract

In this paper, we estimate the time-varying COVID-19 contact rate of a
Susceptible-Infected-Recovered (SIR) model. Our measurement of the contact
rate is constructed using data on actively infected, recovered and deceased
cases. We propose a new trend filtering method that is a variant of the
Hodrick-Prescott (HP) filter, constrained by the number of possible kinks. We
term it the _sparse HP filter_ and apply it to daily data from five countries:
Canada, China, South Korea, the UK and the US. Our new method yields the kinks
that are well aligned with actual events in each country. We find that the
sparse HP filter provides a fewer kinks than the $\ell_{1}$ trend filter,
while both methods fitting data equally well. Theoretically, we establish risk
consistency of both the sparse HP and $\ell_{1}$ trend filters. Ultimately, we
propose to use time-varying _contact growth rates_ to document and monitor
outbreaks of COVID-19.

Keywords: COVID-19, trend filtering, knots, piecewise linear fitting, Hodrick-
Prescott filter

JEL codes: C51, C52, C22

##  1 Introduction

Since March 2020, there has been a meteoric rise in economic research on
COVID-19. New research outputs have been appearing on the daily and weekly
basis at an unprecedented level.111The major outlets for economists are: arXiv
working papers, NBER working papers, and CEPR’s new working paper series
called “Covid Economics: Vetted and Real-Time Papers” among others. To sample
a few, Ludvigson et al. (2020) quantified the macroeconomic impact of COVID-19
by using data on costly and deadly disasters in recent US history; Manski and
Molinari (2020) and Manski (2020) applied the principle of partial
identification to the infection rate and antibody tests, respectively;
Chernozhukov et al. (2020) used the US state-level data to study determinants
of social distancing behavior.

Across a wide spectrum of research, there is a rapidly emerging strand of
literature based on a Susceptible-Infected-Recovered (SIR) model and its
variants (e.g., Hethcote, 2000, for a review of the SIR and related models).
Many economists have embraced the SIR-type models as new tools to study the
COVID-19 pandemic. Avery et al. (2020) provided a review of the SIR models for
economists, calling for new research in economics. A variety of economic
models and policy simulations have been built on the SIR-type models. See
Acemoglu et al. (2020), Alvarez et al. (2020), Atkeson (2020), Eichenbaum et
al. (2020), Pindyck (2020), Stock (2020), Kim et al. (2020), and Toda (2020)
among many others.

One of central parameters in the SIR-type models is the contact rate,
typically denoted by $\beta$.222It is also called the transmission rate by
Stock (2020). It measures “the average number of adequate contacts (i.e.,
contacts sufficient for transmission) of a person per unit time” (Hethcote,
2000). The contact number $\beta/\gamma$ is the product between $\beta$ and
the average infectious period, denoted by $1/\gamma$; the contact number is
interpreted as “the average number of adequate contacts of a typical infective
during the infectious period” (Hethcote, 2000).

The goal of this paper is to estimate the time-varying COVID-19 contact rate,
say $\beta_{t}$. In canonical SIR models, $\beta$ is a time-constant
parameter. However, it may vary over time due to multiple factors. For
example, as pointed by Stock (2020), self-isolation, social distancing and
lockdown may reduce $\beta$. To estimate a SIR-type model, Fern’andez-
Villaverde and Jones (2020) allowed for a time-varying contact rate to reflect
behavioral and policy-induced changes associated with social distancing. In
particular, they estimated $\beta_{t}$ using data on deaths at city, state and
country levels. Their main focus was to simulate future outcomes for many
cities, states and countries.

Researchers have also adopted nonlinear time-series models from the
econometric toolbox. For example, Li and Linton (2020) analyzed the daily data
on the number of new cases and the number of new deaths with a quadratic time
trend model in logs. Their main purpose was to estimate the peak of the
pandemic. Liu et al. (2020) studied the density forecasts of the daily number
of active infections for a panel of countries/regions. They modeled the growth
rate of active infections as autoregressive fluctuations around a piecewise
linear trend with a single break. Hartl et al. (2020) used a linear trend
model in logs with a trend break to fit German confirmed cases. Harvey and
Kattuman (2020) used a Gompertz model with a time-varying trend to fit and
forecast German and UK new cases and deaths.

In this paper, we aim to synthesize the time-varying contact rate with
nonparametric time series modeling. Especially, we build a new nonparametric
regression model for $\beta_{t}$ that allows for a piecewise linear trend with
multiple kinks at unknown dates. We analyze daily data from Johns Hopkins
University Center for Systems Science and Engineering (Dong et al., 2020, JHU
CSSE) and suggest a particular transformation of data that can be regarded as
a noisy measurement of time-varying $\beta_{t}$. Our measurement of
$\beta_{t}$, which is constructed from daily data on confirmed, recovered and
deceased cases, is different from that of Fern’andez-Villaverde and Jones
(2020) who used only death data. We believe both measurements are complements
to each other. However, the SIR model is at best a first-order approximation
to the real world; a raw series of $\beta_{t}$ would be too noisy to draw on
inferences regarding the underlying contact rate. In fact, the raw series
exhibits high degrees of skewness and time-varying volatility even after the
log transformation.

To extract the time-varying signal from the noisy measurements, we consider
nonparametric trend filters that produce possibly multiple kinks in
$\beta_{t}$ where the kinks are induced by government policies and changes in
individual behavior. A natural candidate method that yields the kinks is
$\ell_{1}$ trend filtering (e.g., Kim et al., 2009). However, $\ell_{1}$ trend
filtering is akin to LASSO; hence, it may have a problem of producing too many
kinks, just like LASSO selects too many covariates. In view of this concern,
we propose a novel filtering method by adding a constraint on the maximum
number of kinks to the popular Hodrick and Prescott (1997) (HP) filter. It
turns out that this method produces a smaller number of the kink points than
$\ell_{1}$ trend filtering when both methods fit data equally well. In view of
that, we call our new method the _sparse HP filter_. We find that the
estimated kinks are well aligned with actual events in each country. To
document and monitor outbreaks of COVID-19, we propose to use piecewise
constant _contact growth rates_ using the piecewise linear trend estimates
from the sparse HP filter. They provide not only an informative summary of
past outbreaks but also a useful surveillance measure.

The remainder of the paper is organized as follows. In Section 2, we describe
a simple time series model of the time-varying contact rate. In Section 3, we
introduce two classes of filtering methods. In Section 4, we have a first look
at the US data, as a benchmark country. In Section 5, we present empirical
results for five countries: Canada, China, South Korea, the UK and the US. In
Section 6, we establish risk consistency of both the sparse HP and $\ell_{1}$
trend filters. Section 7 concludes and appendices include additional
materials. The replication R codes for the empirical results are available at
https://github.com/yshin12/sparseHP. Finally, we add the caveat that the
empirical analysis in the paper was carried out in mid-June using daily
observations up to June 8th. As a result, some remarks and analysis might be
out of sync with the COVID-19 pandemic in real time.

##  2 A Time Series Model of the COVID-19 Contact Rate

In this section, we develop a time-series model of the contact rate. Our model
specification is inspired by the classical SIR model which has been adopted by
many economists in the current coronavirus pandemic.

We start with a discrete version of the SIR model, augmented with deaths,
adopted from Pindyck (2020):

$\displaystyle\begin{split}\Delta I_{t}&=\beta S_{t-1}I_{t-1}-\gamma
I_{t-1},\\\ \Delta D_{t}&=\gamma_{d}I_{t-1},\\\ \Delta
R_{t}&=\gamma_{r}I_{t-1},\\\ 1&=S_{t}+I_{t}+D_{t}+R_{t},\\\
\gamma&=\gamma_{r}+\gamma_{d},\end{split}$ (2.1)

where the (initial) population size is normalized to be 1, $S_{t}$ is the
proportion of the population that is susceptible, $I_{t}$ the fraction
infected, $D_{t}$ the proportion that have died, and $R_{t}$ the fraction that
have recovered. The parameter $\gamma=\gamma_{r}+\gamma_{d}$ governs the rate
at which infectives transfer to the state of being deceased or recovered.

In the emerging economics literature on COVID-19, the contact rate $\beta$ is
viewed as the parameter that can be affected by changes in individual behavior
and government policies through social distancing and lockdown. We follow this
literature and let $\beta=\beta_{t}$ be time-varying.

Let $C_{t}$ be the proportion of confirmed cases, that is
$C_{t}=I_{t}+R_{t}+D_{t}$. In words, the confirmed cases consist of actively
infected, recovered and deceased cases. Use the equations in (2.1) to obtain

$\displaystyle\beta_{t}=Y_{t}:=\frac{\Delta C_{t}}{I_{t-1}S_{t-1}}.$ (2.2)

Assume that we have daily data on $\Delta C_{t}$, $\Delta R_{t}$ and $\Delta
D_{t}$. From these, we can construct cumulative $C_{t}$, $R_{t}$ and $D_{t}$.
Then $S_{t}=1-C_{t}$ and $I_{t}=C_{t}-R_{t}-D_{t}$. This means that we can
obtain time series of $\beta_{t}$ from $Y_{t}$. We formally assume this in the
following.

######  Assumption 1 (Data).

For each $t$, we observe $(C_{t},R_{t},D_{t})$.

By Assumption 1, we can construct $Y_{t}=\Delta C_{t}/(I_{t-1}S_{t-1})$.
Assumption 1 is a key assumption in the paper. We use daily data from JHU CSSE
and they are subject to measurement errors, which could bias our estimates. In
Appendix A, we show that the time series model given in this section is robust
to some degree of under-reporting of confirmed cases. However, our estimates
are likely to be biased if the underreporting is time-varying. For example,
this could happen because testing capacity in many countries has expanded over
the time period. Nonetheless, we believe that our measurement of $Y_{t}$
primarily captures the genuine underlying trend of $\beta_{t}$. Moreover,
because the SIR model in (2.1) is at best a first-order approximation, a raw
series of $Y_{t}$ would be too noisy to be used as the actual series of the
underlying contact rate $\beta_{t}$. In other words, $\beta_{t}\neq Y_{t}$ in
actual data and it would be natural to include an error term in $Y_{t}$.
Because $\beta_{t}$ has to be positive, we adopt a multiplicative error
structure and make the following assumption.

######  Assumption 2 (Time-Varying Signal plus Regression Error).

For each $t$, the unobserved random variable $\beta_{t}$ satisfies

$\displaystyle\log Y_{t}=\log\beta_{t}+u_{t},$

where the error term $u_{t}$ has the following properties:

  1. 1.

$\mathbb{E}[u_{t}|\mathcal{F}_{t-1}]=0$, where $\mathcal{F}_{t-1}$ is the
natural filtration at time $t-1$,

  2. 2.

$\mathbb{E}[u_{t}^{2}|\mathcal{F}_{t-1}]=\sigma_{t}^{2}>0$ for some time-
varying conditional variance $\sigma_{t}^{2}$.

Define

$\displaystyle y_{t}:=\log(\Delta C_{t})-\log(I_{t-1})-\log S_{t-1}.$ (2.3)

Under Assumption 2, (2.2) can be rewritten as

$\displaystyle y_{t}=\log\beta_{t}+u_{t},$ (2.4)

The time-varying parameter $\log\beta_{t}$ would not be identified without
further restrictions. Because it is likely to be affected by government
policies and cannot change too rapidly, we will assume that it follows a
piecewise trend:

######  Assumption 3 (Piecewise Trend).

The time-varying parameter $f_{0,t}:=\log\beta_{t}$ follows a piecewise trend
with at most $\kappa$ kinks, where the set of kinks is defined by
$\\{t=1,...,T:f_{0,t}-f_{0,t-1}\neq f_{0,t+1}-f_{0,t}\\}$ and the locations of
kinks are unknown.

The main goal of this paper is to estimate $\log\beta_{t}$ and its kinks under
Assumptions 1, 2 and 3.

##  3 Filtering the COVID-19 Contact Rate

We consider two different classes of trend filtering methods to produce
piecewise estimators of $f_{0,t}:=\log\beta_{t}$. The first class is based on
$\ell_{1}$ trend filtering, which has become popular recently. See, e.g., Kim
et al. (2009), Tibshirani (2014), and Wang et al. (2016) among others.

The starting point of the second class is the HP filter, which has been
popular in macroeconomics and has been frequently used to separate trend from
cycle. The standard convention in the literature is to set $\lambda=1600$ for
quarterly time series. For example, Ravn and Uhlig (2002) suggested a method
for adjusting the HP filter for the frequency of observations; de Jong and
Sakarya (2016) and Cornea-Madeira (2017) established some representation
results; Hamilton (2018) provided criticism on the HP filter; Phillips and Shi
(2019) advocated a boosted version of the HP filter via $L_{2}$-boosting
(Bühlmann and Yu, 2003) that can detect multiple structural breaks. We view
that the kinks might be more suitable than the breaks for modelling
$\beta_{t}$ using daily data. It is unlikely that in a few days, the degree of
contagion of COVID-19 would be diminished with an abrupt jump by social
distancing and lockdown. The original HP filter cannot produce any kink just
as ridge regression does not select any variable. We build the sparse HP
filter by drawing on the recent literature that uses an $\ell_{0}$-constraint
or -penalty (see, e.g. Bertsimas et al., 2016; Chen and Lee, 2018; Chen and
Lee, 2020; Huang et al., 2018).

###  3.1 $\ell_{1}$ Trend Filtering

In $\ell_{1}$ trend filtering, the trend estimate $f_{t}$ is a minimizer of

$\displaystyle\sum_{t=1}^{T}(y_{t}-f_{t})^{2}+\lambda\sum_{t=2}^{T-1}|f_{t-1}-2f_{t}+f_{t+1}|,$
(3.1)

which is related to Hodrick and Prescott (1997) filtering; the latter is the
minimizer of

$\displaystyle\sum_{t=1}^{T}(y_{t}-f_{t})^{2}+\lambda\sum_{t=2}^{T-1}(f_{t-1}-2f_{t}+f_{t+1})^{2}.$
(3.2)

In this paper, the main interest is to find the kinks in the trend. For that
purpose, $\ell_{1}$ trend filtering is more suitable than the HP filtering.
The main difficulty of using (3.1) is the choice of $\lambda$. This is
especially challenging since the time series behavior of $y_{t}$ is largely
unknown.

The $\ell_{1}$ trend filter is akin to LASSO. In view of an analogy to square-
root LASSO (Belloni et al., 2011), it might be useful to consider a square-
root variant of (3.1):

$\displaystyle\left(\sum_{t=1}^{T}(y_{t}-f_{t})^{2}\right)^{1/2}+\lambda\sum_{t=2}^{T-1}|f_{t-1}-2f_{t}+f_{t+1}|.$
(3.3)

We will call (3.3) _square-root $\ell_{1}$ trend filtering_. Both (3.1) and
(3.3) can be solved via convex optimization software, e.g., CVXR (Fu et al.,
2017).

###  3.2 Sparse Hodrick-Prescott Trend Filtering

As an alternative to $\ell_{1}$ trend filtering, we may exploit Assumption 3
and consider an $\ell_{0}$-constrained version of trend flitering:

$\displaystyle\begin{split}&\sum_{t=1}^{T}(y_{t}-f_{t})^{2}\\\ &\text{ subject
to }\\\ &\sum_{t=2}^{T-1}1\\{f_{t}-f_{t-1}\neq
f_{t+1}-f_{t}\\}\leq\kappa.\end{split}$ (3.4)

The formulation in (3.4) is related to the method called best subset selection
(see, e.g. Bertsimas et al., 2016; Chen and Lee, 2018). It requires only the
input of $\kappa$. However, because of the nature of the
$\ell_{0}$-(pseudo)norm, it would not work well if the signal-to-noise ratio
(SNR) is low (Hastie et al., 2017; Mazumder et al., 2017). This is likely to
be a concern for our measurement of the log contact rate.

To regularize the best subset selection procedure, it has been suggested in
the literature that (3.4) can be combined with $\ell_{1}$ or $\ell_{2}$
penalization (Bertsimas and Van Parys, 2020; Mazumder et al., 2017). We adopt
Bertsimas and Van Parys (2020) and propose an $\ell_{0}$-constrained version
of the Hodrick-Prescott filter:

$\displaystyle\begin{split}&\sum_{t=1}^{T}(y_{t}-f_{t})^{2}+\lambda\sum_{t=2}^{T-1}(f_{t-1}-2f_{t}+f_{t+1})^{2}\\\
&\text{subject to }\\\ &\sum_{t=2}^{T-1}1\\{f_{t}-f_{t-1}\neq
f_{t+1}-f_{t}\\}\leq\kappa.\end{split}$ (3.5)

As in (3.4), the tuning parameter $\kappa$ controls how many kinks are allowed
for. Thus, we have a direct control of the resulting segments of different
slopes. The $\ell_{2}$ penalty term is useful to deal with the low SNR problem
with the COVID 19 data. We will call (3.5) _sparse HP trend filtering_.

Problem (3.5) can be solved by mixed integer quadratic programming (MIQP).
Rewrite the objective function in (3.5) as

$\displaystyle\sum_{t=1}^{T}(y_{t}-f_{t})^{2}+\lambda\sum_{t=2}^{T-1}(f_{t-1}-2f_{t}+f_{t+1})^{2}$

subject to $z_{t}\in\\{0,1\\},t=2,\ldots,T-1$, $\underline{f}\leq
f_{t}\leq\overline{f}$, $\sum_{t=2}^{T-1}z_{t}\leq\kappa$, and

$\displaystyle-Mz_{t}\leq f_{t-1}-2f_{t}+f_{t+1}\leq Mz_{t},\;t=2,\ldots,T-1.$

This is called a big-M formulation that requires that

$\max_{t}|f_{t-1}-2f_{t}+f_{t+1}|\leq M.$

We need to choose the auxiliary parameters $\underline{f}$, $\overline{f}$ and
$M$. We set $\underline{f}=\min y_{t}$ and $\overline{f}=\max y_{t}$. One
simple practical method for choosing $M$ is to set

$\displaystyle M=\max_{t=2,\ldots,T-1}|y_{t-1}-2y_{t}+y_{t+1}|.$ (3.6)

To implement the proposed method, it is simpler to write the MIQP problem
above in matrix notation. Let $\bm{y}$ denote the $(T\times 1)$ vector of
$y_{t}$’s and $\bm{1}$ a vector of 1’s whose dimension may vary. We solve

$\displaystyle\min_{\bm{f},\bm{z}}\left[(\bm{y}-\bm{f})^{\top}(\bm{y}-\bm{f})+\lambda\bm{f}^{\top}\bm{D}^{\top}\bm{D}\bm{f}\right]$
(3.7)

subject to $\bm{z}\in\\{0,1\\}^{T-2}$,
$\underline{f}\bm{1}\leq\bm{f}\leq\overline{f}\bm{1}$,
$\bm{1}^{\top}\bm{z}\leq\kappa$, $-M\bm{z}\leq\bm{D}\bm{f}\leq M\bm{z}$, where
$\bm{D}$ is the $(T-2)\times T$ second-order difference matrix such that

$\bm{D}=\left[\begin{matrix}1&-2&1&&&&\\\ &1&-2&1&&&\\\
&&\ddots&\ddots&\ddots&&\\\ &&&1&-2&1&\\\ &&&&1&-2&1\\\ \end{matrix}\right]$

with entries not shown above being zero. Let $\widehat{\bm{f}}$ and
$\widehat{\bm{z}}$ denote the resulting maximizers. It is straightforward to
see that $\widehat{\bm{f}}$ also solves (3.5). Therefore, $\widehat{\bm{f}}$
is the $(T\times 1)$ vector of trend estimates and
$\widehat{K}:=\\{t=2,\ldots,T-1:\widehat{z}_{t}=1\\}$ is the index set of
estimated kinks. The MIQP problem can be solved via modern mixed integer
programming software, e.g., Gurobi. Because the sample size for $y_{t}$ is
typically less than 100, the computational speed of MIQP is fast enough to
carry out cross-validation to select tuning parameters. We summarize the
equivalence between the original and MIQP formulation in the following
proposition.

######  Proposition 3.1.

Define

$\displaystyle\begin{split}\mathbb{F}(\kappa):=\\{\bm{f}=(f_{1},\ldots,f_{T}):&\min_{t}f_{t}\geq\underline{f},\max_{t}f_{t}\leq\overline{f},\max_{t}|f_{t-1}-2f_{t}+f_{t+1}|\leq
M,\\\ &\sum_{t=2}^{T-1}1\\{f_{t}-f_{t-1}\neq
f_{t+1}-f_{t}\\}\leq\kappa\\}.\end{split}$

Let $\widehat{\bm{f}}_{\textrm{SHP}}:\\{\widehat{f}_{t}:t=1,\ldots,T\\}$
denote a solution to

$\displaystyle\min_{\bm{f}\in\mathbb{F}(\kappa)}S_{T}(\bm{f},\lambda):=(\bm{y}-\bm{f})^{\top}(\bm{y}-\bm{f})+\lambda\bm{f}^{\top}\bm{D}^{\top}\bm{D}\bm{f}.$

Let $\bm{\widehat{f}}_{\textrm{MIQP}}$ denote a solution to (3.7). Then, both
$\widehat{\bm{f}}_{\textrm{SHP}}$ and $\bm{\widehat{f}}_{\textrm{MIQP}}$ are
equivalent in the sense that
$\widehat{\bm{f}}_{\textrm{SHP}}\in\mathbb{F}(\kappa),$
$\bm{\widehat{f}}_{\textrm{MIQP}}\in\mathbb{F}(\kappa),$ and
$S_{T}(\widehat{\bm{f}}_{\textrm{SHP}},\lambda)=S_{T}(\bm{\widehat{f}}_{\textrm{MIQP}},\lambda).$

###  3.3 Selection of Tuning Parameters

We first consider the sparse HP filter. There are two tuning parameters:
$\lambda$ and $\kappa$. It is likely that there will be an initial stage of
coronavirus spread, followed by lockdown or social distancing. Even without
any policy intervention, it will come down since many people will voluntarily
select into self-isolation and there is a chance of herd immunity. Hence, the
minimum $\kappa$ is at least 1. If $\kappa$ is too large, it is difficult to
interpret the resulting kinks. In view of these, we set the possible values
$\kappa\in\mathcal{K}=\\{2,3,4\\}$. For each pair of $(\kappa,\lambda)$, let
$\widehat{\bm{f}}_{-s}(\kappa,\lambda)$ denote the leave-one-out estimator of
$\bm{f}_{s}$. That is, it is the sparse HP filter estimate by solving:

$\displaystyle\begin{split}&\sum_{t=1,t\neq
s}^{T}(y_{t}-f_{t})^{2}+\lambda\sum_{t=2}^{T-1}(f_{t-1}-2f_{t}+f_{t+1})^{2}\\\
&\text{subject to }\\\ &\sum_{t=2}^{T-1}1\\{f_{t}-f_{t-1}\neq
f_{t+1}-f_{t}\\}\leq\kappa.\end{split}$ (3.8)

The only departure from (3.5) is that we replace the fidelity term
$\sum_{t=1}^{T}(y_{t}-f_{t})^{2}$ with $\sum_{t=1,t\neq
s}^{T}(y_{t}-f_{t})^{2}$. We choose the optimal $(\kappa,\lambda)$ by

$\displaystyle\min_{(\kappa,\lambda)\in\mathcal{K}\times\mathcal{L}}\sum_{t=1}^{T}\left\\{y_{t}-\widehat{\bm{f}}_{-t}(\kappa,\lambda)\right\\}^{2},$
(3.9)

where $\mathcal{L}$ is the set for possible values of $\lambda$. We view
$\lambda$ as an auxiliary tuning parameter that mitigates the low SNR problem.
Hence, we take $\mathcal{L}$ to be in the range of relatively smaller values
than the typical values used for the HP filter. In the numerical work, we let
$\Lambda$ to a grid of equi-spaced points in the $\log_{2}$-scale.

We now turn to the HP, $\ell_{1}$ and square-root $\ell_{1}$ trend filters.
For each filter, we choose $\lambda$ such that the fidelity term
$\sum_{t=1}^{T}(y_{t}-f_{t})^{2}$ is the same as that of the sparse HP filter.
In this way, we can compare different methods holding the same level of
fitting the data. Alternatively, we may choose $\lambda$ by leave-one-out
cross validation for each filtering method. However, in that case, it would be
more difficult to make a comparison across different methods. Since our main
focus is to find the kinks in the contact rate, we will fine-tune all the
filters to have the same level of $\sum_{t=1}^{T}(y_{t}-f_{t})^{2}$ based on
the sparse HP filter’s cross validation result.

##  4 A First Look at the Time-Varying Contact Rate

As a benchmark, we have a first look at the US data. The dataset is obtained
via R package coronavirus (Krispin, 2020), which provides a daily summary of
COVID-19 cases from Johns Hopkins University Center for Systems Science and
Engineering (Dong et al., 2020). Following Liu et al. (2020), we set the first
date of the analysis to begin when the number of cumulative cases reaches 100
(that is, March 4 for the US). To smooth data minimally, we take $Y_{t}$ in
(2.2) to be a three-day simple moving average: that is,
$Y_{t}=(\breve{Y}_{t}+\breve{Y}_{t-1}+\breve{Y}_{t-2})/3$, where
$\breve{Y}_{t}$ is the daily observation of $Y_{t}$ constructed from the
dataset.333Liu et al. (2020) used one-sided three-day rolling averages;
Fern’andez-Villaverde and Jones (2020) took 5-day centered moving averages.
Then, we take the log to obtain $y_{t}=\log Y_{t}$.

Figure 1: US Data

|
---|---
|

Note: The orange vertical line denotes the lockdown date, March 30. The
population size is normalized to be 1.

Figure 1 has four panels. The top-left panel shows the fraction of daily
positives, the top-right panel the fraction of lagged cumulative infectives,
the bottom-left panel the fraction of lagged cumulative susceptibles, and the
bottom-right $Y_{t}=\Delta C_{t}/(I_{t-1}S_{t-1})$. In the US, statewide stay-
at-home orders started in California on March 20 and extended to 30 states by
March 30 (The New York Times, 2020d). The inserted vertical line in the figure
corresponds to March 30, which we will call the “lockdown” date for
simplicity, although there was no lockdown at the national level. As a noisy
measurement of $\beta_{t}$, $Y_{t}$ shows enormous skewness and fluctuations
especially in the beginning of the study period. This indicates that the
signal-to-noise ratio is high and is time-varying as well. This pattern of the
data has motivated Assumption 2. Because $S_{t-1}$ is virtually one throughout
the analysis period (0.994 on June 8, which is the last date of the sample),
$Y_{t}\approx\Delta C_{t}/I_{t-1}$, which is daily positives divided by the
lagged infectives.

Figure 2: $\log Y_{t}$ as a raw time series of $\log\beta_{t}$ and parametric
fitting

|
---|---
|

Note: The orange vertical line denotes the lockdown date, March 30.

Figure 2 shows the raw data along with parametric fitting. The top-left panel
shows the logarithm of $Y_{t}$, which still exhibits some degree of skewness
and time-varying variance. The fitted regression line is based on the
following parametric regression model:

$\displaystyle
y_{t}=\alpha_{0}+\alpha_{1}(t-t_{0})1(t>t_{0})+\varepsilon_{t},$ (4.1)

where $t_{0}$ is March 30. The simple idea behind (4.1) is that an initial,
time-constant contact rate began to diminish over time after a majority of US
states imposed stay-at-home orders.

In simple SIR models, the contact number $\beta/\gamma$ is identical to the
basic reproduction number denoted by $R_{0}$, which is viewed as a key
threshold quantity in the sense that “an infection can get started in a fully
susceptible population if and only if $R_{0}>1$ for many deterministic
epidemiology models” (Hethcote, 2000). Since $\beta_{t}$ is time-varying in
our framework, we may define a time-varying basic reproduction number by
$R_{0}(t):=\beta_{t}/\gamma$.

The top-right panel shows the estimates of time-varying $R_{0}(t)$:444The
formula given in (4.2) is valid if errors are homoskedastic, which is unlikely
to be true in actual data. However, we present (4.2) here because it is
simpler. Our main analysis focuses on estimation of the kinks based on
$y_{t}$, not on estimating $R_{0}(t)$. We use the latter mainly to appreciate
the magnitude of the kinks.

$\displaystyle\widehat{R}_{0}(t):=\exp[\widehat{\alpha}_{0}+\widehat{\alpha}_{1}(t-t_{0})1(t>t_{0})]/\gamma,$
(4.2)

where $\gamma=1/18$ is taken from Acemoglu et al. (2020). This corresponds to
18 days of the average infectious period. The parametric estimates of
$R_{0}(t)$ started above 4 and reached $0.15$ at the end of the sample period.

The left-bottom panel shows the residual plot in terms of $y_{t}$ and the
right-bottom panel the residual plot in terms of $R_{0}(t)$. In both panels,
the estimated residuals seem to be biased and show autocorrelation.
Especially, the positive values of residuals at the end of the sample period
is worrisome because the resulting prediction would be too optimistic.

##  5 Estimation Results

In this section, we present estimation results for five countries: Canada,
China, South Korea, the UK and the US. These countries are not meant to be a
random sample of the world; they are selected based on our familiarity with
them so that we can interpret the estimated kinks with narratives. We look at
the US as a benchmark country and provide a detailed analysis in Section 5.1.
A condensed version of the estimation results for other countries are provided
in Section 5.2.

###  5.1 Benchmark: the US

Figure 3 summarizes the results of leave-one-out cross validation (LOOCV) as
described in Section 3.3. The range of tuning parameters were:
$\kappa\in\\{2,3,4\\}$ and $\lambda=\\{2^{0},2^{1},\ldots,2^{5}\\}$. We can
see that the choice of $\kappa$ seems to matter more than that of $\lambda$.
Clearly, $\kappa=2$ provides the worst result and $\kappa=3$ and $\kappa=4$
are relatively similar. The LOOCV criterion function was minimized at
$(\widehat{\kappa},\widehat{\lambda})=(4,1)$.

Figure 3: Sparse HP Filtering: Leave-One-Out Cross Validation

---

Note: The red vertical line denotes the minimizer
$(\widehat{\kappa},\widehat{\lambda})=(4,1)$ of the cross-validation objective
function. The x-axis is represented by the $\log_{2}$ scale.

Figure 4: Sparse HP Filtering

|
---|---
|

Note: The grey curve in each panel represents the data $y_{t}$. Sparse HP
filtering solves (3.5) and the parametric fit uses the linear regression
(4.1). The estimated kinks denoted by blue vertical lines are: March 16, March
20, April 14, and May 13. The orange vertical line denotes the lockdown date,
March 30.

Based on the tuning parameter selection in Figure 3, we show estimation
results for the sparse HP filter in Figure 4. The structure of Figure 4 is
similar to that of Figure 2. The top-left panel shows estimates of the sparse
HP filter along with the raw series of $y_{t}$ and the parametric estimates
shown in Figure 2. The top-right panel displays counterparts in terms of
$R_{0}(t)$. The bottom panels exhibit residual plots for the $\log\beta_{t}$
and $R_{0}(t)$ scales. The trend estimates from the sparse HP filter fit the
data much better than the simple parametric estimates. The estimated kink
dates are: March 16, March 20, April 14, and May 13. There are five periods
based on them.

  1. 1.

March 4 - March 16: this period corresponds to the initial epidemic stage;

  2. 2.

March 16 - March 20: the contact rate was peaked at the end of this period;

  3. 3.

March 20 - April 14: a sharp decrease of the contact rate is striking;

  4. 4.

April 14 - May 13: the contact rate decreased but less steeply;

  5. 5.

May 13 - June 8: it continued to go down but its slope got more flattened.

To provide narratives on these dates, President Trump declared a national
emergency on March 13; The Centers for Disease Control and Prevention (CDC)
recommended no gatherings of 50 or more people on March 15; New York City’s
public schools system announced that it would close on March 16; and
California started stay-at-home orders on March 20 (The New York Times, 2020b,
d). These events indicate that the second period was indeed the peak of the
COVID-19 epidemic in the US. The impact of social distancing and stay-at-home
orders across a majority of states is clearly visible in the third period. The
fourth and fifth periods include state reopening: for example, stay-at-home
order expired in Georgia and Texas on April 30; in Florida on May 4; in
Massachusetts on May 18; in New York on May 28 (The New York Times, 2020c). In
short, unlike the parametric model with a single kink, the nonparametric trend
estimates detect multiple changes in the slopes and provide kink dates, which
are well aligned with the actual events.

We now turn to different filtering methods. In Figure 5, we show selection of
$\lambda$ for the HP, $\ell_{1}$ and square-root $\ell_{1}$ filters. As
explained in Section 3.3, the penalization parameter $\lambda$ is chosen to
ensure that all different methods have the same level of fitting the data.
Figure 6 shows the estimation results for the HP filter. The HP trend
estimates trace data pretty well after late March, as clear in residual plots.
However, there is no kink in the estimates due to the nature of the $\ell_{2}$
penalty term in the HP filter. The tuning parameter was $\lambda=30$, which is
30 times as large as the one used in the sparse HP filter. This is because for
the HP filter, $\lambda$ is the main tuning parameter; however, for the sparse
HP filter, $\lambda$ plays a minor role of regularizing the $\ell_{0}$
constrained method.

Figure 5: Selection of $\lambda$

|  |
---|---|---

Note: The thunning parameter $\lambda$ is chosen by minimizing the distance
between two fidelities as described in Section 3.3. The selected tuning
parameters for HP, $\ell_{1}$, and square-root $\ell_{1}$ are as 30, 0.9, and
0.5, repectively.

Figure 6: HP Filtering

|
---|---
|

Note: HP filtering solves (3.2). The orange vertical line denotes the lockdown
date, March 30.

Figure 7: $\ell_{1}$ Filtering

|
---|---
|

Note: $\ell_{1}$ filtering solves (3.1). The estimated kinks denoted by blue
vertical lines are: March 7, March 15, March 16, March 20, March 21, March 30,
April 14, April 21, May 12, and May 27. The orange vertical line denotes the
lockdown date, March 30. The $\ell_{1}$-filtering kink dates are calculated by
any $t$ such that $|\Delta^{2}\log\hat{\beta}_{t}|>\eta$, where $\eta=10^{-6}$
is an effective zero.

Figure 8: Square-root $\ell_{1}$ Filtering

|
---|---
|

Note: Square-root $\ell_{1}$ filtering solves (3.3). The estimated kinks
denoted by blue vertical lines are: March 7, March 15, March 16, March 20,
March 21, March 30, April 14, April 21, May 12, and May 27. The orange
vertical line denotes the lockdown date, March 30.

Figure 9: Sparse HP and $\ell_{1}$ Filtering for the US

|
---|---
|

Note: The Sparse HP kinks (blue) are: March 16, March 20, April 14, and May
13. The $\ell_{1}$ kinks (red) are: March 7, March 15, March 16, March 20,
March 21, March 30, April 14, April 21, May 12, and May 27. The orange
vertical line denotes the lockdown date, March 30.

In Figure 7, we plot estimation results using $\ell_{1}$ trend filtering. The
results look similar to those in Figure 6, but there are now 10 kink points:
March 7, March 15, March 16, March 20, March 21, March 30, April 14, April 21,
May 12, May 27. They are dates $t$ such that
$|\Delta^{2}\log\widehat{\beta}_{t}|>\eta$, where $\Delta^{2}$ is the double
difference operator and $\eta=10^{-6}$ is an effective zero.555The results are
robust to the size of the effective zero and do not change even if we set
$\eta=10^{-3}$. Gurobi used for the Sparse HP filtering also imposes some
effective zeros in various constraints. We use the default values of them. For
example, the integer tolerance level and the general feasibility tolerance
level are $10^{-5}$ and $10^{-6}$, respectively. The tuning parameter
$\lambda=0.9$ was chosen by minimizing the distance between the fidelity of
$\ell_{1}$ and that of the Sparse HP. Recall that the sparse HP filter
produces the kinks on March 16, March 20, April 14, and May 13. In other
words, the $\ell_{1}$ filter estimates 6 more kinks than the sparse HP filter
when both fit the data equally well. It is unlikely that two adjacent dates
(March 15-16 and March 20-21) correspond to two different regimes in the time-
varying contact rate. This suggests that the $\ell_{1}$ filter may over-
estimate the number of kinks. Figure 8 shows estimation results for the
square-root $\ell_{1}$ trend filters. The chosen $\lambda=0.5$ was smaller
than that of the $\ell_{1}$ trend filter due to the change in the scale of the
fidelity term; however, the trend estimates look very similar and the
estimated kinks are identical between the $\ell_{1}$ and square-root
$\ell_{1}$ trend filters. In Figure 9, we plot the sparse HP filter estimates
along with $\ell_{1}$ filter estimates. Both methods have produced very
similar trend estimates, but the number of kinks is substantially different:
only 4 kinks for the sparse HP filter but 10 kinks for the $\ell_{1}$ filter.

###  5.2 Other Countries: Canada, China, South Korea and the UK

In this section, we provide condensed estimation results for other countries.
We focus on the sparse HP and $\ell_{1}$ filters whose tuning parameters are
chosen as in the previous section. Appendices B and C contain the details of
the selection of tuning parameters.

Figure 10 shows the empirical results of Canada. The estimated kink dates are:
March 18 and April 11. Based on them, we can classify observations into three
periods:

  1. 1.

March 6 - March 18: This is an initial period of the epidemic in Canada. The
contact rate was peaked at the end of this period. Several lockdown measures
started to be imposed.

  2. 2.

March 18 - April 11: We observe a sharp decrease in the contact rate in this
period. Additional measures were imposed.

  3. 3.

April 11 - June 8: The contact rate decreased but less steeply.

Quebec and Ontario are the two provinces hardest hit by COVID-19. In Quebec,
daycares, public schools, and universities are closed on March 13 followed by
non-essential businesses and public gathering places on March 15. Montreal
declared state of emergency on March 27 (CTV News, 2020). Similarly, all
public schools in Ontario are closed on March 12. The state of emergency was
announced in Ontario on March 17 and ordered to close all non-essential
businesses on March 23 (Global News, 2020). We set the lockdown date in Canada
on March 13 as other provincial governments as well as the federal government
started to recommend the social distancing measures strongly along with the
cancellation of various events on the date (CBC News, 2020). These tight
lockdown and social distancing measures seemed to contribute the sharp decline
of the contact rate in the second period. Both governments started to announce
the plans to lift the lockdown measures at the end of April, which corresponds
to the third period. Lockdown fatigue would also cause the slower decrease of
the contact rate. In sum, a series of social distancing measures have been
effective to decrease the contact rate but with some lags. The sparse HP
filtering separates these periods reasonably well. However, the $\ell_{1}$
filtering overfits the model with 5 kinks.

Figure 10: Sparse HP and $\ell_{1}$ Filtering for Canada

|
---|---
|

Note: The Sparse HP kinks (blue) are: March 18 and April 11. The $\ell_{1}$
kinks (red) are: March 17, March 18, March 24, April 11, and May 24. The
orange vertical line denotes the lockdown date, March 13.

Figure 11 shows the results for China. Since the pandemic is almost over in
China, we use the data censored on April 26th when the 3-day-average of newly
confirmed cases is less than 10. The estimated kink dates are: January 28,
March 14, March 24, and April 18. Based on them, we can classify observations
into five periods:

  1. 1.

January 23 - January 28: This is an initial period of the epidemic in China.
Since the official confirmation of the novel coronavirus on December 31, 2019,
the confirmed cases had increased rapidly. President Xi presided and issued
instructions on the epidemic control on January 20. The travel ban on Wuhan
was imposed on January 23, 2020 in the period of the Lunar New Year holidays
(The New York Times, 2020b). We set this date as the lockdown date.

  2. 2.

January 28 - March 14: The contact rate shows a sharp decrease during this
period. The Lunar New Year holiday was extended to February 2 across the
country. China’s National Health Commission (NHC) imposed social distancing
measures on January 26. By January 29, all 31 provinces in China upgraded the
public health emergency response to the most serious level. By early February,
nationwide strict social distancing policies were in place.

  3. 3.

March 14 - March 24: This period shows a V-turn of the contact rate in terms
of the $\log\beta_{t}$ scale. It also shows an upward trending in the
$R_{0}(t)$ scale but the level is lower than that in early February. The mass
quarantine of Wuhan was partially lifted on March 19 (Bloomberg, 2020). Most
provinces downgraded their public health emergency response level, where
factories and stores started to reopen in this period.

  4. 4.

March 24 - April 18: The contact rate still increased but at a lower rate. It
started to decrease again at the end of this period. We can see a slight
increase in $R_{0}(t)$. The mass quarantine of Wuhan was lifted more and the
travel to other provinces was allowed on April 8 (Bloomberg, 2020).

  5. 5.

April 18 - April 26: The contact rate went down quickly and was flattened at a
low level. The last hospitalized Covid-19 patient in Wuhan was discharged on
April 26 (Xinhua, 2020).

Figure 11: Sparse HP and $\ell_{1}$ Filtering for China

|
---|---
|

Note: The Sparse HP kinks (blue) are: January 28, March 14, March 24, and
April 18. The $\ell_{1}$ kinks (red) are: January 29, February 14, February
22, March 13, March 14, March 26, March 27, and April 17. The orange vertical
line denotes the lockdown date, January 23.

Figure 12 shows the results for South Korea. For the same reason in China, we
use the data censored on April 29. The estimated kink dates are: March 3,
March 15, April 2, and April 21. Based on them, we can classify observations
into five periods:

  1. 1.

February 21 - March 3: This period is the beginning of the coronavirus spread
in South Korea. On February 21, Shincheonji Church of Jesus, a secretive
church in South Korea was linked to a surge of infections in the country (The
New York Times, 2020b). The sharp decline of $\log\beta_{t}$ could be due to
the fact that the number of active infections is relatively small in this
period and thus, $Y_{t}=\Delta C_{t}/(I_{t-1}S_{t-1})$ might not be properly
measured.

  2. 2.

March 3 - March 15: A sharp decrease in $\log\beta_{t}$ in this period
corresponds to Korean government’s swift reactions to the outbreak through
active testing and contact tracing (The New York Times, 2020a; Aum et al.,
2020; Kim et al., 2020), highlighted by prompt containment of an outbreak
started on March 8 at a call center in Seoul (Park et al., 2020).

  3. 3.

March 15 - April 2: This period shows a modest V-turn of the contact rate in
terms of the $\log\beta_{t}$ scale but it is much less visible in the
$R_{0}(t)$ scale.

  4. 4.

April 2 - April 21: This period displays a further reduction of the contact
rate. A remarkable event was parliamentary elections on April 15 when 30
million people voted without triggering a new outbreak.

  5. 5.

April 21 - April 29: The contact rate was flattened at a low level.

Figure 12: Sparse HP and $\ell_{1}$ Filtering for South Korea

|
---|---
|

Note: The Sparse HP kinks (blue) are: March 3, March 15, April 2, and April
21. The $\ell_{1}$ kinks (red) are: March 3, March 12, March 15, March 16,
April 2, April 3, and April 21. South Korea have not imposed any nation-wide
lockdown measure.

Figure 13 shows the empirical results of the UK. The estimated kink dates are:
March 12 and March 14. Based on them, we can classify observations into three
periods:

  1. 1.

March 6 - March 12: This is an initial period of the epidemic in the UK. The
downward trend might be due to the fact that the cumulative number of
confirmed cases is relatively small and therefore, its growth rate can be
easily over-estimated.

  2. 2.

March 12 - March 14: This is still an early stage of the epidemic. The steep
increase in the contact rate is again possibly due to the small number of the
confirmed cases.

  3. 3.

March 14 - June 8: This period shows a steady and constant decrease in the
contact rate. The lockdown measures began in the UK on March 23 (BBC News,
2020b). On May 10, the British prime minister Boris Johnson relaxed certain
restrictions and announced the plan for reopening (BBC News, 2020a) but it
keeps the downward trending.

Overall, the trend of the contact rate is quite similar to those of the US and
Canada. The location of the kinks are around more in the initial periods but
it shows the steady downward trending after the prime minister’s lockdown
announcement. This results in a smooth curve in the $R_{0}(t)$ scale. The
trend estimates of the $\ell_{1}$ filter is almost identical to those of the
sparse HP filter; however, it indicates 10 kinks, which seem overly excessive.

Figure 13: Sparse HP and $\ell_{1}$ Filtering for the UK

|
---|---
|

Note: The Sparse HP kinks (blue) are: March 12 and March 14. The $\ell_{1}$
kinks (red) are: March 11, March 20, March 28, April 3, April 22, April 23,
May 8, May 20, May 21, and May 27. The orange vertical line denotes the
lockdown date, March 24.

###  5.3 A Measure of Surveillance and Policy Implications

The sparse HP filter produces the kinks where the slope changes in the
$\log\beta_{t}$ scale, thereby providing a good surveillance measure for
monitoring the ongoing epidemic situation. The policy responses are based on
various scenarios and the contact rate is one of the most important measures
that determine different developments. As a summary statistic of the time-
varying contact rate, we propose to consider the time-varying growth rate of
the contact rate, which we call _contact growth rates_ :

$\displaystyle\xi(t):=\frac{\beta_{t}-\beta_{t-1}}{\beta_{t-1}}\times 100.$

Recall that we have defined the time-varying basic reproduction number by
$R_{0}(t)=\beta_{t}/\gamma$. Because $\gamma$ is fixed over time, we have that

$\displaystyle\xi(t)=\frac{R_{0}(t)-R_{0}(t-1)}{R_{0}(t-1)}\times 100.$

Therefore, $\xi(t)$ can be interpreted as the _time-varying growth rate of the
basic reproduction number_ ; it does not require the knowledge of $\gamma$ and
solely depends on $\beta_{t}$. Furthermore, by simple algebra,

$\displaystyle\xi(t)=\left[\exp(\log\beta_{t}-\log\beta_{t-1})-1\right]\times
100,$ (5.1)

which implies that $\xi(t)$ will be piecewise constant if $\log\beta_{t}$ is
piecewise linear. This simple algebraic relationship shows that a change in
the slope at the kink in the $\log\beta_{t}$ scale is translated to a break in
the time-varying contact growth rates and therefore in growth rates of the
time-varying basic reproduction number. When $\xi(t)$ is a large positive
number, that will be a warning signal for the policymakers. On the contrary,
if $\xi(t)$ is a big negative number, that may suggest that policy measures
imposed before are effective to reduce the contagion.

Table 1: Time-Varying Contact Growth Rates

| US | Canada | China | South Korea | UK
---|---|---|---|---|---
Period 1 | -1.55 | 7.08 | 15.04 | -15.23 | -10.96
Period 2 | 7.48 | -5.02 | -12.27 | -20.34 | 31.10
Period 3 | -7.67 | -2.82 | 30.23 | 4.47 | -4.70
Period 4 | -3.39 | NA | 4.41 | -7.88 | NA
Period 5 | -1.04 | NA | -22.95 | 1.57 | NA

Note: The growth rates, expressed as percentages, are obtained by (5.1) using
the sparse HP trend estimates. The contact growth rates are also growth rates
of $R_{0}(t)$. The kink dates separating distinct periods are different for
each country and they are reported in Sections 5.1 and 5.2.

Table 1 reports the time-varying contact growth rates in the five countries
that we investigate, using the sparse HP trend estimates. For the US, the
explosive growth rate of 7.5% in the second period is followed by the negative
growth rates of $-7.7$%, $-3.4$%, and $-1$%, albeit at diminishing magnitudes.
The trajectory of Canada is similar to that of the US. The growth rates of
China fluctuated up and down: it started with a high positive 15% followed by
$-12$%; a sharp V-turn at the end of the second period (March 14) with the
resulting explosive growth rate of 30%, followed by moderate 4% and impressive
$-23$%. It might be the case that the up-and-down pattern observed in China is
in part due to data quality issues since China was the first country to
experience the pandemic. For South Korea, we can see the stunning drop of the
growth rates culminating on March 15 (the end of the second period). A modest
positive growth rate during period 3 is offset by a larger magnitude of
negative growth rate in period 4. The UK has experienced steady—but not
spectacular—negative growths over the sample period following a sharp
fluctuation in mid-March. This hints the degrees of effectiveness of the UK
lockdown policy. As early pandemic epicenters, China and South Korea
experienced V-turns in the time-varying growth rates of basic reproduction
number. Canada, the UK and the US may face similar trajectories as they reopen
their countries. Our surveillance statistic can be a useful indicator to
monitor a new outbreak of COVID-19. However, it will be mainly useful for a
short-term projection of the contact growth rate because it is not designed to
make long-term trend predictions.

##  6 Theory

In this section, we examine theoretical properties of the sparse HP and
$\ell_{1}$ filters in terms of risk consistency. Let $\|\cdot\|_{0}$ denote
the usual $\ell_{0}$-(pseudo)norm, that is the number of nonzero elements, and
let $\|\cdot\|_{r}$ and $\|\cdot\|_{\infty}$, respectively, denote the
$\ell_{r}$ norm for $r=1,2$ and the sup-norm.

###  6.1 Risk Consistency of the Sparse HP Filter

Define

$\displaystyle\mathcal{F}=\mathcal{F}(\kappa,M):=\left\\{\bm{f}:\|\bm{D}\bm{f}\|_{0}\leq\kappa,\|\bm{D}\bm{f}\|_{\infty}\leq
M\right\\},$ (6.1)

where $M$ is defined in $\eqref{def:M}$. For each $\bm{f}\in\mathcal{F}$,
define

$\displaystyle
S(\bm{f}):=\mathbb{E}_{\bm{y}}\left[\frac{1}{T}(\bm{y}-\bm{f})^{\top}(\bm{y}-\bm{f})\right].$

Let $\bm{f^{*}}$ denote the ideal sparse filter in the sense that

$\displaystyle\bm{f^{*}}\in\text{argmin}_{\bm{f}\in\mathcal{F}}S(\bm{f}).$

Let $\bm{\widehat{f}}$ denote the sparse HP filter defined in Section 3.2.
Then,

$\displaystyle
R(\bm{\widehat{f}},\bm{f^{*}}):=S(\bm{\widehat{f}})-S(\bm{f^{*}})$ (6.2)

is always nonnegative. Following the literature on empirical risk
minimization, we bound the excess risk $R$ in (6.2) and establish conditions
under which it converges to zero.

Recall that the sparse HP filter minimizes

$\displaystyle
Q_{n}(\bm{f}):=\frac{1}{T}(\bm{y}-\bm{f})^{\top}(\bm{y}-\bm{f})+\frac{\lambda}{T}\bm{f}^{\top}\bm{D}^{\top}\bm{D}\bm{f}$

subject to $\bm{f}\in\mathcal{F}$.

Let $S_{n}(\bm{f}):=T^{-1}(\bm{y}-\bm{f})^{\top}(\bm{y}-\bm{f})$. Write

$\displaystyle R(\bm{\widehat{f}},\bm{f^{*}})$
$\displaystyle=S(\bm{\widehat{f}})-Q_{n}(\bm{f^{*}})+Q_{n}(\bm{f^{*}})-S(\bm{f^{*}})$
$\displaystyle\leq
S(\bm{\widehat{f}})-Q_{n}(\bm{\widehat{f}})+Q_{n}(\bm{f^{*}})-S(\bm{f^{*}})$
$\displaystyle=S(\bm{\widehat{f}})-S_{n}(\bm{\widehat{f}})-\frac{\lambda}{T}\bm{\widehat{f}}^{\top}\bm{D}^{\top}\bm{D}\bm{\widehat{f}}+S_{n}(\bm{f^{*}})+\frac{\lambda}{T}{\bm{f^{*}}}^{\top}\bm{D}^{\top}\bm{D}\bm{f^{*}}-S(\bm{f^{*}})$
$\displaystyle\leq
2\sup_{\bm{f}\in\mathcal{F}}\left|S_{n}(\bm{f})-S(\bm{f})\right|+2\frac{\lambda}{T}\sup_{\bm{f}\in\mathcal{F}}{\bm{f}}^{\top}\bm{D}^{\top}\bm{D}\bm{f}.$

Therefore, it suffices to bound two terms above. For the second term, we can
use (3.6) and (6.1) to bound

$\displaystyle
2\frac{\lambda}{T}\sup_{\bm{f}\in\mathcal{F}}{\bm{f}}^{\top}\bm{D}^{\top}\bm{D}\bm{f}$
$\displaystyle\leq\frac{2\lambda M^{2}\kappa}{T}.$

We summarize discussions above in the following lemma.

######  Lemma 6.1.

Let $\bm{\widehat{f}}$ denote the sparse HP filter. Then,

$\displaystyle R(\bm{\widehat{f}},\bm{f^{*}})\leq
2\sup_{\bm{f}\in\mathcal{F}}\left|S_{n}(\bm{f})-S(\bm{f})\right|+\frac{2\lambda\kappa}{T}\max_{t=2,\ldots,T-1}|y_{t-1}-2y_{t}+y_{t+1}|^{2}.$

To derive an asymptotic result, we introduce subscripts indexed by the sample
size $T$, when necessary for clarification. Let $\mathcal{G}_{\kappa}$ denote
the set of every continuous and piecewise linear function whose slopes and the
function itself is bounded by $C_{1}$ and $C_{2}$, respectively, and the
number of kinks is bounded by $\kappa$.

######  Assumption 4.

Assume that $\mathcal{F}$ in (6.1) satisfies

$\displaystyle\mathcal{F}(\kappa,M)\subseteq\mathcal{F}_{T}:=\left\\{\bm{f_{T}}=(f_{T,1},...,f_{T,T}):f_{T,t}=f(t/T),f\in\mathcal{G}_{\kappa}\right\\}.$
(6.3)

Moreover, $y_{t}=f_{T,t}^{*}+u_{t}$, where $\log\beta_{t}=f_{T,t}^{*}$,
$\bm{f^{*}_{T}}\in\mathcal{F}_{T}$ and $u_{t}$ satisfies
$\sup_{t=1,2,\ldots}\mathbb{E}|u_{t}|^{p}<\infty$ for some $p\geq 2$ and
Assumption 2. Finally, $\lambda\kappa T^{-(1-1/p)}\rightarrow 0$ as
$T\rightarrow\infty$.

Then, we have the following proposition.

######  Proposition 6.1.

Let Assumption 4 hold. Then, we have that as $T\rightarrow\infty$,

$\displaystyle\sup_{\bm{f}\in\mathcal{F}}\left|\frac{1}{T}\sum_{t=1}^{T}\left\\{(y_{t}-f_{t})^{2}-\mathbb{E}(y_{t}-f_{t})^{2}\right\\}\right|\rightarrow_{p}0$
(6.4)

and

$\displaystyle\frac{\lambda\kappa}{T}\max_{t=2,\ldots,T-1}|y_{t-1}-2y_{t}+y_{t+1}|^{2}\rightarrow_{p}0.$
(6.5)

Therefore, $R(\bm{\widehat{f}},\bm{f^{*}})\rightarrow_{P}0$.

Theorem 6.1 establishes the consistency in terms of the excess risk $R$.
Assumption 4 provides sufficient conditions for (6.4) and (6.5). Condition
(6.4) is a uniform law of large numbers for the class $\mathcal{F}$ and
condition (6.5) imposes a weak condition on $\lambda$. Proposition 6.1 follows
immediately from Lemma 6.1 once (6.4) and (6.5) are established.

###### Proof of Proposition 6.1.

Note that the summand in (6.4) can be rewritten
$(y_{t}^{2}-\mathbb{E}y_{t}^{2})-2f_{t}(y_{t}-\mathbb{E}y_{t})$. Then,
$y_{t}^{2}-\mathbb{E}y_{t}^{2}=u_{t}^{2}-\sigma_{u}^{2}+2(f_{T,t}^{*}-f_{t})u_{t}$
and $2f_{t}(y_{t}-\mathbb{E}y_{t})=2f_{t}u_{t}$. Furthermore,
$T^{-1}\sum_{t=1}^{T}u_{t}^{2}-\sigma_{u}^{2}=o_{p}(1)$ due to the law of
large numbers (LLN) for a martingale difference sequence (mds).

We now turn to
$\sup_{\bm{f}\in\mathcal{F}}\left(T^{-1}\sum_{t=1}^{T}f_{t}u_{t}\right)$. The
marginal convergence is straightforward since $f_{t}u_{t}$ is an mds with
bounded second moments due to the LLN for mds. Next, note that for a constant
$\eta>0$

$\sup_{|\bm{f}-\bm{f^{\prime}}|_{\infty}<\eta}\left|T^{-1}\sum_{t=1}^{T}(f_{t}-f_{t}^{\prime})u_{t}\right|\leq\eta\left(T^{-1}\sum_{t=1}^{T}|u_{t}|\right),$

which implies the stochastic equicontinuity of the process indexed by
$\bm{f}\in\mathcal{F}_{T}$. Finally, recall Arzelà-Ascolli theorem, see e.g.
Van Der Vaart and Wellner (1996), to conclude that $\mathcal{G}_{\kappa}$ is
totally bounded with respect to $|\cdot|_{\infty}$. Therefore,

$\sup_{\bm{f}\in\mathcal{F}_{T}}\left(T^{-1}\sum_{t=1}^{T}f_{t}u_{t}\right)=o_{p}(1)$

by a generic uniform convergence theorem, e.g. Andrews (1992).

To show the condition (6.5), note that it is bounded by
$16\frac{\lambda\kappa}{T}\max_{t=1,\ldots,T}y_{t}^{2}$, which is in turn
$O_{p}(\lambda\kappa T^{-(1-1/p)})$ due to the moment condition on $u_{t}$. ∎

###  6.2 Risk Consistency of the $\ell_{1}$ Filter

The $\ell_{1}$ trend filtering (3.1) can be expressed as

$\widetilde{\bm{f}}:=\arg\min_{\bm{f}\in\mathbb{R}^{T}}\|\bm{y}-\bm{f}\|_{2}^{2}+\lambda\|\bm{D}\bm{f}\|_{1}.$

We now derive the deviation bound for $\|\widetilde{\bm{f}}-\bm{f}^{*}\|_{2}.$
First, the problem is equivalent to a regular LASSO problem as stated in Lemma
6.2 below.

Write $\bm{D}=(\bm{D}_{3},\bm{D}_{2})$ where $\bm{D}_{2}$ has two columns.
Additionally, write

$\bm{G}_{2}:=\begin{pmatrix}\bm{D}_{3}^{-1}\\\
\mathbf{0}\end{pmatrix},\quad\bm{g}_{1}:=\begin{pmatrix}-\bm{D}_{3}^{-1}\bm{D}_{2}\\\
\bm{I}_{2}\end{pmatrix},$

where $\bm{0}$ is $2\times(T-2)$, $\bm{g}_{1}$ is $T\times 2$ and $\bm{G}_{2}$
is $T\times(T-2).$ Let
$\bm{P}_{\bm{g}_{1}}=\bm{g}_{1}(\bm{g}_{1}^{\top}\bm{g}_{1})^{-1}\bm{g}_{1}^{\top}.$

######  Lemma 6.2.

We have
$\widetilde{\bm{f}}=\bm{y}-\widetilde{\bm{y}}+\widetilde{\bm{X}}\widehat{\theta}$,
where $\widetilde{\bm{y}}:=(\bm{I}-\bm{P}_{\bm{g}_{1}})\bm{y}$,
$\widetilde{\bm{X}}:=(\bm{I}-\bm{P}_{\bm{g}_{1}})\bm{G}_{2}$ and

$\widehat{\theta}:=\arg\min_{\theta}\|\widetilde{\bm{y}}-\widetilde{\bm{X}}\theta\|_{2}^{2}+\lambda\|\theta\|_{1}.$

###### Proof of Lemma 6.2.

Let $\bm{D}_{1}=(\mathbf{0}:\bm{I}_{2})$ be a $2\times T$ matrix, so that

$\bar{\bm{D}}:=\begin{pmatrix}\bm{D}\\\ \bm{D}_{1}\end{pmatrix}$

is upper triangular and invertible. Then,
$\bm{G}:=\bar{\bm{D}}^{-1}=(\bm{G}_{2},\bm{g}_{1}).$ Then for a generic
$\bm{f}\in\mathbb{R}^{T}$, we can define

$\bm{\alpha}:=\bar{\bm{D}}\bm{f}=\begin{pmatrix}\bm{D}\bm{f}\\\
\bm{D}_{1}\bm{f}\end{pmatrix}:=\begin{pmatrix}\theta\\\ \bm{a}\end{pmatrix}.$

So $(\theta,\bm{a})$ also depend on $\bm{f}$ and
$\bm{G}\bm{\alpha}=\bm{g}_{1}\bm{a}+\bm{G}_{2}\theta.$ Then the problem is
equivalent to:
$\widetilde{\bm{f}}=\bm{g}_{1}\widehat{\bm{a}}+\bm{G}_{2}\widehat{\theta}$,
where

$(\widehat{\bm{a}},\widehat{\theta}):=\min_{\bm{a},\theta}\|\bm{y}-(\bm{g}_{1}\bm{a}+\bm{G}_{2}\theta)\|_{2}^{2}+\lambda\|\theta\|_{1}.$

To solve the problem, we concentrate out $\bm{a}$: Given $\theta$, the optimal
$\bm{a}$ is
$(\bm{g}_{1}^{\top}\bm{g}_{1})^{-1}\bm{g}_{1}^{\top}(\bm{y}-\bm{G}_{2}\theta)$
and the optimal $\bm{g}_{1}\bm{a}$ is
$\bm{P}_{\bm{g}_{1}}(\bm{y}-\bm{G}_{2}\theta)$. Substituting, so the problem
becomes a regular LASSO problem:

$\min_{\theta}\|\widetilde{\bm{y}}-\widetilde{\bm{X}}\theta\|_{2}^{2}+\lambda\|\theta\|_{1}.$

Finally,
$\widetilde{\bm{f}}=\bm{P}_{\bm{g}_{1}}(\bm{y}-\bm{G}_{2}\widehat{\theta})+\bm{G}_{2}\widehat{\theta}=\bm{y}-\widetilde{\bm{y}}+\widetilde{\bm{X}}\widehat{\theta}.$
∎

Next, let $J$ denote the indices of $t$ so that $f_{0,t-1}-f_{0,t}\neq
f_{0,t}-f_{0,t+1}$ when $t\in J$; let $J^{c}$ denote the indices of $t$ so
that $f_{0,t-1}-f_{0,t}=f_{0,t}-f_{0,t+1}$ when $t\in J$. Here,
$\\{f_{0,t}:t=1,\ldots,T\\}$ denote the true elements of $\bm{f}$. For a
generic vector $\theta\in\mathbb{R}^{T-2}$, let $\theta_{J}$ and
$\theta_{J^{c}}$ respectively be its subvectors whose elements are in $J$ and
$J^{c}.$ No we define the restricted eigenvalue constant

$\zeta:=\inf_{\|\theta_{J^{c}}\|_{1}\leq
9\|\theta_{J}\|_{1}}\frac{\|\frac{1}{\sqrt{T}}\widetilde{\bm{X}}\theta\|_{2}^{2}}{\|\theta\|_{2}^{2}}.$

######  Proposition 6.2.

Let $\bm{f}^{*}$ denote the true value of $\bm{f}$ and
$\bm{u}:=\bm{y}-\bm{f}^{*}$. Suppose the event
$2.5\|{\bm{u}}^{\top}\widetilde{\bm{X}}\|_{\infty}<\lambda$ holds. Then on
this event

$\displaystyle R(\widetilde{\bm{f}},\bm{f}^{*})$
$\displaystyle\leq\frac{2}{T}\bm{u}^{\top}\bm{P}_{\bm{g}_{1}}\bm{u}+2\|\frac{1}{T}\widetilde{\bm{X}}^{\top}\widetilde{\bm{X}}\|_{\infty}\left(\frac{18\lambda}{\zeta
T}\|J\|_{0}\right)^{2}.$ (6.6)

###### Proof of Proposition 6.2.

Let $\theta^{*}=\bm{D}\bm{f}^{*}$. Consider the vector form of the model
$\bm{y}=\bm{f}^{*}+\bm{u}$. Then
$\widetilde{\bm{y}}=\widetilde{\bm{X}}\theta^{*}+\widetilde{\bm{u}}$ where
$\widetilde{\bm{u}}=(\bm{I}-\bm{P}_{\bm{g}_{1}})\bm{u}$. By Lemma 6.2,
$\widetilde{\bm{f}}=\bm{y}-\widetilde{\bm{y}}+\widetilde{\bm{X}}\widehat{\theta}$,
where

$\widehat{\theta}:=\arg\min_{\theta}\|\widetilde{\bm{y}}-\widetilde{\bm{X}}\theta\|_{2}^{2}+\lambda\|\theta\|_{1}.$

The standard argument for the LASSO deviation bound implies, on the event
$2.5\|{\bm{u}}^{\prime}\widetilde{\bm{X}}\|_{\infty}<\lambda$,

$\|\widehat{\theta}-\theta^{*}\|_{1}\leq\frac{18\lambda}{\zeta T}\|J\|_{0}.$

Finally,
$\widetilde{\bm{f}}-\bm{f}^{*}=\bm{P}_{\bm{g}_{1}}\bm{u}+\widetilde{\bm{X}}(\widehat{\theta}-\theta^{*})$
implies

$R(\widetilde{\bm{f}},\bm{f}^{*})=\frac{1}{T}\|\widetilde{\bm{f}}-\bm{f}^{*}\|_{2}^{2}\leq\frac{2}{T}\bm{u}^{\top}\bm{P}_{\bm{g}_{1}}\bm{u}+2\|\frac{1}{T}\widetilde{\bm{X}}^{\top}\widetilde{\bm{X}}\|_{\infty}\|\widehat{\theta}-\theta^{*}\|_{1}^{2}.$

∎

To achieve risk consistency, $\lambda$ has to be chosen to make the second
term on the right-hand side of (6.6) asymptotically small and to ensure that
the event $2.5\|{\bm{u}}^{\top}\widetilde{\bm{X}}\|_{\infty}<\lambda$ holds
with high probability. The first term on the right-hand side of (6.6) will
converge to zero under mild conditions on $\bm{u}$. It is reassuring that the
$\ell_{1}$ trend filter fits COVID-19 data well in our empirical results.

###  6.3 Risk Consistency of $\exp(\widehat{f}_{t})$ and
$\exp(\widetilde{f}_{t})$

In this subsection, we obtain risk consistency of $\exp(\widehat{f}_{t})$ and
$\exp(\widetilde{f}_{t})$. To do so, we first rewrite the excess risk in (6.2)
as

$R(\bm{f},\bm{f^{*}})=\frac{1}{T}\sum_{t=1}^{T}\mathbb{E}(f_{t}-f_{t}^{*})^{2},$

for $\bm{f}=(f_{1},...,f_{T})^{\top}$ and
$\bm{f^{*}}=(f_{1}^{*},...,f_{T}^{*})^{\top}$. We have proved in the previous
sections that $R(\bm{\widehat{f}},\bm{f^{*}})\rightarrow_{P}0$ and
$R(\bm{\widetilde{f}},\bm{f^{*}})\rightarrow_{P}0$. Then, under the assumption
that there exists a constant $C<\infty$ such that
$\max_{t}|f_{t}|+\max_{t}|f_{t}^{*}|<C$ for all $\\{f_{t}\\}$ on the parameter
space, we get, uniformly for all $f$ on the parameter space,

$\frac{1}{T}\sum_{t=1}^{T}\mathbb{E}(\exp(f_{t})-\exp(f_{t}^{*}))^{2}=\frac{1}{T}\sum_{t=1}^{T}\mathbb{E}\exp(2\tilde{f}_{t})(f_{t}-f_{t}^{*})^{2}\leq\exp(2C)\frac{1}{T}\sum_{t=1}^{T}\mathbb{E}(f_{t}-f_{t}^{*})^{2},$

where in the first equality we used the mean value theorem for some
$\tilde{f}_{t}\in(f_{t},f_{t}^{*}).$ Therefore,

$R(\exp(\bm{\widehat{f}}),\exp({\bm{f^{*}}}))\leq\exp(2C)R(\bm{\widehat{f}},\bm{f^{*}})=o_{P}(1)$

and the analogous result folds for $\exp(\bm{\widetilde{f}})$.

##  7 Conclusions

We have developed a novel method to estimate the time-varying COVID-19 contact
rate using data on actively infected, recovered and deceased cases. Our
preferred method called the sparse HP filter has produced the kinks that are
well aligned with actual events in each of five countries we have examined. We
have also proposed contact growth rates to document and monitor outbreaks.
Theoretically, we have outlined the basic properties of the sparse HP and
$\ell_{1}$ filters in terms of risk consistency. The next step might be to
establish a theoretical result that may distinguish between the two methods by
looking at kink selection consistency. It would also be important to develop a
test for presence of kinks as well as an inference method on the location and
magnitude of kinks and on contact growth rates. In the context of the
nonparametric kernel regression of the trend function, Delgado and Hidalgo
(2000) explored the distribution theory for the jump estimates but did not
offer testing for the presence of a jump. Compared to the kernel smoothing
approach, it is easier to determine the number of kinks using our approach, as
we have demonstrated. Furthermore, the linear trend specification is more
suitable for forecasting immediate future outcomes, at least until the next
kink arises. The long-term prediction is more challenging and it is beyond the
scope of this paper. Finally, it would be useful to develop a panel regression
model for the contact rate at the level of city, state or country. These are
interesting research topics for future research.

## Appendices

##  Appendix A Under-Reporting of Positive Cases

In Section 2, it is assumed that we observe $(C_{t},R_{t},D_{t})$. In this
appendix, we show that our time series model in Section 2 is robust to some
degree of under-reporting of positive cases.

Assume that what we observe is only a fraction of changes in $C_{t}$. This
assumption reflects the reality that a daily reported number of newly positive
cases of COVID-19 is likely to be underreported. Suppose that we observe
$\Delta c_{t}$ in period $t$ such that $\Delta c_{t}:=\rho\Delta C_{t},$ where
$0<\rho<1$ is unknown. Then,

$c_{t}=\sum_{t=1}^{T}\Delta c_{t}=\rho\sum_{t=1}^{T}\Delta C_{t}=\rho C_{t},$

assuming that $c_{0}=C_{0}=0$. In words, $\rho$ is the constant ratio between
reported and true cases. Formally, we make the following assumption.

######  Assumption 5 (Fraction Reporting).

For each $t$, we observe $(c_{t},r_{t},d_{t})$ such that

$\displaystyle c_{t}:=\rho C_{t},\ \ r_{t}:=\rho R_{t}\ \ \ \ \text{ and }\ \
d_{t}:=\rho D_{t},$

where $0<\rho<1$.

The two simplifying conditions in Assumption 5 is that (i) $\rho$ is identical
among the three time series and (ii) $\rho$ is constant over time. In reality,
a fraction of reported deaths might be higher than that of reported cases;
$\rho$ might be time-varying especially in the beginning of the pandemic due
to capacity constraints in testing. However, we believe that $\rho$ is
unlikely to vary over time as much as $\beta_{t}$ changes over time; thus, we
take a simple approach to minimize complexity. The common $\rho$ can be
thought of a broad measure of detecting COVID-19 in a community.

Define $i_{t}:=c_{t}-r_{t}-d_{t}$ and $s_{t}:=1-c_{t}$. Under Assumption 5,
the reported fraction infected at time $t$ ($i_{t}$) is underestimated, but
the reported fraction of the proportion that is susceptible at time $t$
($s_{t}$) is overestimated. Note that

$\displaystyle g_{t}:=\frac{\Delta c_{t}}{i_{t-1}}=\frac{\rho\Delta
C_{t}}{\rho I_{t-1}}=\frac{\Delta C_{t}}{I_{t-1}}.$

However,

$\displaystyle s_{t-1}=1-\rho_{t-1}C_{t-1}\neq S_{t-1}.$

In words, we have a measurement error problem on $s_{t-1}$ but not on $g_{t}$.
It follows from (2.2) that the observed $g_{t}$ and $s_{t-1}$ are related by

$\displaystyle g_{t}=\beta_{t}s_{t-1}+v_{t},$ (A.1)

where

$\displaystyle v_{t}=\beta_{t}(S_{t-1}-s_{t-1})=\beta_{t}(\rho-1)C_{t-1}.$
(A.2)

The right-hand side of (A.2) is likely to exhibit an increasing trend since
$C_{t-1}$ is the cumulative fraction ever infected. To alleviate this problem,
we now divide both sides of (A.1) by $c_{t-1}$, which is positive, to obtain

$\displaystyle\frac{g_{t}}{c_{t-1}}=\beta_{t}\left[\frac{s_{t-1}}{c_{t-1}}+\frac{\rho-1}{\rho}\right].$
(A.3)

On one hand, if $\rho=1$, (A.3) is identical to (2.2). On other hand, if
$\rho\rightarrow 0$, the term inside the brackets on the right-hand side of
(A.3) diverges to infinity.

In the intermediate case, it depends on the relative size between
${s_{t-1}}/{c_{t-1}}$ and ${(\rho-1)}/{\rho}$. We now use the UK data to argue
that the latter is negligible to the former. According to the estimate by
Office for National Statistics (2020), “an average of 0.25% of the community
population had COVID-19 in England at any given time between 4 May and 17 May
2020 (95% confidence interval: 0.16% to 0.38%).” In the UK data used for
estimation, the changes in the number of cumulative positives between 4 May
and 17 May 2020 is 0.08% of the UK population. Then, an estimate of
$\rho=0.08/0.25=0.32$, resulting in $(\rho-1)/\rho=-2.12$. However, the sample
maximum, median, minimum values of ${s_{t-1}}/{c_{t-1}}$ are 572412, 804, and
264, respectively. Therefore, the correction term $(\rho-1)/\rho$ is
negligible and therefore, (A.3) reduces to

$\displaystyle g_{t}\approx\beta_{t}s_{t-1},$ (A.4)

which is virtually the same as (2.2).

##  Appendix B Sparse HP Filtering: Leave-One-Out Cross-Validation for Canada,
China, South Korea and the UK

Figure 14: Sparse HP Filtering: LOOCV for Other Countries

|
---|---
|

Note: The red dashed line denotes the minimizer of the cross-validation
objective function: $(\widehat{\kappa},\widehat{\lambda})=(2,16)$ for Canada;
$(\widehat{\kappa},\widehat{\lambda})=(4,2)$ for China;
$(\widehat{\kappa},\widehat{\lambda})=(4,4)$ for South Korea; and
$(\widehat{\kappa},\widehat{\lambda})_{=}(2,1)$ for the UK. The analysis
period is ended if the number of newly confirmed cases averaged over 3 days is
smaller than 10: April 26 (China) and April 29 (South Korea). The grid points
are: $\kappa\in\\{2,3,4\\}$ and $\lambda=\\{2^{0},2^{1},\ldots,2^{5}\\}$. The
x-axis is represented by the $\log_{2}$ scale.

##  Appendix C $\ell_{1}$ Trend Filtering: Selection of $\lambda$

Figure 15: $\ell_{1}$ Trend Filtering: Selection of $\lambda$

|
---|---
|

Note: The red dashed line denotes the equalizer between the fidelity of the
sparse HP filter and that of the $\ell_{1}$ filter: $\widehat{\lambda}=4.9$
for Canada; $\widehat{\lambda}=8.9$ for China; $\widehat{\lambda}=3.0$ for
South Korea; and $\widehat{\lambda}=2.7$ for the UK. The analysis period is
ended if the number of newly confirmed cases averaged over 3 days is smaller
than 10: April 26 (China) and April 29 (South Korea).

## References

  * Acemoglu et al. (2020) Acemoglu, D., V. Chernozhukov, I. Werning, and M. D. Whinston (2020).  Optimal targeted lockdowns in a multi-group SIR model.  Working Paper 27102, National Bureau of Economic Research.
  * Alvarez et al. (2020) Alvarez, F. E., D. Argente, and F. Lippi (2020).  A simple planning problem for COVID-19 lockdown.  Working Paper 26981, National Bureau of Economic Research.
  * Andrews (1992) Andrews, D. W. (1992).  Generic uniform convergence.  Econometric theory 8(2), 241–257.
  * Atkeson (2020) Atkeson, A. (2020).  What will be the economic impact of COVID-19 in the US? Rough estimates of disease scenarios.  Working Paper 26867, National Bureau of Economic Research.
  * Aum et al. (2020) Aum, S., S. Y. T. Lee, and Y. Shin (2020).  COVID-19 doesn’t need lockdowns to destroy jobs: The effect of local outbreaks in Korea.  Working Paper 27264, National Bureau of Economic Research.
  * Avery et al. (2020) Avery, C., W. Bossert, A. Clark, G. Ellison, and S. F. Ellison (2020).  Policy implications of models of the spread of coronavirus: Perspectives and opportunities for economists.  Working Paper 27007, National Bureau of Economic Research.
  * BBC News (2020a) BBC News (2020a).  Boris Johnson speech: PM unveils ‘conditional plan’ to reopen society.  https://www.bbc.co.uk/news/uk-52609952.  Updated: 2020-05-10. Accessed: 2020-06-14.
  * BBC News (2020b) BBC News (2020b).  Coronavirus: Boris Johnson’s address to the nation in full.  https://www.bbc.co.uk/news/uk-52011928.  Updated: 2020-03-23. Accessed: 2020-06-14.
  * Belloni et al. (2011) Belloni, A., V. Chernozhukov, and L. Wang (2011).  Square-root lasso: pivotal recovery of sparse signals via conic programming.  Biometrika 98(4), 791–806.
  * Bertsimas et al. (2016) Bertsimas, D., A. King, and R. Mazumder (2016, 04).  Best subset selection via a modern optimization lens.  Annals of Statistics 44(2), 813–852.
  * Bertsimas and Van Parys (2020) Bertsimas, D. and B. Van Parys (2020).  Sparse high-dimensional regression: Exact scalable algorithms and phase transitions.  Annals of Statistics 48(1), 300–323.
  * Bloomberg (2020) Bloomberg (2020).  China to lift lockdown over virus epicenter Wuhan on april 8.  https://www.bloomberg.com/news/articles/2020-03-24/china-to-lift-lockdown-over-virus-epicenter-wuhan-on-april-8.  Updated: 2020-03-24. Accessed: 2020-06-15.
  * Bühlmann and Yu (2003) Bühlmann, P. and B. Yu (2003).  Boosting with the $l_{2}$ loss.  Journal of the American Statistical Association 98(462), 324–339.
  * CBC News (2020) CBC News (2020).  Coronavirus: Here’s what’s happening in Canada and around the world on march 13.  https://www.cbc.ca/news/canada/coronavirus-updates-1.5496334.  Updated: 2020-03-13. Accessed: 2020-06-15.
  * Chen and Lee (2018) Chen, L.-Y. and S. Lee (2018).  Best subset binary prediction.  Journal of Econometrics 206(1), 39–56.
  * Chen and Lee (2020) Chen, L.-Y. and S. Lee (2020).  Binary classification with covariate selection through $\ell_{0}$-penalized empirical risk minimization.  Econometrics Journal.  forthcoming, https://doi.org/10.1093/ectj/utaa017.
  * Chernozhukov et al. (2020) Chernozhukov, V., H. Kasaha, and P. Schrimpf (2020).  Causal impact of masks, policies, behavior on early Covid-19 pandemic in the U.S.  arXiv:2005.14168.  https://arxiv.org/abs/2005.14168.
  * Cornea-Madeira (2017) Cornea-Madeira, A. (2017).  The explicit formula for the Hodrick-Prescott filter in a finite sample.  Review of Economics and Statistics 99(2), 314–318.
  * CTV News (2020) CTV News (2020).  Covid-19 in Quebec: A timeline of key dates and events.  https://montreal.ctvnews.ca/covid-19-in-quebec-a-timeline-of-key-dates-and-events-1.4892912.  Updated: 2020-05-23. Accessed: 2020-06-14.
  * de Jong and Sakarya (2016) de Jong, R. M. and N. Sakarya (2016).  The econometrics of the Hodrick-Prescott filter.  Review of Economics and Statistics 98(2), 310–317.
  * Delgado and Hidalgo (2000) Delgado, M. A. and J. Hidalgo (2000).  Nonparametric inference on structural breaks.  Journal of Econometrics 96(1), 113–144.
  * Dong et al. (2020) Dong, E., H. Du, and L. Gardner (2020).  An interactive web-based dashboard to track COVID-19 in real time.  The Lancet infectious diseases 20(5), 533–534.
  * Eichenbaum et al. (2020) Eichenbaum, M. S., S. Rebelo, and M. Trabandt (2020).  The macroeconomics of epidemics.  Working Paper 26882, National Bureau of Economic Research.
  * Fern’andez-Villaverde and Jones (2020) Fern’andez-Villaverde, J. and C. I. Jones (2020).  Estimating and simulating a SIRD model of COVID-19 for many countries, states, and cities.  https://web.stanford.edu/~chadj/.  Updated: 2020-05-29 (Version 2.01). Accessed: 2020-06-10.
  * Fu et al. (2017) Fu, A., B. Narasimhan, and S. Boyd (2017).  CVXR: An R package for disciplined convex optimization.  arXiv:1711.07582.  https://arxiv.org/abs/1711.07582.
  * Global News (2020) Global News (2020).  A timeline of the novel coronavirus in Ontario.  https://globalnews.ca/news/6859636/ontario-coronavirus-timeline/.  Updated: 2020-06-08. Accessed: 2020-06-14.
  * Hamilton (2018) Hamilton, J. D. (2018).  Why you should never use the Hodrick-Prescott filter.  Review of Economics and Statistics 100(5), 831–843.
  * Hartl et al. (2020) Hartl, T., K. Wälde, and E. Weber (2020).  Measuring the impact of the German public shutdown on the spread of Covid-19.  Covid Economics, Vetted and Real-Time Papers.  Issue 1, 3 April 2020.
  * Harvey and Kattuman (2020) Harvey, A. and P. Kattuman (2020).  Time series models based on growth curves with applications to forecasting coronavirus.  Covid Economics, Vetted and Real-Time Papers.  Issue 24, 1 June 2020.
  * Hastie et al. (2017) Hastie, T., R. Tibshirani, and R. J. Tibshirani (2017).  Extended comparisons of best subset selection, forward stepwise selection, and the lasso.  arXiv:1707.08692.  https://arxiv.org/abs/1707.08692.
  * Hethcote (2000) Hethcote, H. W. (2000).  The mathematics of infectious diseases.  SIAM Review 42(4), 599–653.
  * Hodrick and Prescott (1997) Hodrick, R. J. and E. C. Prescott (1997).  Postwar U.S. business cycles: An empirical investigation.  Journal of Money, Credit and Banking 29(1), 1–16.
  * Huang et al. (2018) Huang, J., Y. Jiao, Y. Liu, and X. Lu (2018).  A constructive approach to $l_{0}$ penalized regression.  Journal of Machine Learning Research 19(10), 1–37.
  * Kim et al. (2009) Kim, S.-J., K. Koh, S. Boyd, and D. Gorinevsky (2009).  $\ell_{1}$ trend filtering.  SIAM review 51(2), 339–360.
  * Kim et al. (2020) Kim, Y.-J., M. H. Seo, and H.-E. Yeom (2020).  Estimating a breakpoint in the pattern of spread of covid-19 in south korea.  International Journal of Infectious Diseases 97, 360–364.
  * Krispin (2020) Krispin, R. (2020).  coronavirus: The 2019 Novel Coronavirus COVID-19 (2019-nCoV) Dataset.  R package version 0.2.0 https://github.com/RamiKrispin/coronavirus.
  * Li and Linton (2020) Li, S. and O. Linton (2020).  When will the Covid-19 pandemic peak?  Working Paper 2020/11, University of Cambridge.  https://www.inet.econ.cam.ac.uk/research-papers/wp-abstracts?wp=2011.
  * Liu et al. (2020) Liu, L., H. R. Moon, and F. Schorfheide (2020).  Panel forecasts of country-level Covid-19 infections.  Working Paper 27248, National Bureau of Economic Research.
  * Ludvigson et al. (2020) Ludvigson, S. C., S. Ma, and S. Ng (2020).  Covid19 and the macroeconomic effects of costly disasters.  Working Paper 26987, National Bureau of Economic Research.
  * Manski (2020) Manski, C. F. (2020).  Bounding the predictive values of COVID-19 antibody tests.  Working Paper 27226, National Bureau of Economic Research.
  * Manski and Molinari (2020) Manski, C. F. and F. Molinari (2020).  Estimating the COVID-19 infection rate: Anatomy of an inference problem.  Journal of Econometrics.  forthcoming.
  * Mazumder et al. (2017) Mazumder, R., P. Radchenko, and A. Dedieu (2017).  Subset selection with shrinkage: Sparse linear modeling when the SNR is low.  arXiv:1708.03288.  https://arxiv.org/abs/1708.03288.
  * Office for National Statistics (2020) Office for National Statistics (2020).  Coronavirus (COVID-19) Infection Survey pilot: England.  https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/bulletins/coronaviruscovid19infectionsurveypilot/england21may2020.  Release date: 2020-05-21. Accessed: 2020-06-02.
  * Park et al. (2020) Park, S., Y. Kim, S. Yi, S. Lee, B. Na, C. Kim, and et al. (2020).  Coronavirus disease outbreak in call center, South Korea.  Emerging Infectious Diseases 26(8).  An early release version is available at: https://doi.org/10.3201/eid2608.201274.
  * Phillips and Shi (2019) Phillips, P. C. B. and Z. Shi (2019).  Boosting: Why you can use the HP filter.  arXiv:1905.00175.  https://arxiv.org/abs/1905.00175.
  * Pindyck (2020) Pindyck, R. S. (2020).  COVID-19 and the welfare effects of reducing contagion.  Working Paper 27121, National Bureau of Economic Research.
  * Ravn and Uhlig (2002) Ravn, M. O. and H. Uhlig (2002).  On adjusting the Hodrick-Prescott filter for the frequency of observations.  The Review of Economics and Statistics 84(2), 371–376.
  * Stock (2020) Stock, J. H. (2020).  Data gaps and the policy response to the novel coronavirus.  Working Paper 26902, National Bureau of Economic Research.
  * The New York Times (2020a) The New York Times (2020a).  How South Korea flattened the curve.  https://www.nytimes.com/2020/03/23/world/asia/coronavirus-south-korea-flatten-curve.html.  Updated: 2020-04-10. Accessed: 2020-06-15.
  * The New York Times (2020b) The New York Times (2020b).  How the coronavirus pandemic unfolded: a timeline.  https://www.nytimes.com/article/coronavirus-timeline.html.  Updated: 2020-06-09. Accessed: 2020-06-13.
  * The New York Times (2020c) The New York Times (2020c).  See how all 50 states are reopening.  https://www.nytimes.com/interactive/2020/us/states-reopen-map-coronavirus.html.  Updated: 2020-06-12. Accessed: 2020-06-13.
  * The New York Times (2020d) The New York Times (2020d).  See which states and cities have told residents to stay at home.  https://www.nytimes.com/interactive/2020/us/coronavirus-stay-at-home-order.html.  Updated: 2020-04-20. Accessed: 2020-06-06.
  * Tibshirani (2014) Tibshirani, R. J. (2014).  Adaptive piecewise polynomial estimation via trend filtering.  Annals of Statistics 42(1), 285–323.
  * Toda (2020) Toda, A. A. (2020).  Susceptible-infected-recovered (SIR) dynamics of Covid-19 and economic impact.  Covid Economics, Vetted and Real-Time Papers.  Issue 1, 3 April 2020.
  * Van Der Vaart and Wellner (1996) Van Der Vaart, A. W. and J. A. Wellner (1996).  Weak convergence.  Springer, New York, NY.
  * Wang et al. (2016) Wang, Y.-X., J. Sharpnack, A. J. Smola, and R. J. Tibshirani (2016).  Trend filtering on graphs.  Journal of Machine Learning Research 17(1), 3651–3691.
  * Xinhua (2020) Xinhua (2020).  Fighting Covid-19, China in action.  http://www.xinhuanet.com/english/2020-06/07/c_139120424.htm.  Updated: 2020-03-24. Accessed: 2020-06-15.