Market prediction based on macroeconomic indicators - page 37

 
Дмитрий:
Very simple - do not open at the time of important news

I don't trade on the news. There is enough movement without it.

The Expert Advisor is fine-tuned, but the broker can throw a fit.

 

Continuing the theme. A reminder that my model predicts the market based on macroeconomic indicators. Out of 2,000 economic indicators a few are selected based on their ability to predict the future. There is no looking ahead. Every quarter, when GDP growth and other indicators come in, the model automatically runs through the history including fresh data, selects indicators that predicted well the old and new data and makes new predictions 2 quarters ahead based on them. After my last prediction I found some bugs in the code. Also found a new conversion of economic indicators which makes the predictions more accurate. Short term advice to other forecasters and predictors, input data differentiation is not very good for predictions because it looses structure (signal) and makes data noise.

Here is a prediction of GDP growth in the US. The blue line is the actual data. The red line is the predictions. For each past prediction only the data available up to that time was used minus two quarters. The economy will grow moderately for now. Although judging by the slow smoothing GDP growth, a recession next year is quite possible. In the next post I will show the accuracy of GDP predictions by various banks and economists.

The S&P500 prediction is not ready yet. But it is much harder to predict the market than the economic indicators themselves. There is a lot of noise in prices.

 
Vladimir:

Continuing the theme. A reminder that my model predicts the market based on macroeconomic indicators. Out of 2,000 economic indicators a few are selected based on their ability to predict the future. There is no looking ahead. Every quarter, when GDP growth and other indicators come in, the model automatically runs through the history including fresh data, selects indicators that predicted well the old and new data and makes new predictions 2 quarters ahead based on them. After my last prediction I found some bugs in the code. Also found a new conversion of economic indicators which makes the predictions more accurate. Short term advice to other forecasters and predictors, input data differentiation is not very good for predictions because it looses structure (signal) and makes data noise.

Here is a prediction of GDP growth in the US. The blue line is the actual data. The red line is the predictions. For each past prediction only the data available up to that time was used minus two quarters. The economy will grow moderately for now. Although judging by the slow smoothing GDP growth, a recession next year is quite possible. In the next post I will show the accuracy of GDP predictions by various banks and economists.

The S&P500 prediction is not ready yet. But it is much harder to predict the market than the economic indicators themselves. There is a lot of noise in prices.

And can we have a look at the raw actual GDP data - you can do it here with a simple spreadsheet
 
The latter value is not 0.7, but 1%.
 
Дмитрий:
and you can look at the raw actual data for GDP - you can do it here with a simple table

Here: https://research.stlouisfed.org/fred2/series/GDPC96#

The table and growth calculations are attached.

Real Gross Domestic Product, 3 Decimal
Real Gross Domestic Product, 3 Decimal
  • fred.stlouisfed.org
Units: Display integer periods instead of dates (e.g. ...,-1,0,1,...) with the value scaled to 100 at period 0. Use a formula to modify and combine data series into a single line. For example, invert an exchange rate a by using formula 1/a, or calculate the spread between 2 interest rates a and b by using formula a - b. Use the...
Files:
GDPC96.zip  16 kb
 
Vizard_:
The last value is not 0.7 but 1%.

That's for sure. I see that the Fed adjusted the GDP data last Friday. My predictions do not change due to corrections as they use past established data. Adjustments will go on for months and can change the advance data quite significantly. My Q4 prediction is 2.1% growth, the correction changed the advance 0.7% to 1%. It is not advisable to use the advance data as a measure of predictive accuracy. Here are examples of past adjustments:

2015Q4
Percent Change
Vintage Billions of Current Dollars from Preceding Period
GDP GDI Real GDP Real GDI Release Date
Advance 18,128.2 ..... 0.7 ..... Jan 29, 2016 GDI not published
2015Q3
Percent Change
Vintage Billions of Current Dollars from Preceding Period
GDP GDI Real GDP Real GDI Release Date
Third 18,060.2 18,272.1 2.0 2.7 Dec 22, 2015
Second 18,064.7 18,292.1 2.1 3.1 Nov 24, 2015
Advance 18,034.8 ..... 1.5 ..... Oct 29, 2015 GDI not published
2015Q2
Percent Change
Vintage Billions of Current Dollars from Preceding Period
GDP GDI Real GDP Real GDI Release Date
Revised 17,913.7 18,094.0 3.9 2.2 Nov 24, 2015 GDP not open for revision
Third 17,913.7 18,028.1 3.9 0.7 Sep 25, 2015
Second 17,902.0 18,022.9 3.7 0.6 Aug 27, 2015
Advance 17,840.5 ..... 2.3 ..... Jul 30, 2015 GDI not published
2015Q1
Percent Change
Vintage Billions of Current Dollars from Preceding Period
GDP GDI Real GDP Real GDI Release Date
Revised 17,649.3 17,901.6 0.6 0.4 Aug 27, 2015 GDP not open for revision
Revised 17,649.3 17,895.6 0.6 0.3 Jul 30, 2015
Third 17,693.3 18,019.1 -0.2 1.9 Jun 24, 2015
Second 17,665.0 17,993.3 -0.7 1.4 May 29, 2015
Advance 17,710.0 ..... 0.2 ..... Apr 29, 2015 GDI not published
 

If you are interested, the economists' predictions can be found here: http://projects.wsj.com/econforecast/#ind=gdp&r=20

Below is a table of past predictions by the most accurate predictors (Standards and Poor, Bank of America, Moody's, Goldman Sachs, Northern Trust, Combinatorics Capital, UBS bank). There are about 50 forecasters in total. Most interesting is the period in 2008, the first quarter, when the GDP fell by 2.7%. Not a single economist could have predicted this 2 quarters ahead, though the above mentioned economists in the table below were able to predict it 1 quarter ahead. The other 40 economists, including the biggest banks, continued to predict growth into the 4th quarter of 2008. To see the predictions of all the economists, use the link above on the menu on the left, at the very bottom go to Edition and then the link above Download.

Begninning of Quarter Forecast for Actual Economic Forecasting Survey, 1Q ahead Economic Forecasting Survey, 2Q ahead S&P, 1Q ahead S&P, 2Q ahead BA, 1Q ahead BA, 2Q ahead Moody's, 1Q ahead Moody's, 2Q ahead GS, 1Q ahead GS, 2Q ahead Northern Trust, 1Q ahead Northern Trust, 2Q ahead Combinatorics Capital, 1Q ahead Combinatorics Capital, 2Q ahead UBS, 1Q ahead UBS, 2Q ahead

























2007-07-01 Q3 2.7 2.3 2.4 2.5 2.2 2 2.5 1.5 2 1.7
2007-10-01 Q4 1.4 1.6 2.5 1.5 2.7 1.4 2.5 1.5 3.8 1.5 2.5 1.3 1.5 1 1.7 1.7
2008-01-01 Q1 -2.7 0.6 1.9 -0.8 1.4 -0.8 1.7 -0.2 1.3 -0.5 1 -0.7 0.6 -1 -1 2
2008-04-01 Q2 2.0 0.2 1.2 -0.8 1.2 -0.3 0.2 0.5 0.8 -1 -1 -0.8 -0.7 2.5 1 -1.5 -1.5
2008-07-01 Q3 -1.9 1.3 1.8 1.7 2.3 1.6 1.4 1.2 2.4 2 1 0 0.3 0.5 0.5 -1 -0.5
2008-10-01 Q4 -8.2 -3 0.6 -3.1 -0.8 -4.2 1.4 -3.2 0.2 -3.5 0 -4.1 -1.2 -3.5 -1 -3.5 -0.5
2009-01-01 Q1 -5.4 -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4 0.1 2 2.1 2 1 2 1.4 2 2 2 2 4



















Economic Forecasting Survey
Economic Forecasting Survey
  • WSJ.com News Graphics
  • projects.wsj.com
The Wall Street Journal surveys a group of nearly 50 economists on more than 10 major economic indicators on a monthly basis.
 
Vladimir:

If you are interested, the economists' predictions can be found here: http://projects.wsj.com/econforecast/#ind=gdp&r=20

Below is a table of past predictions by the most accurate predictors (Standards and Poor, Bank of America, Moody's, Goldman Sachs, Northern Trust, Combinatorics Capital, UBS bank). There are about 50 forecasters in total.




















It's not just the accuracy of different economists' valuation models - it's all forward-looking tests.
 

Thank you. I'll do some reading.

The hardest part of creating economic models is transforming the input data. If you look at economic indicators (there are about 10,000 of them), they differ from each other in many ways. Some grow exponentially, others twitch in some range, others twitch around zero with increasing magnitude, others change jerkily in the middle of history, etc. To create a model, all these data must be altered so that they have similar statistical characteristics that do not change over time. There are such possibilities:

1. Calculate the relative speeds: r[i] = x[i]/x[i-1]-1. This transformation automatically normalises the data, there is no looking into the future, you don't need to do anything else. But a big problem exists with zero data (x[i-1]=0) and negative data, and there are many of these in economic indicators.

2. Calculate increments d[i] = x[i] - x[i-1]. This transformation does not care about zero and negative data, but the increments grow over time for exponentially growing data such as annual gross product. I.e. the variance is not constant. For example, it is not possible to plot the dependence of GWP increments on the unemployment rate because the unemployment rate fluctuates within a range with constant variance, while GWP grows exponentially, with exponentially growing variance. So the increments must be normalized to the time-varying variance. But calculating the latter is not easy.

3. Remove from the data the trend calculated for example by Hodrick-Prescott filter and normalize the high-frequency residual by the time-varying variance and use as a model input. The problem here is that Hodrick-Prescott filter and other filters based on polynomial fitting(Savitzky-Golay filter, lowess, etc.) look ahead. Mooving lags the data and is unsuitable for trend removal, especially on exponentially increasing data.

Any other ideas?

There is a peek into the future in my last GWP growth prediction. I only discovered it after publication. That's why the model predicted past events so well. I keep struggling.