## 4 Discussion  
In this research, we show the adaptability of the cubic function to the epidemic curve of the cumulative number of cases, obtaining very good adjustments when applying it to the second wave of the COVID-19 pandemic in Spain. The suitability of third and fourth degree equations for pandemic prediction has already been suggested in the literature. For example, the cubic function has been used for the prediction of mortality associated with COVID-19 because of its ability to reflect growth in the peak of daily cases [22; 23] and has been tested, together with other equations, to predict the future development of the pandemic [24; 25]. The approach that is described in this work is different, since, on the one hand, it does not intend to make long-term predictions, nor predict the peak nor the end of the pandemic, and on the other, a totally empirical approach to the problem is made, which avoids an epidemiological hypothesis. The objective is also different, since a nowcasting methodology is developed and tested that offers real-time approximations of the situation of the spread of infections, which can be of great value to adequately manage the pandemic. When the seven day average of the cumulative number of cases (\(y^{*}\)) is used as a variable, very good estimates are obtained with the cubic function for periods of up to two months. For 65 days, between 29 June (\(x=127\)) and 1 September (\(x=191\)), the values of \(y^{*}\) in Spain fit almost perfectly the equation:  
\[y=0.4033x^{3}-126.19x^{2}+12,699.01x-156,382.60 \tag{5}\]  
Essentially, the algorithm is a kinematic analogy that describes the space, velocity, and acceleration of a moving object with varying acceleration. The use of successive sections of the cubic curve is motivated by the similarity between the obstacles that slow down a moving body and the NPIs that are implemented to mitigate the propagation or the factors or circumstances that accelerate it, such as the increase of mobility or easing of previous interventions. An epidemic in which no type of intervention is adopted could probably be represented almost entirely by a third-degree equation, excluding the initial and final phases with asymptotic behavior. Therefore, the corrections that are made in the algorithm when a new curve section is calculated indicate that unfavorable circumstances are occurring or that the adopted NPIs are effective. The results obtained in the predictions were satisfactory. The seven day predictions offer relative errors between \(-0.76\%\) and \(1.03\%\) (all of them within the margins of the favorable-unfavorable scenarios). The 14 day predictions present relative errors between \(-3.29\%\) and \(3.98\%\) (only four of them within the margins of the favorable-unfavorable scenarios). With the exception of seven of the observed \(y^{*}\) values, the remaining 117 are within the \(\pm 3\%\) range defined by the favorable and unfavorable predictions. The most stable part of the curve reflected in Figure 9, between 29 June and 1 September, represents an accelerated growth without obstacles, so the values predicted by the curves of sections T-2 to T-6 have very low relative errors with respect to the observed values (between \(-0.83\%\) and \(1.48\%\)). In this period, the acceleration grew linearly with a slope of \(3.9\) cases/day\({}^{2}\), which caused the speed to multiply by 26 in just over two months (the seven day moving average of daily cases went from 326 to 8529). During this period in Spain, there was a notable absence of decisive interventions to stop the second wave, which is most likely reflected in the fact that the data fit the cubic equation very well. It was not until 20 August when the Spanish health authorities recognized that the situation was worrying: \"... do not be fooled.