Forecasting for the Optimal Numbers of COVID ‐ 19 Infection to Maintain Economic Circular Flows of Thailand

: We evaluated the movement in the daily number of COVID ‐ 19 cases in response to the real GDP during the COVID ‐ 19 pandemic in Thailand from Q1 2020 to Q1 2021. The aim of the study was to find the number of COVID ‐ 19 cases that could maintain circulation of the country’s economy. This is the question that most of the world’s economies have been facing and trying to figure out. Our theoretical model introduced dynamic stochastic general equilibrium (DSGE) mod ‐ els with a special emphasis on Bayesian inference. From the results of the study, it was found that the most reasonable number of COVID ‐ 19 cases that still maintains circulation of the country’s econ ‐ omy is about 3000 per month or about 9000 per quarter. This demonstrates that the daily number of COVID ‐ 19 cases significantly affects the growth of Thailand’s real GDP. Economists and policy ‐ makers can use the results of empirical studies to come up with guidelines or policies that can be implemented to reduce the number of infections to satisfactory levels in order to avoid Thailand lockdown. Although the COVID ‐ 19 outbreak can be suppressed through lockdown, the country cannot be locked down all the time.


Introduction
The global outbreak of the COVID-19 pandemic has affected all countries in terms of economy, politics, and society. McKibbin and Fernando (2020) stated that the COVID-19 global pandemic has caused significant global economic and social disruption. Thailand has also been affected by the COVID-19 pandemic just as the world is experiencing. The spread of COVID-19 in Thailand can be divided into three waves until now. The first wave of the epidemic occurred in early 2020, the second wave started in late 2020, and the latest wave, or the third wave, started in late March or early April 2021.
The first wave of the outbreak of Thailand started at the beginning of last year. During January 2020, Thailand began to have foreign screening measures at Bangkok's Suvarnabhumi Airport. As a result of screening measures, Thailand found the first case of COVID-19 in the country. After finding the first confirmed cases of COVID-19, the Department of Disease Control has continued to monitor and screen passengers on planes. It has also closely and continuously monitored the situation of patients in foreign countries. After Thailand had started screening a number of patients, the Department of Disease Control and the Ministry of Public Health upgraded the emergency operations center to level 2 and level 3, respectively. The aim of raising the level of the emergency system was to closely monitor the situation of the disease both at home and abroad (source: Department of Disease Control, Ministry of Public Health). Soon after, the country experienced a new round of cluster outbreaks in public places such as entertainment venues, boxing stadiums, and religious ceremonies despite Thailand's strict tourist screening measures. This has led the country to carry out more stringent action such as lockdown measures in areas that are at risk of spreading the COVID-19 epidemic. Although Thailand is willing to use the economic damage from lockdowns as the cost to try to bring the number of infections in the country to zero for almost a year, a new wave of outbreaks has emerged.
A new wave of cases of the outbreak following the lockdown in the country occurred on 17 December 2020 at the Central Shrimp Market in Samut Sakhon province. This round of COVID-19 outbreaks was considered to be the second round of outbreaks in Thailand. In this wave, the infection was detected from foreign workers who came to work at the Central Shrimp Market. As this outbreak came from a group of workers, the infection spread rapidly due to a large concentration of labor in the area. From the cases of infected people in Samut Sakhon province, this time, the number of new cases in Thailand were found to be 576. Therefore, the Ministry of Public Health issued measures for control, involving carrying out space lockdown measures together with screening measures and proactive examination in various places. It is hoped that Thailand will be able to control the spread of the epidemic and control the number of infected people, instead of spreading or increasing the number of infected people. In addition, the Ministry of Public Health has prepared protective equipment, patient beds, medical supplies, and medicines to prepare for the treatment of patients with coronavirus. However, from the aforementioned preventive measures that have been implemented since the beginning of 2020 until the end of 2020, a number of new infections are still being found. Recently, Thailand has experienced a third wave of COVID-19 outbreaks in April 2021. By analyzing the number of confirmed cases, it can be concluded that this cycle had more cases than the previous wave of infections, as shown in Figures 1 and 2. Figure 1 shows the number of daily COVID-19 cases. The graph indicates that the number of daily infections increased sharply since the beginning of April as compared to the number of infections from the previous wave. With the latest figures reported (reference as of 13 July 2021), the number of infected people stood at 8685. Figure 2 shows the total COVID-19 cases in Thailand from January 2020 to July 2021. The graph shows that the cumulative number of infections from the beginning of 2020 to the middle of 2021 increased and the level of this increase was significant in April 2021. Based on the statistics of the number of infected cases shown, we can conclude that past preventive measures such as proactive screening measures or even lockdown measures have not been very effective as a guideline for tackling the spread of COVID-19, as we can see that the number of infected people has continued to increase.  After a third wave of COVID-19 pandemic outbreaks in April 2021, we have been aware of the increasing number of infections and their tendency to increase steadily; as a result, Thailand had to try to find other ways to solve the COVID-19 epidemic more effectively. Therefore, since April 2021, Thailand has started implementing a vaccination policy by distributing to at-risk groups or to medical personnel first. The statistics of the number of people who have been vaccinated in Thailand and the percentage of people who have been vaccinated in Thailand are shown in Figures 3 and 4.    Furthermore, Figure 5 also shows better signs that vaccinations are being distributed to all people with greater access to the COVID-19 vaccine and when compared with other Asian countries. Thailand has a higher level of vaccination distribution than other countries in Asia as well (see Figure 5). Thailand has the second highest number of vaccinated persons among ASEAN-10 countries after Indonesia, followed by Malaysia, Vietnam, Philippines, Cambodia, Singapore, Myanmar, Laos, and Brunei. Thailand has issued a policy of vaccination to prevent COVID-19 due to the large number of infected people. Vaccination measures have begun to be implemented with the distribution of vaccinations to various provinces across the country. It is hoped that vaccination will reduce the number of infected people. However, from the daily reports of infected people, the number of new cases in Thailand has continued despite the fact that Thailand has had more COVID-19 vaccinations. Moreover, the death rate has continued to rise since the April outbreak (see Figure 6). Figure 6 shows the total coronavirus deaths in Thailand. From Figure 6, it can be seen that the mortality rate tended to increase day by day, even after vaccination.   Figure 7, Thailand still has more cases than Singapore, Brunei, Myanmar, Vietnam, Cambodia, and Laos, although Thailand has more people who have been vaccinated. Therefore, all the data statistics support the idea that although Thailand has continuously increased COVID-19 vaccinations, it still cannot bring the infection down to a level where new infections are undetectable, and not anytime soon. However, we have not seen a trend to achieving control of this wave of disease anytime soon; in other words, Thailand has not been able to detect new infections. The authors have therefore tried to find the right number of infections during the crisis period in order to try to reduce the economic impact that will occur to the country. The number obtained from this study will be the number of new cases that also contribute to the country's real economy with the GDP that can continue to circulate. Therefore, based on all data, it has been accepted in this study that the country will be unable to limit the number of infections to zero in the near future. Due to the fact that Thailand does not have any new cases, causing the number of new infections to stay at zero, it may not be able to achieve this in the near-term. Although Thailand has continuously been vaccinating people, at the same time, the country's economy cannot be disrupted by the number of infections being found each day. This has caused researchers to realize the importance of this issue in trying to keep the country's economy circulating despite the number of infections found. This is something that the government should pay attention to because the country is not able to vaccinate everyone in the country at the moment, and the government cannot lock-down the whole country at the same time, because of the economic impact that will have. According to a study by Hürtgen (2020), it was stated that the "Great Lockdown" implemented in response to the COVID-19 pandemic led to a severe worldwide economic crisis. This demonstrates the opinion that limiting the number of infected people is the most appropriate method that can be carried out at this time to avoid the country's lockdown policy. For that reason, the researchers intended to find the optimal number of COVID-19 cases in Thailand to maintain circulation of the country's economy even though a number of people are still contracting infections.
In this study, we chose the model called dynamic stochastic general equilibrium (DSGE) with a Bayesian approach using modern macroeconomic theory to explain and predict co-movements of aggregate time series over the business cycle and to perform policy analysis. As the econometric analysis has to cope with several challenges, including potential model misspecification and identification problems, the Bayesian framework can address these challenges (An and Schorfheide 2007). This study is the first DSGE model-based Bayesian approach in analyzing the effects of COVID-19 infection to the Thai economy. Our contribution is to apply this method successively to an artificial dataset generated from a Bayesian DSGE model. We provided some evidence on the performance of Markov Chain Monte Carlo (MCMC) methods that have been applied to the Bayesian estimation of DSGE models. Moreover, we present the results about the response pattern of real GDP to the number of daily COVID-19 cases. The remaining parts of the paper are arranged as follows: the literature review is discussed in Section 2, Section 3 demonstrates the data and methodology, Section 4 presents the empirical results, and Section 5 finally describes the conclusions and policy recommendations.

Literature Review
There is much research that has studied the policy or the impact of policies used to deal with the COVID-19 pandemic, especially lockdown policy, e.g., Ng (2020), Alvarez et al. (2020), Gonzalez-Eiras andNiepelt (2020), andMaliszewska et al. (2020). Maliszewska et al. (2020) studied the potential impact of COVID-19 on gross domestic product and trade, using a general equilibrium model. They modeled the shock as an underutilization of labor and capital, an increase in international trade costs, a drop in travel services, and a redirection of demand away from activities that require proximity between people. A baseline global pandemic scenario saw gross domestic product falling below the benchmark around the world. The largest negative shock was the output of domestic services and traded tourist services. Ng (2020) studied macroeconomic analysis on the COVID-19 epidemic in the US and found that the lockdown policy alone was ineffective in controlling the epidemic. Broadening testing solely will accelerate the return to normal life as there are fewer infected people hanging around. However, as people do not internalize the social costs of returning to normal life, the epidemic could become even worse. Moreover, increasing medical capacity without any other measures only has temporary effects on reducing the death toll. Alvarez et al. (2020) studied the optimal lockdown policy in order to control the fatalities of a pandemic while minimizing the output costs of the lockdown by employing the SIR epidemiology model and a linear economy. The optimal policy prescribes a severe lockdown beginning two weeks after the outbreak and is gradually withdrawn after 3 months. Welfare under the optimal policy is higher; therefore, shortening the duration of the optimal lockdown is one of the considerations. Gonzalez-Eiras and Niepelt (2020) tried to determine formulas for the optimal lockdown intensity and duration. The optimal policy reflects the rate of time preference, epidemiological factors, the hazard rate of vaccine discovery, learning effects in the healthcare sector, and the severity of output losses due to a lockdown. COVID-19 shock triggers a reduction in economic activity by two thirds or approximately 9.5% of annual GDP.
The  (2021) explored the response of the "Great Lockdown" to the COVID-19 pandemic. This policy has led to a severe worldwide economic crisis, while Hürtgen (2020) found that fiscal space contracted by 58.4% of national GDP for the five largest euro area countries. In a worst-case scenario, fiscal space was at 28.6% for Italy and 65.9% of national GDP for Germany. Moreover,  found that the fiscal space contracted by 58.4% of national GDP on average. Boscá et al. (2021) analyzed the stabilizing macroeconomic effects of economic policies during the COVID-19 crisis in Spain by employing the DSGE model estimated for the Spanish economy. The empirical findings showed that the annual gross domestic product (GDP) fell by at least 7.6 points during the most severe part of the COVID-19 pandemic.
Furthermore, the DSGE model was extended into the DSGE model based on the Bayesian approach. There have been many studies that have reviewed Bayesian estimation and evaluation techniques that have been developed for empirical work with the DSGE model, e.g., An and Schorfheide (2007), Kim and Pagan (1995), and Canova (2007).
The concept of using the DSGE model-based Bayesian approach was because the Bayesian framework could address the challenges such as potential model misspecification and identification problems, while the econometric analysis could not do so. The DSGE modelbased Bayesian approach, which was extended from the original model of DSGE, was employed in various studies such as Zhang and Zhang (2020) and Nakhli et al. (2021). Zhang and Zhang (2020) investigated the economic and environmental effects of the carbon tax and carbon intensity target. The results indicate that both the carbon tax and carbon intensity target policies have a negative effect on China's economy and environment. Moreover, Nakhli et al. (2021) analyzed the effects of sanctions and found that sanctions on the oil industry had a number of impacts, such as reducing the amount of foreign and government investment. Moreover, in the financial and exchange sectors, sanctions reduce the central bank's foreign exchange reserve ratio, which slightly increases the exchange rate. As a result, nonoil exports increased and imports decreased. In the public sector, government oil revenues declined; however, consumption expenditures increased and investment expenditures declined due to projected inflation in the household sector. The conclusions from all previous studies indicated that the Bayesian DSGE model can be applied to all fields of analysis. This model demonstrates its usefulness for analysis in using macroeconomic data to analyze business cycles.

Bayesian Structural Time Series (BSTS) Analysis for Nowcasting
The Bayesian structural time series model is shown in Equation (1) where: x is the observed data;  is the parameter; (x | ) P  is the function of prior and likelihood; ( | x) P  is the function of posterior. This model is updated by learning x given , which is a likelihood. The Gaussian distribution and the Bayesian regression model can be employed in order to set the prior. The model can be shown as in Equation (2) where: n is the data; p is the size of the parameter; 2 s is given by Equation (4).
The local linear trend is the first component of the BSTS model for nowcasting without behavioral data from Google Trends. The local linear trend can be defined by the two following formulas: where:  is the expected increase in  between time t and t + 1.
Thus, it can be implied as a slope at time t. On the other hand, the data from Google Trends are included in the model from the modification of Equation (2).
Thus, it starts with Equation (2) where T t x  is the dimension of behavioral factors included into the structural time-series model.

DSGE Models
There are some pioneering studies on the Bayesian DSGE model, such as An and Schorfheide (2007), Kim and Pagan (1995), and the book by Canova (2007). The household, firm, and financial sectors can be considered in the economics model. Output is produced according to the Cobb-Douglas production function.
where: t K is the capital stock at the beginning of period (t); t N is the labor (input); t A is a technology.
The economics model is perturbated by technology and money stock processes. Technology is shown in Equation (11 (13). where: is the cash balance of the household; t F is the dividend of net cash inflow from firm to household; t B is the dividend of net cash inflow from bank to household; t C is the consumption; t H is the working hours; t D is the positive deposits.
Equation (14) is the financial equation. where: 1 t K  is the capital stock at the next period (t + 1); t N is the demand of labor; t F is the dividend; t L is the loans.
Equation (15) is the trivial problem that is solved by the financial intermediary.
where: t X is the monetary injection when As we assume that the household makes the decision   growth rates, the household cannot revise its deposit decision. Thus, the nominal interest rate falls as the firm absorbs the additional cash. Christiano and Eichenbaum (1992) stated that the household holds cash in order to make the liquidity persistently. The portfolio management cost is introduced, as shown in Equation (16).
where t Q is the household's cash holding when t t t Q M D   . Equation (7) can reduce the time available for leisure. Thus, the household's problem is shown in Equation (17).
The optimality conditions can be derived in order to maximize the problems. Thus, we can conclude that    Figure 9 shows the simulated dataset for real GDP and the number of COVID-19 infection cases. In this case, we simulated the dataset equaling 100 observations (n = 100). Table 2 shows the statistical dataset (n = 100) after simulating for real GDP and the number of COVID-19 infection cases. The minimum and maximum of the dataset of real GDP are 100,658 and 106,440, respectively. The median of the real GDP dataset is 103,981, while the median of the number of COVID-19 infection cases is 8369. The minimum and maximum of the datasets of the number of COVID-19 infection cases are 3936 and 14,071, respectively.   Figure 10. shows the simulated dataset for real GDP and the number of COVID-19 infection cases. In this case, we simulated a dataset equaling 250 observations (n = 250). Table 3. shows the statistical dataset (n = 250) after simulating for real GDP and the number of COVID-19 infection cases. The minimum and maximum of the dataset of real GDP are 102,286 and 120,152, respectively. The median of the real GDP dataset is 110,920, while the median of the number of COVID-19 infection cases is 16,146. The minimum and maximum of the dataset of the number of COVID-19 infection cases are 1448 and 24,751, respectively.   Figure 11 shows the simulated dataset for real GDP and the number of COVID-19 infection cases. In this case, we simulated a dataset equaling 500 observations (n = 500). Figure 11. The data simulation n = 500 (Source: author). Table 4 shows the statistical dataset (n = 500) after simulating for real GDP and the number of COVID-19 infection cases. The minimum and maximum of the dataset of real GDP are 100,978 and 166,756, respectively. The median of the real GDP dataset is 121,594, while the median of the number of COVID-19 infection cases is 32,161. The minimum and maximum of the dataset of the number of COVID-19 infection cases are 3623 and 66,321, respectively.

Regression Kink Model
In this case, after we simulated data equal to 100 observations, the kink model could be used. The turning point is 8588.128 (as shown in Figure 12 and Table A2 in Appendix A). From this number, it can be concluded that during each quarter of the COVID-19 pandemic outbreak, the study found that the optimal number of COVID-19 cases should not exceed 8588.128 cases per quarter. In addition, 5571.63 and 9972.63 are the lower-and upper-bound, respectively. Therefore, the number of infections can range from 5571.63 to 9972.63, which is considered the number of infections that will keep the country's economy circulating (see more detail in Appendix A). In this case, after we simulated data equal to 250 observations, the kink model could be used. The turning point is 12,365.55 (as shown in Figure 13 and Table A4 in Appendix A). Figure 13 shows the decline in GDP levels after passing the turning kink point. It can be concluded that if the number of infected people is more than 12,365.55 cases per quar-ter, the country's GDP tends to decrease significantly. Therefore, the number of such infections cannot keep the country's economy circulating in the future (see more detail in Appendix A) Figure 13. The relationship between number of COVID-19 infection cases and GDP in Thailand when n = 250 (source: author).
In this case, after we simulated data equal to 500 observations, the kink model could be used. The turning point is 22,843.47 (as shown in Figure 14 and Table A6 in Appendix A). Figure 14 shows the decline in GDP levels after passing the turning kink point. It can be concluded that if the number of infected people is more than 22,843.47 cases per quarter, the country's GDP tends to decrease significantly. Therefore, the number of such infections cannot keep the country's economy circulating in the future (see more detail Appendix A).

The Empirical Results of Bayesian DSGE Model
The result can be obtained that the number of infections is not more than 8600 per quarter or, on average, 3000 per month. Then, we predicted Q4 of 2021 to Q4 of 2024 (13 quarters) as the next period of time by employing the Bayesian DSGE Model.
In addition, where gp_obs is inflation (%) and gy_obs is GDP growth rate (%), they were predicted by the Bayesian DSGE model under the condition based on the optimal numbers of COVID-19 infection to maintain the economic circular flows of Thailand. The results show that the prediction from Q4 of 2021 to Q4 of 2024 (13 quarters), as shown in Figure 15, indicates that the inflation is not more than 2% and the GDP growth rate is not more than 3.5% (see more detail in Appendix A).

Conclusions, Discussions, and Policy Recommendations
We can answer the question, "At what number of COVID-19 cases could we still keep the country's economy circulating?" based on the results of this study. The optimal number of new infections of COVID-19 cases that can maintain the circulation of the economy is 8588 people per quarter or approximately 3000 people per month. In this study, we tried to avoid the use of lockdown policies, but, unfortunately, we cannot immediately reduce the number of infected people to zero in the near future. Thus, this led us to deem this number (8588) from the result of this study acceptable. After that, we used this information to analyze the Bayesian DSGE model in order to show the trends of the household sector, manufacturing sector, and financial sector. The empirical results showed that the inflation was not more than 2% and the GDP growth rate was not more than 3.5%. According to policy recommendations, the results of this study showed that if Thailand wants to keep its economy circulating, the country must try to limit/control the number of COVID-19 cases to no more than 8588 people per quarter, or on average, should not exceed 3000 people per month. However, if the number of new daily COVID-19 cases exceeds this number, the country's GDP will drop significantly.
The findings from this study offer important lessons for policymakers, as the government considers how policies should develop over the recovery phase of this crisis. Based on current data in July 2021, daily reports of new infections are still high with more than 10,000 new infections reported. Therefore, it can be concluded that in dealing with the COVID-19 pandemic, the implementation of the policy must be clearly more stringent than the previous time. There must be other policies rather than lockdowns as we have already seen that lockdowns alone, as Thailand has, cannot stop the spread of COVID-19. Expedited policies, including the vaccination policy for Thai people, should be accelerated in order to stop the infection and reduce the number of new infections every day. By vaccinating, vaccination should be allocated easily and be undisputedly accessible to people in all occupations. If both the public and private sectors in Thailand can act quickly and efficiently, the number of new cases of new infections in the country will be reduced in the near future. On the other hand, if Thailand fails to act effectively, the country's economy may become uncirculated as measures will not be effectively implemented for the ultimate goal of reducing the number of new daily COVID-19 cases. Therefore, the results of this study can be used as a guideline during the time when Thailand is accelerating vaccination but may not be 100% by knowing the number of infected people that make the economy still circulate. This is another way to manage and deal with the spread of COVID-19 in the future.
This study has some limitations that can be used as a future study guide because the study only focused on the number of COVID-19 cases that induced changes in real GDP. This study is a pioneer study as it is still too early to make an informed assessment of the full impact of the pandemic, especially about information of vaccination. Due to the study period of this work, we started from the beginning of the first wave of the epidemic, which was in early 2020. At that time, Thailand had not adopted a vaccination policy yet. In a future study, the vaccination policy can be employed to explore the optimal number of COVID-19 cases after everyone becomes vaccinated. The eventual optimal number of COVID-19 cases may be different, but it does convey the likely alternative of COVID-19 pandemic management apart from the lockdown policy in order to keep the economy circulating. Therefore, future studies should take other factors into account to make the number of infected people more flexible; for example, if we consider the number of vaccinations in the country, it may help increase the number obtained more than the result this time. However, due to this study, we used data since the beginning of the COVID-19 epidemic, and at that time, there were no vaccinations in Thailand. This makes this research a framework for only looking at the impact of the number of new infections on real GDP. Furthermore, we can try to consider extending the model with an indicator of hospitalized patients with COVID-19 to the future.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A a
Observations = 100 (quarterly data)      c Observations = 500 (quarterly data)