Skip to main content
Elsevier - PMC COVID-19 Collection logoLink to Elsevier - PMC COVID-19 Collection
. 2020 Apr 22;729:138883. doi: 10.1016/j.scitotenv.2020.138883

SutteARIMA: Short-term forecasting method, a case: Covid-19 and stock market in Spain

Ansari Saleh Ahmar a,b,, Eva Boj del Val c
PMCID: PMC7175856  PMID: 32361446

Abstract

This study aimed to predict the short-term of confirmed cases of covid-19 and IBEX in Spain by using SutteARIMA method. Confirmed data of Covid-19 in Spanish was obtained from Worldometer and Spain Stock Market data (IBEX 35) was data obtained from Yahoo Finance. Data started from 12 February 2020–09 April 2020 (the date on Covid-19 was detected in Spain). The data from 12 February 2020–02 April 2020 using to fitting with data from 03 April 2020 – 09 April 2020. Based on the fitting data, we can conducted short-term forecast for 3 future period (10 April 2020 – 12 April 2020 for Covid-19 and 14 April 2020 – 16 April 2020 for IBEX). In this study, the SutteARIMA method will be used. For the evaluation of the forecasting methods, we applied forecasting accuracy measures, mean absolute percentage error (MAPE). Based on the results of ARIMA and SutteARIMA forecasting methods, it can be concluded that the SutteARIMA method is more suitable than ARIMA to calculate the daily forecasts of confirmed cases of Covid-19 and IBEX in Spain. The MAPE value of 0.036 (smaller than 0.03 compared to MAPE value of ARIMA) for confirmed cases of Covid-19 in Spain and was in the amount of 0.026 for IBEX stock. At the end of the analysis, this study used the SutteARIMA method, this study calculated daily forecasts of confirmed cases of Covid-19 in Spain from 10 April 2020 until 12 April 2020 i.e. 158925; 164390; and 169969 and Spain Stock Market from 14 April 2020 until 16 April 2020 i.e. 7000.61; 6930.61; and 6860.62.

Keywords: Covid-19, Short-term forecast, IBEX, SutteARIMA

Graphical abstract

Unlabelled Image

Highlights

  • Spain is the second highest country in the spread of Covid-19.

  • Lockdown as an effort to suppress the spread of Covid-19 caused the economy to be disrupted.

  • Forecasting can provide an overview of the conditions to come and can be used as a reference in decision making.

1. Introduction

According to the IMF (2018), global growth for 2017 has strengthened to 3.8% and has significantly increased in a global trade. Global growth was projected to rise to 3.9% in 2018 and 2019 before 3.8% in 2017. This growth was driven by an increase in the projected growth in developing markets and developing economies as well as rapid growth in developed countries. IMF also expected growth for 2018 and 2019 to increase by 0.2% annually compared to World Economics Outlook (WEO) in October 2017. In addition, IMF explained that the increase was also driven by the recovery in investment in developed countries, strong economic growth in developing countries in Asia, progress in developing countries of Europe, and signs of recovery in some commodity exporters. Furthermore, this growth was also supported by a strong impetus, the good market sentiment, the accommodative financial conditions, as well as domestic and international impact of the expansionary fiscal policy in the United States. Recovery in some commodity prices should allow a gradual increase in commodity exporters.

Today, the world is shocked by the epidemic called Covid-19. According to WHO, Covid-19 is a contagious and deadly disease that currently exists in the world. Covid-19 was first reported in Wuhan, Hubei Province, China in December 2019. Covid-19 is an infectious disease caused by a new coronavirus (SARS-CoV-2) discovered in China (Yang et al., 2020). Based on WHO (2020) data, as of 6 April 2020, there were 1,210,956 confirmed cases and 67,594 confirmed deaths. In Spain, Covid-19 cases began to be detected on 12 February 2020. The highest addition of Covid-19 cases occurred on 26 March 2020, as many as 8271 cases (Worldometer, 2020). Based on data presented by Worldometer on 8 April 2020, the number of confirmed cases of Covid-19 in Spain was 148,220 people with 14,792 deaths, and 48,021 people recovered and was the second highest country in the world with the confirmed cases of covid-19 (Worldometer, 2020).

To anticipate the many confirmed cases of Covid-19, Spain began lockdown on 14 March 2020 (France24, 2020), this lockdown also resulted in all restaurants, bars, hotels, schools and universities, all being closed and this will have an impact on the economy of the Spanish country especially Spain Market Index (IBEX 35) which experienced a decline of up to 14% at the closing of shares (McMurtry, 2020).

To determine more about the impact of lockdown and Covid-19, it is necessary to forecast the data. Time series data changes from time to time and sometimes it changes in an abruptly manner. To view these changes from time to time, estimates of the data need to be done. Forecasting or predictions related to Covid-19 have been studied by various researchers: (Fanelli and Piazza, 2020) studied the forecasting of the spread of covid-19 in China, Italy, and France using the SIRD model, (Roosa et al., 2020) studied about Covid-19 real-time forecast in China with generalized logistic growth model (GLM), (Benvenuto et al., 2020) examined the forecast of Covid-19 using ARIMA, and (Koczkodaj et al., 2020) predicted Covid-19 outside of China by using a simple heuristic (exponential curve).

2. Literature

2.1. Autoregressive Integrate Moving Average (ARIMA)

Autoregressive Integrate Moving Average (ARIMA) model first introduced by George Box and Gwilym Jenkins in 1976. The model of ARIMA is generally written with notation ARIMA (p,d,q), with p represents the order of the autoregressive (AR) process, d represents the differencing, and q states the order of the moving average (MA) process.

2.1.1. White noise process

In forming a time series model, the data must be stationary.

  • (1)

    the expected value of the time series does not depend on time, E(Z t) is independent of t, where t = time.

  • (2)

    the autocovariance function defined as Cov(Y tY t+k) for any lag k is only a function of k and not time; that is, γ(Y tY t+k), or γ(Y tY t+k) is independent of t for each k.

at~WN0σ2.

If and only if {a t} meets:

γt={σ2,0,t=0,t0. (2.1)

(Wei, 1994) added that white noise process{a t} stationary with autocorrelation function:

ρk={1,0,k=0k0,

and partial autocorrelation function:

ϕkk={1,0,k=0k0.

2.1.2. Autoregressive Model (AR)

The autoregressive model is a form of regression that links the observations of a particular moment with the values of previous observations at a specific time interval.

The form of autoregressive process the data order p (AR(p)) is generally formulate as (Wei, 1994):

Zt=ϕ1Zt1+ϕ2Zt2+...+ϕpZtp+at,at~WN0σ2,ϕi,tZt=ϕ1BZt+ϕ2B2Zt+...+ϕpBpZt+at,at~WN0σ2,ϕi,t1ϕ1Bϕ2B2...ϕpBpZt=at,at~WN0σ2,ϕi,t. (2.2)

The Eq. (2.2) can be simplified φ p(B)Z t = a t, with ϕ p(B) = 1 − ϕ 1 B − ϕ 2 B 2 − ... − ϕ p B p.

2.1.3. Moving Average Model (MA)

The moving average process is a process that the time series value at time t is influenced by the current error element and may be weighted in the past.

The general form of the process of moving average order q is expressed by MA (q) (Wei, 1994):

Zt=atθ1at1θ2at2...θqatq,at~WN0σ2,θi,t.Zt=i=0qϕiati,θ0=1,at~WN0σ2,ϕi,t. (2.3)
  • or can simplified as z t = θ q(B)a t, a t ~ WN(0,  σ 2), θ q ∈ , t ∈  with:

θqB=1θ1Bθ2B2...θqBq.

2.1.4. Autoregresive integrated moving average or ARIMA (p,d,q)

The (Z t) process are an autoregressive-moving average or ARMA (p, q) model if it fulfilled (Wei, 1994):

ϕpBZt=θqBat,at~WN0σ2,ϕp,θq,t. (2.3)
  • with φ p(B) = (1 − φ 1 B − φ 2 B 2 − ... − φ p B p) (for AR(p))

  • and θ q(B) = (1 − θ 1 B − θ 2 B 2 − ... − θ q B q) (for MA(q))

If there is a differencing then the ARIMA model becomes as follows:

ϕpB1BdZt=θqBat,at~WN0σ2,ϕp,θq,t.

with φ p(B) = (1 − φ 1 B − φ 2 B 2 − ... − φ p B p) (for AR(p)), (1 − B)d (for differencing non seasonal) and θ q(B) = (1 − θ 1 B − θ 2 B 2 − ... − θ q B q (for MA(q)).

2.2. α-Sutte Indicator

α-Sutte Indicator was developed using the principle of the forecasting method of using the previous data (Ahmar et al., 2018). They were also developed using the adopted moving average method. The moving average method is used to predict the trend history of the data. The α-Sutte Indicator uses 4 previous data (Z t−1, Z t−2, Z t−3, and Z t−4) as supporting data for forecasting and making the decision (Ahmar, 2018).

The equations of the α-Sutte Indicator method are as follows (Ahmar, 2018):

Zt=γΔxγ+δ2+βΔyβ+γ2+αΔzα+β23 (2.4)

where:

δ=Zt4γ=Zt3β=Zt2α=Zt1
Δx=γδ=Zt3Zt4Δy=βγ=Zt2Zt3Δz=αβ=Zt1Zt2
  • Z t = data at t time

  • Z t-k = data at (t – k) time

2.3. SutteARIMA

SutteARIMA is a forecasting method that combines the α-Sutte Indicator with ARIMA. The result of SutteARIMA are the average forecast results from the α-Sutte Indicator and ARIMA.

The Eq. (2.3), can be described as:

1ϕ1Bϕ2B2...ϕpBpZt=1θ1Bθ2B2...θqBqatZtϕ1BZtϕ2B2Zt...ϕpBpZt=atθ1Batθ2B2at...θqBqat (2.5)

While Eq. (2.5), can be reduced by using backward shift operator (B p Z t = Z tp):

Ztϕ1Zt1ϕ2Zt2...ϕpZtp=atθ1at1θ2at2...θqatqZt=ϕ1Zt1+ϕ2Zt2+...+ϕpZtp+atθ1at1θ2at2...θqatq (2.6)

If we define:

δ=Zt4γ=Zt3β=Zt2α=Zt1

The Eq. (2.6):

Zt=ϕ1α+ϕ2β+ϕ3γ+ϕ4δ+...+ϕpZtp+atθ1at1θ2at2...θqatq (2.7)

and the Eq. (2.4) can be simplified as:

Zt=γΔxγ+δ2+βΔyβ+γ2+αΔzα+β23
Zt=γΔxγ+δ2+βΔyβ+γ2+αΔzα+β23
Zt=γΔx3γ+3δ2+βΔy3β+3γ2+αΔz3α+3β2
Zt=2γΔx3γ+3δ+2βΔy3β+3γ+2αΔz3α+3β
Zt=γ2Δx3γ+3δ+β2Δy3β+3γ+α2Δz3α+3β

Let, Eq. (2.4) added with Eq. (2.7), we will find:

2Zt=ϕ1α+ϕ2β+ϕ3γ+ϕ4δ+...+ϕpZtp+atθ1at1θ2at2...θqatq+γ2Δx3γ+3δ+β2Δy3β+3γ+α2Δz3α+3β
Zt=αϕ12+Δz3α+3β+βϕ32+2Δy3β+3γ+γϕ32+2Δx3γ+3δ+ϕ4δ2+...+ϕpZtp2+at2θ1at12θ2at22...θqatq2 (2.8)

So, the Eq. (2.8) is the formula of SutteARIMA.

3. Methods

3.1. Data

Covid-19 Spanish confirmed data was obtained from Worldometer and Spain Stock Market data (IBEX 35) data was obtained from Yahoo Finance. Data started from 12 February 2020–09 April 2020 (the date on Covid-19 was detected in Spain). The data from 12 February 2020–02 April 2020 will using to fitting with data from 03 April 2020 – 09 April 2020. Based on the fitting data, we can conducted short-term forecast for 3 future period.

3.2. Statistical analysis

In making predictions or forecasting, there are several types of methods that can be used, including ARIMA, Holt-Winters, Double Exponential Smoothing, α-Sutte, SutteARIMA, and others. The methods used in this study were the SutteARIMA and ARIMA method will be used. Based on preliminary study of (Ahmar, 2019), the SutteARIMA can predict the trend of data.

The ARIMA method choosen because this method is used by several health researchers to monitor and predict the development of a disease, for example: (Anokye et al., 2018) used ARIMA to forecast malaria in Kumasi; (Liu et al., 2011) used ARIMA to forecast incidence of hemorrhagic fever with renal syndrome in China; (Zhang et al., 2014) used two decomposition methods (regression and exponential smoothing), autoregressive integrated moving average (ARIMA) and support vector machine (SVM) to forecast epidemiological surveillance data in Mainland China; (Molina et al., 2018) used ARIMA and ARIMAX to predict bovine trichomoniasis (BT) and bovine genital campylobacteriosis (BGC) prevalence and persistence in La Pampa (Argentina); (Wang et al., 2018) compared ARIMA and GM(1,1) models to predict the hepatitis B in China.

For the evaluation of the forecasting methods, we applied two forecasting accuracy measures, including mean absolute percentage error (MAPE) (Kim and Kim, 2016).

MAPE=1Nt=1NAtFtAt (2.9)

where:

  • A t = Actual values at data time t.

  • F t = Forecast values at data time t.

The results of this forecasting were obtained by using R Software with the forecast and SutteForecastR Package.

4. Results and discussion

Short-term daily estimates are important for making strategic decisions for the future. In the case of Covid-19, daily forecasting can provide information to decision makers to find a way to prevent the spreading of Covid-19.

Fig. 1 shows that the confirmed cases of Covid-19 in Spain will continue to grow until this curve is sloped. One of the weaknesses of time series forecasting is, it uses previous data experience as predictive data to be data of the study, so that predictions that are suitable for the Covid-19 case are short-term forecasting for 3–5 future periods. Fig. 1 also show the addition of confirmed cases of Covid-19 in Spain seems to be stabile in around 5000 cases every day.

Fig. 1.

Fig. 1

(a) Confirmed Cases of Covid-19 in Spain (12 February 2020–09 April 2020) (b) Daily New Cases of Covid-19 in Spain (12 February 2020–09 April 2020).

Since Covid-19 is established as a pandemic by WHO, the existence of lockdown or social restrictions will affect the economic development of a country. One crucial thing is the stock market, because with the existence of this pandemic, investors are starting to panic buying, so selling stock has resulted in a drop in stock prices. Moreover, based on WHO data on 9 April 2020, Spain became the second highest country with confirmed cases of Covid-19 in the world.

Fig. 2 shows that the closing price of the IBEX stock market has decreased from the beginning of Covid-19 in Spain (12 February 2020) and began to stabile on 24 March 2020 in around 6900 per share.

Fig. 2.

Fig. 2

Closing Price of IBEX Stock Spain (12 February 2020–09 April 2020).

Based on the description, the process of forecasting data was conducted using the ARIMA and SutteARIMA methods. The results are presented in Table 1 for confirmed cases of Covid-19 in Spain and Table 2 for IBEX Stock.

Table 1.

Results of fitting confirmed cases of Covid-19 in Spain.

Date Actual ARIMA APE SutteARIMA APE
03/04/2020 119199 120424 0.010 120425 0.010
04/04/2020 126168 128740 0.020 127990 0.014
05/04/2020 131646 137307 0.043 135531 0.030
06/04/2020 136675 145917 0.068 142134 0.040
07/04/2020 141942 154699 0.090 148668 0.047
08/04/2020 148220 163557 0.103 155430 0.049
09/04/2020 153222 172545 0.126 163200 0.065
MAPE 0.066 MAPE 0.036

Table 2.

Forecast for confirmed case of Covid-19 in Spain from 10 April to 12 April 2020.

Date Forecast Lower 99% Higher 99%
10/04/2020 158925 157336 160498
11/04/2020 164390 162746 166017
12/04/2020 169969 168269 171651

Table 1 shows that the SutteARIMA method is most appropriate method for predicting the confirmed cases of Covid-19 in Spain with MAPE value of 0.036 (smaller than 0.03 compared to MAPE value of ARIMA(2,2,1)). So, the SutteARIMA method will be used to predict confirmed cases of Covid-19 from 10 April 2020 to 12 April 2020 (Table 2).

Based on Table 3 , as the SutteARIMA method is also the most appropriate method for this time series than ARIMA(0,1,0) with drift. So, the SutteARIMA used to forecast the IBEX Stock from 14 April 2020 to 16 April 2020 (Table 4 ).

Table 3.

Results of fitting data of IBEX Stock.

Date Actual ARIMA APE SutteARIMA APE
03/04/2020 6579.40 6692.61 0.017 6698.86 0.018
04/04/2020 6574.10 6599.81 0.004 6557.42 0.003
05/04/2020 6581.60 6507.02 0.011 6526.98 0.008
06/04/2020 6844.30 6414.22 0.063 6464.48 0.055
07/04/2020 7002.00 6321.43 0.097 6627.87 0.053
08/04/2020 6951.80 6228.64 0.104 6687.79 0.038
09/04/2020 7070.60 6135.84 0.132 6606.71 0.066
MAPE 0.061 MAPE 0.035

Table 4.

Forecast for closing price of IBEX from 14 April to 16 April 2020.

Date Forecast Lower 99% Higher 99%
14/04/2020 7000.61 6930.60 7069.91
15/04/2020 6930.61 6861.30 6999.22
16/04/2020 6860.62 6792.01 6928.54

Based on forecasting results, we can conclude that SutteARIMA method is the most suitable forecasting method to forecast confirmed cases of Covid-19 in Spain and closing price of IBEX. This can be verified by the value of forecasting accuracy measures (MAPE), SutteARIMA method is considered as the best method for all data.

5. Conclusion and Further Research

Forecasting of Covid-19 and IBEX Stock in Spain can contribute an idea of the policy maker to make decision for the future. In fitting data Covid-19 and IBEX Stock in Spain from 03 April 2020 to 09 April 2020, the SutteARIMA method is more suitable than ARIMA method. The confimed cases of Covid-19 of Spain on 12 April 2020 was in the amount of 169,969 with interval value 168,269–171,651 cases, and the closing price of IBEX Stock on 16 April 2020 was in the amount of 6860.62 with interval value 6792.01–6928.54. Based on the forecast, the policy maker can utilize it to make a policy for future studies. For further research, this method can be compared with other methods, for example with Neural Network or others forecasting method.

CRediT authorship contribution statement

Ansari Saleh Ahmar: Conceptualization, Methodology, Data curation, Formal analysis, Visualization, Writing - original draft. Eva Boj del Val: Writing - review & editing, Validation, Supervision.

Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Editor: Jianmin Chen

References

  1. Ahmar A.S. A comparison of α-Sutte Indicator and ARIMA methods in renewable energy forecasting in Indonesia. Int. J. Eng. Technol. 2018;7:20–22. [Google Scholar]
  2. Ahmar A.S. Working Paper; 2019. Reliability test of SutteARIMA to forecast artificial data. [DOI] [Google Scholar]
  3. Ahmar A.S., Rahman A., Mulbar U. α- Sutte Indicator: a new method for time series forecasting. J. Phys. Conf. Ser. 2018;1040 [Google Scholar]
  4. Anokye R., Acheampong E., Owusu I., Isaac Obeng E. Time series analysis of malaria in Kumasi: using ARIMA models to forecast future incidence. Cogent Soc. Sci. 2018;4 doi: 10.1080/23311886.2018.1461544. [DOI] [Google Scholar]
  5. Benvenuto D., Giovanetti M., Vassallo L., Angeletti S., Ciccozzi M. Application of the ARIMA model on the COVID-2019 epidemic dataset. Data Br. 2020;29:105340. doi: 10.1016/j.dib.2020.105340. [DOI] [PMC free article] [PubMed] [Google Scholar]
  6. Brockwel P.J., Davis R.A. 2nd ed. Springer-Verlag; New York, NY: 2006. Time Series: Theory and Methods. [Google Scholar]
  7. Brockwell P.J., Davis R.A. 2nd ed. Springer; New York: 2016. Introduction to Time Series and Forecasting. [Google Scholar]
  8. Fanelli D., Piazza F. Analysis and forecast of COVID-19 spreading in China, Italy and France. Chaos, Solitons Fractals. 2020;134 doi: 10.1016/j.chaos.2020.109761. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. France24 Spain announces lockdown after reporting 1,500 new coronavirus cases in a day [WWW document] 2020. https://www.france24.com/en/20200314-spain-to-announce-lockdown-after-reporting-1-500-new-coronavirus-cases-in-a-day
  10. IMF . IMF; 2018. World Economic Outlook (WEO) World Economic Outlook, April 2018 Cyclical Upswing, Structural Change. [Google Scholar]
  11. Kim S., Kim H. A new metric of absolute percentage error for intermittent demand forecasts. Int. J. Forecast. 2016;32:669–679. doi: 10.1016/j.ijforecast.2015.12.003. [DOI] [Google Scholar]
  12. Koczkodaj W.W., Mansournia M.A., Pedrycz W., Wolny-Dominiak A., Zabrodskii P.F., Strzaška D., Armstrong T., Zolfaghari A.H., Debski M., Mazurek J. 1,000,000 cases of COVID-19 outside of China: the date predicted by a simple heuristic. Glob. Epidemiol. 2020 doi: 10.1016/j.gloepi.2020.100023. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Liu Q., Liu X., Jiang B., Yang W. Forecasting incidence of hemorrhagic fever with renal syndrome in China using ARIMA model. BMC Infect. Dis. 2011;11:218. doi: 10.1186/1471-2334-11-218. [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. McMurtry A. COVID-19: Spain unveils lifeline amid stock market bust. 2020. https://www.aa.com.tr/en/latest-on-coronavirus-outbreak/covid-19-spain-unveils-lifeline-amid-stock-market-bust/1764097 [WWW Document]. URL. (accessed 4.9.20)
  15. Molina L.L., Angón E., García A., Moralejo R.H., Caballero-Villalobos J., Perea J. Time series analysis of bovine venereal diseases in La Pampa, Argentina. PLoS One. 2018;13 doi: 10.1371/journal.pone.0201739. [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Montgomery D.C., Jennings C.L., Kulahci M. John Wiley & Sons; New Jersey: 2015. Introduction to Time Series Analysis and Forecasting. [Google Scholar]
  17. Roosa K., Lee Y., Luo R., Kirpich A., Rothenberg R., Hyman J.M., Yan P., Chowell G. Real-time forecasts of the COVID-19 epidemic in China from February 5th to February 24th, 2020. Infect. Dis. Model. 2020;5:256–263. doi: 10.1016/j.idm.2020.02.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Wang Y., Shen Z., Jiang Y. Comparison of ARIMA and GM(1,1) models for prediction of hepatitis B in China. PLoS One. 2018;13 doi: 10.1371/journal.pone.0201987. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Wei W.W.S. Addison-Wesley Publishing Company; New York: 1994. Time Series Analysis: Univariate and Multivariate Methods. [Google Scholar]
  20. WHO Situation report - 77 coronavirus disease 2019 (COVID-19) 2020. https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situation-reports/ WWW Document.
  21. Worldometer Spain coronavirus. 2020. https://www.worldometers.info/coronavirus/country/spain/ WWW Document.
  22. Yang Y., Peng F., Wang R., Guan K., Jiang T., Xu G., Sun J., Chang C. The deadly coronaviruses: the 2003 SARS pandemic and the 2020 novel coronavirus epidemic in China. J. Autoimmun. 2020 doi: 10.1016/j.jaut.2020.102434. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Zhang X., Zhang T., Young A.A., Li X. Applications and comparisons of four time series models in epidemiological surveillance data. PLoS One. 2014;9 doi: 10.1371/journal.pone.0088075. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from The Science of the Total Environment are provided here courtesy of Elsevier

RESOURCES