A Short Term Forecasting Model for the Spanish GDP and its Demand Components

This paper proposes a new version of the Spain-STING (Spain, Short-Term INdicator of Growth), a dynamic factor model used by the Banco de España for the short-term forecasting of the Spanish economy. The extended and revised version of the Spain-STING presented in this document includes a forecast for each of the demand components of the National Accounts. In order to select the indicators that best estimate the Spanish GDP and its demand components, several models are considered. Following this strategy, the selected models are those in which the common factor explains the highest proportion of the variance of the GDP. These models allow us to forecast GDP, private consumption, public expenditure, investment in capital goods, construction investment, exports and imports in a consistent way. We assess the predictive power of the models for GDP and its demand components for the period 2005–2017. With regard to the GDP forecast, we find some improvement of the predictive power compared to the previous version of Spain-STING. As for the demand components, we show that our proposal has better predictive power than other possible time series models. Article History: Received: June 12 2019 / Revised: August 21 2019 / Accepted: October 2 2019


Introduction
The analysis of the economy's short-term situation, and the projection of its future course, are fundamental tasks of central banks and national and international institutions. The monitoring of the economic cycle and the conducting of short and medium-term macroeconomic projection exercises require work that involves drawing together the latest economic indicators within the framework of the national accounts.
The Spain-STING (Spain, Short-Term INdicator of Growth) model is a short-term forecasting tool (e.g. one or two quarters ahead) for the quarterly growth rate of the Spanish economy's in real time GDP [see Perez-Quiros (2009, 2011)], i.e., as new data on the explanatory variables are published. This model is made up of GDP, in a quarterly frequency, and ten monthly economic indicators that offer information on recent economic developments. It jointly models the dynamics of each of its eleven variables (GDP + ten indicators) and distinguishes between a common part (that is captured by the common factor) and an idiosyncratic part associated with each of these variables. This tool enables forecasts to be made on the variables included in the model, taking into consideration both the predictive power of each variable and the availability of information. The model has been used as an internal short-term forecasting tool at the Banco de España since late 2009. 1 This document makes a twofold contribution. First, we extend the Spain-STING model in three ways: (i) the indicators originally introduced in the model have been modified in order to increase the explanatory power of the tool. For instance, credit to non-financial corporations, which improved the explanatory power during the last recession, is introduced; (ii) the indicators are included in monthly-on-monthly growth rates, instead of year-on-year growth rates. This entails a technical improvement, given that GDP is measured in quarter-on-quarter terms, when the indicators were considered in year-on-year rates, a lagged structure was assumed between the growth rate of the GDP and each indicator; (iii) the indicators are allowed to affect our variable of interest (the GDP growth rate) with a leading behavior depending of their highest correlation with the GDP and the percentage of variance explained. Specifically, there are three leading indicators (despite being dated at a certain period "t", they are related to the activity in a later period), such as consumption of cement and two survey-based indicators (Economic Sentiment Indicator -ESI-and Purchasing Managers Index -PMI-), which in their original version were specified contemporaneously.
Second, the new proposal is designed expressly to incorporate forecasts of all the demand components of the Spanish economy's macroeconomic aggregates: private consumption, public expenditure, investment in capital goods, construction investment, exports and imports. 2 The estimation is carried out by means of individual dynamic factor models. The estimation of all the macroeconomic aggregates allows us not only to forecast real-time GDP but also to incorporate information on the components that explain the forecast, making it possible to deepen the analysis of the causes behind changes in GDP forecasts. Furthermore, this short-1 There is also a similar model for economic forecasting in the euro area. See Camacho and Perez-Quiros (2010) and Burriel and García (2013). 2 Arencibia et al. (2017a) present a brief summary of this model. term forecasting model for the GDP and its demand components is estimated in a consistent way, using a balancing procedure. This means that all the individual predictions are globally consistent when they are aggregated. Finally, the predictive power of the new version of the Spain-STING and the six demand components is assessed for the period 2005-2017. With regard to the GDP forecast, we find some improvement on the previous version of Spain-STING in terms of explained GDP. As for the demand components, we show that our proposal is better than other possible alternatives.
As for the literature, some central banks have tools of this type. The recent advances made by the Federal Reserve Bank of Atlanta with its GDPNow project and the Federal Reserve Bank of New York's Nowcast project merit a mention. In the case of the Spanish economy, solely AIReF with its MIPRED model has a similar model [see Cuevas et al. (2015)]. Nevertheless, Banco de España uses different additional methodologies to carry out forecasting exercises. See, for instance, Álvarez et al. (2014). Some central banks use bridge models (see, e.g., Piette and Langenus, 2014) and mixed-frequency models (see, e.g., Marcellino et al., 2016). Furthermore, a number of satellite models that focus on specific aspects of the economy and provide input for the main model are also used. These models are used to estimate, amongst others, potential output, 3 the NAIRU or house prices.
Regarding macroeconomic models, many central banks combine medium to large-scale structural econometric models with various other tools. In general, structural macroeconometric models are used to provide a baseline projection in a coherent framework. 4 These structural models differ in terms of size, scope, degree of underlying microfoundations, treatment of the financial sector and the modelling of expectations.
The rest of the paper is structured as follows. Section 2 describes the econometric methodology and the characteristics of the set of indicators that are part of the database used to forecast GDP. In section 3, the models for the different demand components and the aggregation method used so as to have a consistent overall forecast are presented. Section 4 analyses, firstly, the new model's predictive power for GDP which is compared with that of the previous model and, secondly, the forecasting performance of the different demand components models relative to alternative time series models. Finally, Section 5 concludes.

Description of the GDP Model
In this section, we explain in detail the model to compute short term forecasts of the Spanish GDP growth in real time from a wide set of indicators that may include mixed frequencies and missing observations.
The characteristics of this model enable a response to be given to various problems of forecasting GDP in real time. Specifically, the Spain-STING model is constructed with: (i) information that is not balanced out at the end of the sample (i.e. combining indicators released with a lag with others which, by their nature, are available sooner); (ii) a mix of frequencies (i.e. with monthly indicators to bring forward the quarterly GDP growth rate); (iii) different types of data (survey-based and real activity indicators); and (iv) data that are not always available for the whole sample analysed. There are missing data in some time series.
The Spain-STING model captures the dynamics of each indicator (including those of GDP) and distinguishes between a common part, captured in the factor, and an idiosyncratic part, which determines the movements of each of the indicators not explained by the dynamics of that common factor. Under this system, the developments in each indicator help anticipate the trend of the common component and, therefore, that of GDP. As a result, the forecast is made taking into account the predictive power of each variable and the availability of information, which enables the relative significance of each indicator for the forecasting of GDP to be adjusted.

Methodology
The Spain-STING tool, based on Perez-Quiros (2009, 2011), is a small-scale dynamic factor model made up of GDP, whose publication is quarterly and several monthly indicators. In the specification considered in this paper, there are ten monthly indicators, eight of which relate to real activity (the non-energy industrial production index, General Social Security Regime registrations, real sales by large non-financial corporations, electricity consumption in industry, apparent consumption of cement and real goods exports and imports), and two to survey-based data [PMI and ESI (Economic Sentiment Indicator)]. 5 However, these indicators are not the same than those included in the original version of the model, as explained below. This type of model obtains early estimates of quarterly GDP growth through monthly indicators whose information is posthaste available. In order to link monthly data with quarterly observations, it is required to express quarterly growth rates observations as the evolution of monthly figures. To accomplish this, let us assume that the levels of the quarterly GDP can be decomposed as the sum of three unobservable monthly values of GDP. If the sample mean of these three data can be adequately approximated by the geometric mean, the quarterly growth rate of GDP can be expressed as the average of monthly growth rates of latent observations, as it is shown by Mariano and Murasawa (2003): where y t is the quarterly growth rate of GDP and x t the monthly growth rates.
One must note that approximating sample means with geometric means is appropriate due to the fact that the evolution of macroeconomic series is smooth enough to allow for this approximation.
The mechanism described above displayed two econometric problems. The first one is that the procedure is specified in monthly frequencies. Thus it requires to estimate unobserved components such as monthly growth rates and quarterly growth rates for the first two months of each quarter. The other difficulty is given by the use of some series that start too late and some (those with longer publication delays) that end too soon, which causes many missing observations. The appropriate tool to deal with these disadvantages are dynamic factor models. These models are also suitable to characterize comovements in macroeconomic variables that admit factor decompositions. The premise of a dynamic factor model is that the dynamic of each series can be decomposed into two orthogonal components. The first component, named common component and denoted by f t , captures the collinear dynamics affecting all variables. It can be interpreted as a coincident indicator of the GDP growth rate. The second component, named idiosyncratic component and denoted for each indicator j by u jt , captures the effect of those dynamics which only affect that specific indicator. Let x t be the monthly GDP growth rate and let z t be the k-dimensional vector of economic indicators in monthly growth rates (hard indicators) or levels (soft indicators). 6 The model can then be stated as: where u zt = (u 1t , u 2t , . . . , u kt ). The (k + 1) parameters in β capture the correlation between the unobserved common factor and the variables and are known as the factor loadings. Furthermore, we assume the following dynamic specification for the variables where φ y (L), φ f (L) y φ i (L) are lag polynomials of order p, q and r, respectively. 7 Additionally, we consider that all the errors in these equations are independent and identically normal distributed with zero mean and diagonal covariance matrix.
When all the variables are observed in each period, the model can be easily stated in statespace representation which can be estimated by maximum likelihood procedures [see Hamilton (1994)]. The Kalman filter is the natural statistical method to deal with missing observations. However, and following Mariano and Murasawa (2003), first we have to replace missing observations using random values obtained from a standard normal distribution independent of the model parameters, and rewrite the state-space model accordingly. The substitutions allow the matrices in the state-space representation to be similar. However, they do not impact on the model estimation because the missing observations only add a constant in the likelihood function to be estimated by the process. After that procedure, we can apply the standard Kalman filter to evaluate the likelihood function.
The model can be written in state space form. Let us collect the quarterly growth rates of GDP (y t ) and the monthly growth rates of the ten indicators (z ′ t ) in the vector Y t = (y t , z ′ t ) ′ .
6 Introducing indicators in levels creates the problem of mixing integrated and stationary variables in the same specification. We solve this issue by considering, as pointed out by the European Commission (2006), that soft indicators are related to the annual growth rates of the variable of interest. Therefore, the level of the soft indicators depends on a 12 month moving average of the common factor, and this is the source of its unit root. 7 Specifically, φy (L), φ f (L) y φi (L) are lag polynomials of order p = 2, q = 2 and r = 2, respectively.
Accordingly, the idiosyncratic components of GDP and the indicators are collected in the vector u t = (u yt , u ′ zt ) ′ . The observation equation is: where w t ∼ iN (0, R) and R is the variance-covariance matrix of w t Details about the specific forms of H and s t are given in Appendix 1.
The transition equation is: where v t ∼ iN (0, Q) and Q is the variance-covariance matrix of v t . Weights or cumulative impact of each indicator to the forecast GDP growth are another interesting outcome from dynamic factor models. This result can be obtained from the Kalman filter. Moving forward, the state vector s t can be expressed as the weighted sum of observations available in the past. 8 Assuming a large enough t, such that the Kalman filter has approached its steady state, it holds that h-periods ahead forecasts of GDP growth are approximately In this expression, W j is the vector of weights to compute the cumulative weight of series i in forecasting GDP growth as

Selection of Variables
This section explains the process to select the series included in the estimation. The model uses ten monthly indicators, eight of which relate to real activity and two to survey-based data. All these variables are listed in Table 1.
In order to select the variables, the idea is to begin with a very parsimonious specification, with a small set of indicators, in line with Stock and Watson (1991), and only extend the model to include new indicators when they make the variance of GDP explained by the common factor to increase. The variables that most contribute to increase the variance explained by the model are those included first. No further variables are included in the model when they are correlated among themselves and thus, including them biases the factor. For example, if the additional variables are correlated with the idiosyncratic part of any of the other variables, the estimation of the common factor will be biased towards this sub-group, impairing the relationship between GDP and the factor. If this happens, including additional variables would not increase the explanatory power over GDP dynamics.
The main improvements of the current model with respect to Perez-Quiros (2009, 2011) are the following. First, practical experience showed that some of the indicators originally introduced into the model had no explanatory power, 9 whereas others that were not 8 See Stock and Watson (1991) for further details. 9 Specifically, the original version of the model included some indicators that have been removed in the current version. Those are retail sales confidence indicator (RS), industrial confidence indicator (ICI) and overnight stays (nights spent by foreigners in hotels). Also, the original version included services Purchasing Managers Index (PMI) and it has been changed by composite purchasing managers index (PMI). initially included might marginally improve the performance of the model. Accordingly, the indicators originally introduced in the model have been modified in order to increase the explanatory power of the tool. For instance, credit to non-financial corporations was introduced, which enhanced the explanation of the last recessionary period. Second, the indicators are included as monthly-on-monthly rather than year-on-year growth rates. This entails a technical improvement: given that GDP is measured in quarterly terms, by considering the indicators as annual rates a structure of lags between the GDP ratio and each indicator was assumed in the past. Third, the possibility of all indicators not being coincident (i.e. that despite being dated in a specific period "t" they refer to activity in a subsequent period) was introduced, meaning that leads on certain series were included, such as consumption of cement and the survey-based indicators, which in their original version were specified contemporaneously. 10 After estimating this revised version of the model, which includes the three detailed improvements, we can observe that it fits the GDP data precisely. In particular, we evaluate the fit of the model by computing the proportion of variance of the GDP explained by the common factor. In the version proposed here, this share reaches 92% of the variance of GDP. We also compare it to the so-called GDP flash estimate, that is, the first release of GDP. When flash estimates are released, there are no revisions of previous estimates of GDP growth rates. When compared to the GDP flash estimate, the share increases to over 93% which stems from the fact that the latter is based on indicators, whereas subsequent revisions of GDP are related to more structural information on the economy.
Estimating a model such as that proposed has significant advantages. On the one hand, a common factor representing the coincident indicator of developments in the Spanish economy, with a monthly frequency, is estimated; and on the other, the model produces forecasts in real 10 They were introduced with a lead of three months. In the case of consumption of cement, by its own idiosyncrasy, leads GDP. Three months is the preferred lead time, as it is when the correlation between the indicator and activity is higher. In the case of survey-based indicators, it is because of their design, as their questionnaires refer to the evolution that agents expect to have in a three-month time horizon, i.e., they reflect expectations and, therefore, are introduced with leads.
time not only for the GDP growth rate but also for all the model variables. This is important for two reasons. First, on publishing any indicator that appears in the model, the information is modified, updating all the forecasts. In that way, each new observation can be broken down into an "expected" part and another part that can be interpreted as a "surprise". The model thus enables measurement of the contribution of each surprise to the change in expected GDP. Second, the selection of the variables to be included in the estimation is conditioned by the fact that the objective of the model is to forecast GDP.
Contrary to standard techniques, where the explanatory variables always increase explanatory power, in these models the incorporation of additional variables does not necessarily ensure enhanced predictive behaviour. As mentioned before, they may entail more idiosyncratic comovements among the variables that are not related to GDP. Having a GDP forecast as an objective allows for the elimination from the specification of those variables that lessen the correlation of the common factor with GDP and for the maintenance of those others that increase the correlation.
In sum, the new model uses ten indicators that are representative of the Spanish economy, two of which are survey-based indicators (ESI and PMI) and are included in levels, and eight of which are activity indicators, introduced in terms of a monthly growth rate. Also, the ESI, the PMI and apparent consumption of cement are incorporated with a lead of three months. The activity indicators have a monthly frequency and are introduced into the model contemporaneously, while the survey-based indicators, since they are correlated with annual economic activity, are introduced with twelve lags (see Table 1).

Description of the Demand Components Model
Following the modelling strategy and the way of selecting variables for the short-term forecasting of Spanish GDP, this section presents an individual dynamic factor model for each demand component: final consumption expenditure of households and NPISHs (non-profit institutions serving households); final consumption expenditure of general government; gross fixed capital formation in capital goods; gross fixed capital formation in construction; and exports and imports of goods and services. Each of these models follows the econometric methodology described in section 2 for the revised GDP model.

Selection of Variables
The selection of the variables included in each model was drawn from the main indicators used by the Spanish Statistical Office (Instituto Nacional de Estadística -INE-) in the preparation of the Quarterly National Accounts, 11 under the premise that the variables should be available timely and provide a meaningful economic signal of the demand components of the national economy.
Drawing on this broad set of indicators, a three-step procedure was followed, similar to that described earlier for aggregate GDP. First, a minimum set of indicators representative of each 11 See Álvarez (1989) and Álvarez (2005). demand component is selected. Second, the correlation of each of these indicators with the corresponding demand component is calculated and the four indicators with the highest correlation are chosen to create a "base model", that is, a dynamic factor model made up of the demand component and those four indicators. For instance, for private consumption, the base model comprises the component itself and the following indicators: total Social Security registrations, the services business activity index, the services PMI and the consumer confidence indicator.
Third, to determine the final selection of indicators to be included in the dynamic factor model of each component, the four indicators initially used in the base model were combined with the other indicators selected as being representative of that component. Then, the variance of each component explained by the common factor is calculated. Further variables are therefore incorporated into the base model, provided in all cases that they increase the variance of the component explained by the common factor. Continuing with the private consumption example, the following indicators were finally selected: total Social Security registrations, the services business activity index, the services PMI, the consumer confidence indicator, the retail trade index, sales of large consumer goods firms, the unemployment rate and the number of credit card transactions.
The start date for the period of assessment of the indicators selected for these models is January 1995. Tables 2 to 7 summarise the indicators considered for each demand component model, the correlation between each indicator and the corresponding component (for example, between private consumption and Social Security registrations) and the indicators finally chosen for each model.
The share of variance of each component of GDP explained by the common factor in each model is as follows: 69% for private consumption; 79% for public expenditure; 79% for investment in capital goods; 53% for construction investment; 67% for exports of goods and services, and 78% for imports of goods and services.

Balancing Procedure
The dynamic factor models for each demand component specified allow a separate forecast to be obtained for each macroeconomic aggregate. In order to obtain a consistent forecast for the entire system, including GDP, each separate forecast must be weighted by the weight of each component in GDP at each point in time, thus obtaining a weighted GDP forecast.  We have made various exercises in pseudo real-time 12 in order to compare the GDP forecast of the revised version of the Spain-STING (described in detail in section 2) with the GDP forecast obtained as a weighted average of the forecasts for each component.
We observe that the GDP forecast according to the revised version of the model (the yellow line in Figure 1) was closer to the actual GDP figure (the blue line) than the GDP forecast obtained as a weighted average of the forecasts for each component (the red line). In consequence, the GDP forecast obtained from the revised model was taken as given and the forecasts for each component were adjusted to that GDP figure.
Diagram 1 depicts the new features of this version of the forecasting system in graphic form. In order to obtain a fully consistent forecasting framework, a balancing procedure is necessary, combining both the forecast GDP according to the revised model and the forecasts of each GDP  Diagram 1. Short-term forecasting model for GDP and its demand components (Spain-Sting). component through the separate models. To that end, we have relied on the van der Ploeg (1982,1985) method, which allows consistent forecasting of macroeconomic aggregates through an equilibrium model. The technique proposed by van der Ploeg (1982van der Ploeg ( , 1985 explicitly recognizes the uncertainty surrounding the preliminary estimates and uses them as an essential element of the balancing process. Also, it is statistically robust and, at the same time, generates globally consistent estimates. Following the method proposed by Abad et al. (2006), we minimise an objective function that penalises the level of breach of certain constraints, weighted according to the level of confidence attached by the forecaster to the initial estimates (revised according to the degree of accuracy). This method explicitly incorporates the uncertainty surrounding the flash estimates and uses it as an essential element in the balancing procedure, such that the final estimates satisfy the constraints of the system and, at the same time, include a specific measure of their accuracy.
Let Y t be a vector representing the estimates of k variables, in our case, the growth contribution of every demand component, final consumption expenditure of households and NPISHs; final consumption expenditure of general government; gross fixed capital formation in capital goods; gross fixed capital formation in construction; and exports and imports of goods and services.
The final (balanced) forecast (Z t ) must satisfy h linear constraints of the form: where A hxM and a hx1 represent, respectively, the general structure and the final numeric values of such restrictions written in matrix form. In our case, A 1xk = (1, 1, 1, 1, 1, −1) and a 1x1 = GDP t where GDP t is the forecast estimated with the aggregate model.
In other words, the initial estimates are modified taking into account their discrepancies, weighted according to their reliability Σ. Σ represents the variance covariance matrix of the forecasting errors of the individual disaggregated models and the actual releases The objective function weights the squared deviations of each unbalanced estimate from the balanced version; weights are inversely related to the quality of the estimate, i.e. the higher the precision, the higher the weight.

Predictive Power Assessment
To assess the performance of the extended and revised version of the Spain-STING model compared with its predecessor, several forecasting exercises were conducted in pseudo real-time, i.e. out-of-sample. 13 First, we test the accuracy of the proposed model of Spanish GDP with respect to the previous version by computing mean squared errors and some econometric regressions to assess its possible bias. Second, we assess the predictive power of the GDP model and the six demand components' models by comparing them with respect to other time series models.

Accuracy of the Re-specified GDP Model
In this exercise, we compare the 2013 version of Camacho and Perez-Quiros (2011), 14 which is named "previous model", with the model that we propose in this paper, we refer to it as "revised and extended model". We use a sample that covers from 2005 Q1 to 2016 Q3; we consider forecasts that each model would produce on an specific date in each quarter of the selected period when most of the monthly indicators are available. 15 The exercise is conducted with a data sample running from January 1990 to September 2016 and the findings obtained for each of the two models are compared.    Figure 2 present the mean squared errors vis-à-vis GDP and the GDP flash estimate. The technical improvement included in the specification of the new extended Spain-STING model marginally improves the accuracy of the forecasts of the previous model. Also, interestingly, a bias is observed between the GDP and the flash estimate series, which, a posteriori, causes the prediction errors of models such as that proposed in this paper to increase considerably once revisions of the data series are incorporated. It is essential to stress that both the previous Spain-STING model and the extended Spain-STING model predict the GDP flash estimate more accurately than they do GDP. Accordingly, the forecasting errors of models of this kind must be interpreted with caution once the final GDP figure is published and revised. Source: Banco de España. a. Standard errors in brackets. t-statistic in parentheses. * indicates p-value less tan 0.10, ** indicates a p-value less than 0.05, and *** indicates a p-value less than 0.01.
Although the mean squared error is the most commonly used measure of accuracy, it is useful to complement this measure with some additional regressions that could illustrate potential biases on the forecasts. In particular, we have run a set of regressions of the GDP flash estimates on the forecasts obtained with the previous and the revised version of the model. As can be seen in the upper panel of Table 9, in both cases, we cannot reject the null hypothesis that the constant of the regression is 0 neither at 1% nor at 5% significance level, that is, there is no systematic bias. Furthermore, in our proposed model there is no systematic error related to the conditions of the economy. The estimated slope in the revised model is equal to one, i.e, the forecast is quite accurate, it is not the case that the model systematically overpredicts in some cases and underpredicts in others and so, both errors offset each other. These features are more clearly appreciated in the revised version of the model where, additionally, the R-squared in the regression that uses the forecasts of the revised version is higher (0.91, and 0.88 for the previous version).
Then, we repeat the same analysis being the final GDP data our dependent variable instead of the GDP flash estimates (lower panel of Table 9). In this case, we find a systematic bias in both the previous and the revised version of the model. As can be seen in the table, the constant is different from 0 and the slope is systematically higher than one.
We delve deeper on this issue and we run an additional regression of the real GDP on its flash estimates (displayed in Table 10). We find that the GDP flash, when used as a regressor is also affected by this bias, which could be associated to the revisions of the data used to calculate the final version of the GDP. Nevertheless, analyzing the source of this bias in the production of the Spanish GDP data exceeds the purpose of this paper.

Comparison of the Accuracy of Different Models for the GDP and the Demand Components
In the previous subsection, we have seen that the best GDP forecast is obtained with the revised model. In this section, we compare the performance of dynamic factor models and alternative time series models in forecasting the GDP and each of the demand components of the GDP.
Specifically, we compare (i) the forecasts of the dynamic factor models of real GDP and each demand component (free-forecast model); (ii) the forecasts obtained with the revised and extended model that uses the balancing procedure (Van der Ploeg); (iii) the forecasts get using AR models and (iv) the forecast obtained through a VAR specification. All these forecasting exercises are conducted in pseudo real-time. Therefore, we have computed an autoregressive model (AR) for GDP and for each demand component and a vector-autoregressive model (VAR) that specifies a group of economic series, i.e. the GDP and the six demand components, as a function of each series' past values to obtain a predictive reference of alternative models. In both of these specifications, we use four lags since the frequency of the data is quarterly. The forecasts of the univariate and multivariate models has been carried out using Tramo-Seats (see Gómez and Maravall, 1996;Caporello and Maravall, 2004). The weighted results of these models are used to estimate a GDP forecast. The pseudo real-time exercises are run for the period covering from 2005 Q1 to 2017 Q2. We obtain a forecast within each quarter. This forecast is that which each model would return on a date in each quarter of the selected period when most of the monthly indicators are available. These exercises were conducted with a data sample running from January 1990 to June 2017. Table 11 and Figure 3 present the average of mean squared errors of the models of each demand component vis-à-vis the figures of these macroeconomic aggregates published in the Quarterly National Accounts (Spanish Statistical Office). The forecasts obtained with the AR and the VAR models have the largest deviations from the real value, as expected. In general, the best approach to predict each component is using a balancing procedure, i.e. van der Ploeg (1982van der Ploeg ( , 1985.
For instance, for private consumption, the forecast obtained with van der Ploeg (1982van der Ploeg ( , 1985 procedure is the best in terms of average of mean squared errors. If we observe the free-forecast, the average of the errors is somewhat higher than with the balancing procedure, but it is still low. Finally, we see that the least desirable methods are the AR and the VAR models.
Although not all of the forecasts errors of the demand components behave the same, the GDP forecast using van der Ploeg (1982van der Ploeg ( , 1985 is the optimum. On this basis, it may be inferred that the revised and extended Spain-STING model is the best procedure to forecast GDP and its demand components due to its technical improvement in the specification. Furthermore, a real time analysis with the same techniques aforementioned (free-forecast, van der Ploeg (1982van der Ploeg ( , 1985 balancing procedure, AR and VAR specifications) have been conducted for 2017 Q1, 2017 Q2 and 2017 Q3. The mean squared error show us that, in general, the forecast made with the balancing procedure for each demand component and for the GDP is the best strategy. 16 However, it should be noticed that this analysis was run for very few quarters and it is necessary to take into consideration the possible future revisions of the data.   (e) Exports model (pseudo real time exercise).
(f ) Imports model (pseudo real time exercise).
(g) Revised GDP model (pseudo real time exercise).

Final Remarks
Making forecasts on the future course of the economy is a fundamental task of Central Banks and national and international institutions. For instance, forecasts are considered in order to design appropriate economic policies, such as monetary and fiscal ones.
To this end, this paper proposes a short-term forecasting model for the Spanish economy (GDP and its demand components). In particular, we estimate an extended and revised version of Spain-STING (Spain, Short-Term INdicator of Growth). On the one hand, it entails a technical improvement in the econometric specification. On the other hand, not only GDP is forecast but also its demand components. In order to do that, drawing on a broad set of indicators, several dynamic factors models have been estimated.
The assessment of the predictive power of the GDP and its demand components shows that for the former, we find some improvement on the previous version of the model, while for the later, we find the accuracy of our proposal is better than other alternative time series models, such as AR and VAR models.
For further research, we plan to evaluate the performance of the forecast of different models using the model confidence set put forward by Hansen et al. (2011).