  Inferring the uncertainty in economic conditions is significant for both
decision makers as well as market players. In this paper, we propose a novel
approach to measure the economic uncertainties by using the Hidden Markov Model
(HMM). We construct a dimensionless index, Economic Condition Uncertainty (ECU)
index, which ranges from zero to one and is comparable among sectors, regions
and periods. We used the daily electricity consumption data of more than 18,000
firms in Shanghai from 2018 to 2020 to construct the ECU indexes. Results show
that all ECU indexes, whether at sectoral or regional level, successfully
captured the negative impacts of COVID-19 on Shanghai's economic conditions.
Besides, the ECU indexes also presented the heterogeneities in different
districts as well as in different sectors. This reflects the facts that changes
in the uncertainty of economic conditions are mainly related to regional
economic structures and targeted regulatory policies faced by sectors. The ECU
index can also be readily extended to measure the uncertainty of economic
conditions in various realms, which has great potentials in the future.
