Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Leading indicators: an Leading indicators: an Leading indicators: an Leading indicators: an example from Google example from Google example from Google example from Google TrendsTrendsTrendsTrendsJ. MURO
UNIVERSIDAD DE ALCALÁ
Leading indicatorsLeading indicatorsLeading indicatorsLeading indicators�A leading indicator in Econometrics is a variable that allows the forecasting of our variable of interest one period in advance.
�Formally: Yt= f(Xt-1); in linear form
Yt=α+ βXt-1 + ut
�X is a leading indicator for Y because its value in time t-1 allows the forecasting of Y in time t (one period in advance). Changes in X anticipates changes in Y.
�The concept can be generalized for any variable X whose lagged values (1, 2, 3…) allow the forecasting of Y in time t.
4/25/2016 J.MURO
Leading indicatorsLeading indicatorsLeading indicatorsLeading indicators�Good forecasting professionals try to find out leading indicators for the variables of interest.
�But remember you should be a wise man if you can foresee the unknown future.
�Because if you merge Hitchcock and Day (Doris, of course) you can always say
4/25/2016 J.MURO
Google TrendsGoogle TrendsGoogle TrendsGoogle Trends�Google Trends (GT) permits the building of leading indicators.
�These indicators are the relative indexes that GT offers for word searches in the Internet.
�Suitable terms (phrases) generate better indicators than words generated at random.
�It is a point at issue. Recent advances suggest to generate new synthetic indexes from GT searches using state space models.
4/25/2016 J.MURO
Spanish tourism inflows and Google Spanish tourism inflows and Google Spanish tourism inflows and Google Spanish tourism inflows and Google TrendsTrendsTrendsTrends
�We will utilize Google Trends to build leading indicators for the purchase of tourism services.
�These purchases are often preceded by surfing the net.
�Search terms can be mainly used in Spanish, French, German and English.
�See Choi and Varian (2009), Artola and Galan (2012).4/25/2016 J.MURO
Spanish tourism inflows and Google Spanish tourism inflows and Google Spanish tourism inflows and Google Spanish tourism inflows and Google TrendsTrendsTrendsTrends
�United Kingdom (UK) is the main source of foreign tourism in Spain.
�We will center ourselves in Spanish tourism inflows from the UK.
�Leading indicators for the Spanish tourism inflows coming from the UK can be obtained using in GT suitable search words like “Holidays in Spain”, “Cheap holidays in Spain” or “Spain Costa”.
4/25/2016 J.MURO
Google Google Google Google Trends layoutTrends layoutTrends layoutTrends layout
4/25/2016 J.MURO
Search terms
must be
defined by the
analyst (up to
5).
CategoryCategoryCategoryCategory----based searchesbased searchesbased searchesbased searches
4/25/2016 J.MURO
GT indexes can
be obtained by
categories.
Geographical
zones and time
can also be used
Have a look at your GT dataHave a look at your GT dataHave a look at your GT dataHave a look at your GT data
4/25/2016 J.MURO
For the three GT
search terms
considered
the data show a
strong seasonality
Saving your GT data to an Saving your GT data to an Saving your GT data to an Saving your GT data to an external fileexternal fileexternal fileexternal file
GT allows to save the generated relative indexes in a comma separated values(csv) format. To do that you have to use a Google account.
4/25/2016 J.MURO
Have a look at your data setHave a look at your data setHave a look at your data setHave a look at your data set
�To model the UK series of tourists inflows we have a data set with four monthly variables: United Kingdom (UK inflows), and three GT series V1-GT-UK (Holidays in Spain), V2-GT-UK (Cheap H.S.), V3-GT-UK (Spain costa). This data set (with the additional series Germany, Franceand Italy) is in the Excel file Tourism_2016.xls.
�GT data start at January 2004 then we restrict the series span in our analysis (2004-2015).
4/25/2016 J.MURO
Have a look at your dataHave a look at your dataHave a look at your dataHave a look at your data
4/25/2016 J.MURO
A preliminary analysis of the dataA preliminary analysis of the dataA preliminary analysis of the dataA preliminary analysis of the data
�The previous graph shows a visual relationship between UK inflows and GT data. To specify a suitable forecasting model a more thorough analysis is needed. It will cover the points
�1. Is the relationship caused by non-seasonal or seasonal components ?
�2. Which is the order of the main correlation between UK inflows and GT data?
4/25/2016 J.MURO
NonNonNonNon----seasonal or seasonal correlationseasonal or seasonal correlationseasonal or seasonal correlationseasonal or seasonal correlation
�To analyze the main source of correlation between GT data and UK inflows we calculate correlations for original data and seasonally adjusted (SA) data.
�To get seasonally adjusted data we will recur to DEMETRA +.
�Once we get original and SA data we can use Eviews facilities to get the Table of correlations. This exercise is left for classwork.
4/25/2016 J.MURO
NonNonNonNon----seasonal or seasonal correlation: seasonal or seasonal correlation: seasonal or seasonal correlation: seasonal or seasonal correlation: a possible working scheme a possible working scheme a possible working scheme a possible working scheme
1. Save the Excel file Tourism_2016.xls, reducing the sample size to 2004m01-2015m09 without Germany, France and Italy series , and name it as Tourism_2016(1).xls.
2. Use DEMETRA + to obtain SA series. The best way to do that is through multi-processing.
3. Save your results to an external file.4. Modify your external Excel file so as to only contain
the 4 original series and the 4 SA series.5. Open the Excel file in 4 as foreign data in Eviews.6. Generate a couple of Tables. First a Table of
correlations between original United kingdom series and leads and lags (-3 to 3) of original GT series. Second, the same Table but now with the SA series.
4/25/2016 J.MURO
NonNonNonNon----seasonal or seasonal correlationseasonal or seasonal correlationseasonal or seasonal correlationseasonal or seasonal correlation
�The Tables obtained allow us to establish a reduced set of alternatives for good leading indicators of UK inflows.
�The following stage is to use a leading indicator to improve our analysis in DEMETRA+. It is accomplished by defining our own specification of the model to be considered by DEMETRA+.
4/25/2016 J.MURO
UserUserUserUser----defined specifications defined specifications defined specifications defined specifications ((((TramoTramoTramoTramo----Seats)Seats)Seats)Seats)To define a new specification from the very beginning you must use the Seasonal adjustment tab.
4/25/2016 J.MURO
UserUserUserUser----defined regression variables defined regression variables defined regression variables defined regression variables specifications (specifications (specifications (specifications (TramoTramoTramoTramo----Seats)Seats)Seats)Seats)To use a leading indicator you must previously define the leading indicator as an user variable: Workspace/Edit/User variables. Drag and drop into the window
4/25/2016 J.MURO
Single series analysisSingle series analysisSingle series analysisSingle series analysis
�Once you have defined your specification and your leading indicator(s) the UK inflows series modelling can be performed with all the options of the single series analysis in DEMETRA+.
4/25/2016 J.MURO
RRRReeee----processingprocessingprocessingprocessing
�Many times your first specification to modelling your series produces bad quality diagnostics.
�You can improve your specification using the specification option in the TramoSeatsdoc-j tab through
•TramoSeatsdoc-j/specification/current specification
4/25/2016 J.MURO
RRRReeee----processingprocessingprocessingprocessing
4/25/2016 J.MURO
RRRReeee----processingprocessingprocessingprocessing
4/25/2016 J.MURO
�Once you have modified your specifications settings, just click on applyand DEMETRA+ provides the output for the new (modified) specification.
Quality indicatorsQuality indicatorsQuality indicatorsQuality indicators
4/25/2016 J.MURO
For any processing DEMETRA offers a quality
indicator whose meaning is
Quality indicatorsQuality indicatorsQuality indicatorsQuality indicators
4/25/2016 J.MURO
ReferencesReferencesReferencesReferencesArtola, C. and E. Galan (2012). Tracking the
future on the web: Construction of leading indicators using internet. DocumentosOcasionales nº 1203. Banco de España.
Choi, H. and H. Varian (2009). Predicting the present with Google Trends. Google Research Blog.
4/25/2016 J.MURO