In this work, we provide a general mathematical formalism to study the optimal control of an epidemic, such as the COVID-19 pandemic,
via
incentives to lockdown and testing. In particular, we model the interplay between the government and the population as a principal–agent problem with moral hazard,
à la
Cvitanić et al. (Finance Stoch 22(1):1–37, 2018), while an epidemic is spreading according to dynamics given by compartmental stochastic SIS or SIR models, as proposed respectively by Gray et al. (SIAM J Appl Math 71(3):876–902, 2011) and Tornatore et al. (Phys A Stat Mech Appl 354(15):111–126, 2005). More precisely, to limit the spread of a virus, the population can decrease the transmission rate of the disease by reducing interactions between individuals. However, this effort—which cannot be perfectly monitored by the government—comes at social and monetary cost for the population. To mitigate this cost, and thus encourage the lockdown of the population, the government can put in place an incentive policy, in the form of a tax or subsidy. In addition, the government may also implement a testing policy in order to know more precisely the spread of the epidemic within the country, and to isolate infected individuals. In terms of technical results, we demonstrate the optimal form of the tax, indexed on the proportion of infected individuals, as well as the optimal effort of the population, namely the transmission rate chosen in response to this tax. The government’s optimisation problems then boils down to solving an Hamilton–Jacobi–Bellman equation. Numerical results confirm that if a tax policy is implemented, the population is encouraged to significantly reduce its interactions. If the government also adjusts its testing policy, less effort is required on the population side, individuals can interact almost as usual, and the epidemic is largely contained by the targeted isolation of positively-tested individuals.