  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 $\textit{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 $\textit{contact growth rates}$ to
document and monitor outbreaks of COVID-19.
