A mathematical model and forecast for the coronavirus disease COVID-19 in Spain

(B. A. Alyokhin, B. V. Burkynskyi, A. B. Brutman, A. I. Laiko, N. Z. Sokolovska)

Forecast monitor

22.05.2020. No 79.


The latest forecast of the COVID-19 outbreak in Spain has been published on May 5th (see https://www.facebook.com/ab.alyokhin/posts/135852118057692). Yesterday, on May 21 a final analysis of the forecast accuracy was published (https://www.facebook.com/ab.alyokhin/posts/142548897388014) according to the statistics for the whole forecasting period (May 5–20, 2020).

Today we introduce a new forecast of the outbreak in Spain for a 10-day period (May 22–31, 2020) and 30-day period (May 22 — June 20, 2020). However, before we give the latest estimates of the previous forecast accuracy taking into account actual data as of May 21st, 2020 inclusive.

The results of analysis for the period from May 5 till May 21, 2020 (actual forecast period is 17 days) are given in tables Fig. 1, 2.

In table. 1 the calculated and actual values of the main indicators of coronavirus outbreak in Spain for the whole forecast period are indicated, absolute and relative errors of daily forecasts and mean absolute error MAE and mean absolute percentage error MAPE as a whole.

Table. 2 shows the same data for the case fatality rates I(TC) and I(CC), as well as the progress indicator IP.

As can be seen from these tables, the most of the outbreak’s indicators are forecasted with very high accuracy. Assessment of the criterion MAPE is typically considered very high up to 10%.

The results of the new forecast considering the statistical data accumulated until May 21, 2020 inclusive, are shown in Fig. 3–15

Before presenting the forecast results, let’s pay attention to the following important circumstance.

Our interdepartmental initiative group has 2-month experience of practical modeling and forecasting of outbreaks in different countries and regions of the world, in various stages of development. However, even without such experience, statistical and visual analysis of the trajectories of the actual values of the outbreak’s main parameters in different countries shows that in the final stages, the nature of these trajectories is greatly simplified (see e.g. Fig. 1–2, 12–15). Such trajectories correspond to the trajectories indicated in red on all our graphs. The only exceptions are the trajectories of the outbreaks’ daily indicators change that almost all of the life cycle have a sawtooth character with a tendency to decrease the variability level by the end of the outbreak (see Fig. 9–12). In system forecasting modelling the trajectory of these indicators are derived from the forecasted trajectories of cumulative indicators (cumulative reported cases, deaths, etc.), and therefore, do not create additional complications when forecasting the entire set of main indicators of outbreaks.

Due to such features of the COVID-19 outbreak, the forecast of “mature” outbreaks is greatly simplified; the accuracy of even the simplest forecasting models is greatly increased, and, as a result, there are the quantitative forecasts by various authors with their accuracy estimates began to appear in media. For our group, which published not only forecasts, but also estimates of their accuracy as soon as actual statistics become available, from the first days of this activity (from March 21, 2020), the “mature” (predictable) outbreaks are of less scientific interest. In this regard, such “mature” outbreaks, like the outbreak in Spain, will gradually disappear from our forecast monitors.

Now let’s get on directly to the forecast of the COVID-19 outbreak in Spain for the period of May 22–31, 2020 and till June 20, 2020.

Fig. 3–6 indicate as follows:

– actual trajectories of the main indicators of the coronavirus outbreak in Spain until May 21, 2020;

– calculated trajectory of these indicators with 10-day forecast (May 22–31, 2020);

– confidence intervals limits (ranges of possible deviations of the 10-days point forecast with a significance level of p=0.01).

Fig. 3–6 give a visual representation of how the actual data are consistent with the calculated ones. It follows from these graphs that the quality of approximation of the actual data by theoretical curves (for the whole pre-forecast period) is extremely high (the lowest value of determination coefficient R2 for the indicators as presented in fig. 3–6, exceeds 0,997).

Fig. 7 and 8 indicate the cumulative reported cases (about 285 thousand people) and deaths (more than 28 thousand people) by the time the outbreak in this country reaches its final level (the progress indicator IP value — 100%, see the value of progress indicator at the end of the forecast period, Fig. 15).

The graphs in Fig. 9–12 reflect as follows:

– actual trajectories of the indicators’ daily changes of the outbreak in Spain;

– calculated trajectory of these indicators nearly throughout its life cycle (up to 100 %);

– confidence intervals limits (p=0,3), corresponding to the 10- day forecast (for the period of May 22–31, 2020).

Let’s note, that the daily indicators are extremely difficult objects for forecasts, because of their great variability, due to the complexity of the forecasted processes. This explains the wide confidence intervals of the forecasts of these indicators, and a relatively high probability of error of the forecasts.

The graphs indicate which way the outbreak in Spain has passed. In particular, the graphs with daily growth of cumulative reported cases (Fig. 9) demonstrates that a second local peak in Spain could not be avoided after easing the quarantine. It is easy to calculate, using the model, how many citizens gave their lives for the adopted version quarantine measures.

Fig.13–15 reflect the following parameters of the coronavirus outbreak in Spain:

- actual trajectory of the fatality rates I(TC) and I(CC) and IP progress indicator for the entire observed period;

- calculated trajectories of the indicators for the entire observed period, including 30-day forecast (as can be seen from these graphs, this period practically coincides with the forecast life cycle of the outbreak).

It follows from the graphs that the accuracy of reproduction by the model of the actual values of case fatality rates and indicator of progress is quite high. Considering that both the fatality rates (I(TC) and I(CC)) at the end of the outbreak should reach the same level, it can be expected that the final fatality rate in this country is around 10%.

In our view, the forecasts of mature outbreaks, are useful for the leaders the countries, the coronavirus outbreaks are at earlier stages. Knowledge of the main indicators’ regularities of such outbreaks, can avoid mistakes (considering a positive experience) of their colleagues who were faced with such situation earlier than others.


Source of statistics:



Our publications:


Our initiative group and mission:


Our publications on case fatality rates and indicator of progress:




Official page of the state scientific institution Institute of Market Problems and Economic-Ecological Research of the National Academy of Sciences of Ukraine