Exploratory Data Analysis of Economic Indicators

Stuart Miller
2020-03-06 23:00:10

Data

There are 135 observations of 11 variables.

Variables

Variable Description
Date Date of observation (quarterly observations)
gdp_change Change in GDP from the previous observation (quarterly observations)
unrate Unemployment rate
nfjobs Non-farming jobs
treas10yr 10 Year US Treasury Yield
fedintrate US federal interest rate
personincomechg Personal income change
corpprofitchg Corporate profit change
crude_wti
gold
ppi
japan
uk

Change in GDP (gdp_change) is the response variable. The observations are taken quarterly, starting at 1971 Q1 and ending 2019 Q3.

Additional details are given in the data description.

Exploratory Data Analysis

Univariate

Univariate analysis of each variable.

gdp_change

For the univariate analysis of gdp_change see Univariate Modeling

unrate

Based on the plot of the realization, a constant mean assumption seems reasonable. The parzen window and periodogram show system frequencies near zero. The periodogram suggests that the peak may be just above 0, possibly between 0.014 and 0.022. The sample autocorrelations are positive and fall off by the 10th lag. The sample autocorrelations of the first and second half of the realization apepar to be consistent.

AIC suggests a model with AR order of 4 or 5 with a moving avarege component. However, an AR(3) fit to the realization appears to be sufficient to reduce the realization to white noise. Additionally, the fitted AR(3) as a root in the range suggested by the periodogram. Higher order models (4-5), keep this root and add factors with roots relatively far from the unit circle.

The true plots of the AR(3) fit appear to be consistent with the behavior of the sample plots.

Sample Plots

vals <- plotts.sample.wge(data$unrate)

acf(data$unrate[1:68])
acf(data$unrate[69:135])

Model Fits

An AR(3) is fit below. The plot shows the behavior of the realization and the result of differencing the realization with the AR(3) fit. The resulting difference appears to be consistent with white noise.

aic5.wge(data$unrate)
## ---------WORKING... PLEASE WAIT... 
## 
## 
## Five Smallest Values of  aic
##       p    q        aic
## 10    3    0  -2.414073
## 8     2    1  -2.411348
## 16    5    0  -2.409099
## 9     2    2  -2.408927
## 14    4    1  -2.407424
est <- est.arma.wge(data$unrate, p = 3)
## 
## Coefficients of Original polynomial:  
## 1.3935 -0.2390 -0.1997 
## 
## Factor                 Roots                Abs Recip    System Freq 
## 1-1.6748B+0.7101B^2    1.1793+-0.1324i      0.8426       0.0178
## 1+0.2813B             -3.5554               0.2813       0.5000
##   
## 
vals <- artrans.wge(data$unrate, phi.tr = est$phi)

True Plots of AR(3) Fit

The true characteristics of the AR(3) fit is plotted below.

vals <- plotts.true.wge(135, phi = est$phi)

nfjobs

The realization appears to wander with a upward trend. The periodgram and parzen window show evidence of a dominate peak at zero. The sample autocorrelations are positive and fall off slowly. These sample plots appear to be consistent with a non-stationary time series with an upward trend.

With the first difference taken, the result appears to be consistent with an ARMA process. AIC suggests a noise structure of AR(3). An AR(3) model fit appears to be sufficient to reduce the noise structure to white noise.

An ARIMA(3,1,0) may be sufficient to model this realization.

Sample Plots

vals <- plotts.sample.wge(data$nfjobs)

acf(data$nfjobs[1:68])
acf(data$nfjobs[69:135])

Model Fit

When the first difference is taken from the realization, the noise structure appears to be consistent with an ARMA model. AIC suggests an AR(3). When the fitted AR(3) is differenced with the noise, the result appears to be white noise.

nfjobs.first.diff <- artrans.wge(data$nfjobs, phi.tr = c(1))

plotts.sample.wge(nfjobs.first.diff)

## $autplt
##  [1]  1.000000000  0.815853401  0.646436816  0.488657854  0.327939979
##  [6]  0.204832071  0.123650989  0.038885779 -0.077561076 -0.106225835
## [11] -0.144914247 -0.192491022 -0.235465407 -0.231607045 -0.232907741
## [16] -0.228059780 -0.209061721 -0.175700499 -0.136175358 -0.107676766
## [21] -0.048603248 -0.007640695  0.017933783  0.019995589  0.047282694
## [26]  0.036628717
## 
## $freq
##  [1] 0.005154639 0.010309278 0.015463918 0.020618557 0.025773196
##  [6] 0.030927835 0.036082474 0.041237113 0.046391753 0.051546392
## [11] 0.056701031 0.061855670 0.067010309 0.072164948 0.077319588
## [16] 0.082474227 0.087628866 0.092783505 0.097938144 0.103092784
## [21] 0.108247423 0.113402062 0.118556701 0.123711340 0.128865979
## [26] 0.134020619 0.139175258 0.144329897 0.149484536 0.154639175
## [31] 0.159793814 0.164948454 0.170103093 0.175257732 0.180412371
## [36] 0.185567010 0.190721649 0.195876289 0.201030928 0.206185567
## [41] 0.211340206 0.216494845 0.221649485 0.226804124 0.231958763
## [46] 0.237113402 0.242268041 0.247422680 0.252577320 0.257731959
## [51] 0.262886598 0.268041237 0.273195876 0.278350515 0.283505155
## [56] 0.288659794 0.293814433 0.298969072 0.304123711 0.309278351
## [61] 0.314432990 0.319587629 0.324742268 0.329896907 0.335051546
## [66] 0.340206186 0.345360825 0.350515464 0.355670103 0.360824742
## [71] 0.365979381 0.371134021 0.376288660 0.381443299 0.386597938
## [76] 0.391752577 0.396907216 0.402061856 0.407216495 0.412371134
## [81] 0.417525773 0.422680412 0.427835052 0.432989691 0.438144330
## [86] 0.443298969 0.448453608 0.453608247 0.458762887 0.463917526
## [91] 0.469072165 0.474226804 0.479381443 0.484536082 0.489690722
## [96] 0.494845361 0.500000000
## 
## $db
##  [1]   5.4647921   8.3364961   5.5541062  -4.6778741  11.7234094
##  [6]   6.3654940  11.3712057   2.3003340  10.9395334   1.8726847
## [11]   4.0653367 -12.3162718   6.4116002   4.5503050  -0.7806820
## [16]  -9.6653260   0.4080499   5.4282459  -3.6907368   2.7852028
## [21]  -3.9757764  -1.0251168 -18.0471019   1.7732601  -4.6392858
## [26]  -2.3375212   1.0577567 -11.9767214  -8.5415034  -3.2334717
## [31]  -0.1786279  -8.7437474  -5.2691350  -2.0807708 -17.7547878
## [36]  -3.3077459  -4.2556118  -5.7706972  -6.5305997  -2.7047454
## [41] -14.5921313  -7.1043834  -6.6866890  -6.4587876 -23.6233148
## [46] -17.6966516 -14.2696406  -9.3117293 -14.4439855 -14.6202212
## [51] -24.3433803 -30.0657804 -10.4994428  -5.7814772 -19.9026949
## [56]  -2.1121676  -2.3564841 -10.9018296  -7.5177579 -10.2460371
## [61]  -4.4526466  -5.0526563  -8.4456273 -10.9735621  -6.2129033
## [66] -11.8335649 -13.0912721  -6.2000576 -10.3468445 -22.9207951
## [71] -11.4142218 -15.9376116  -7.3670126 -11.8759904 -12.3124772
## [76] -15.7032691  -7.0887608 -15.5084230 -10.3005417  -8.6696089
## [81] -14.1089110  -6.3072398 -31.7392012  -6.8238052  -8.5637671
## [86] -11.4414364 -10.4343587  -4.9539714  -4.7305584 -18.9538303
## [91] -27.3708364 -12.7076814 -16.2941077 -22.9504711 -13.0877666
## [96] -12.6739528 -10.7788330
## 
## $dbz
##  [1]   6.9062326   7.0619359   7.2699407   7.4748233   7.6264510
##  [6]   7.6871368   7.6324929   7.4496421   7.1352631   6.6944831
## [11]   6.1407286   5.4960994   4.7913200   4.0638326   3.3526586
## [16]   2.6901823   2.0939670   1.5634992   1.0843497   0.6371314
## [21]   0.2060007  -0.2169256  -0.6317703  -1.0342324  -1.4198414
## [26]  -1.7870027  -2.1375569  -2.4750019  -2.8017729  -3.1173238
## [31]  -3.4181720  -3.7000162  -3.9609768  -4.2043783  -4.4396890
## [36]  -4.6812574  -4.9456430  -5.2488320  -5.6042902  -6.0221101
## [41]  -6.5089054  -7.0677052  -7.6967744  -8.3859125  -9.1085768
## [46]  -9.8093661 -10.3924878 -10.7307264 -10.7190854 -10.3493984
## [51]  -9.7231049  -8.9844931  -8.2538967  -7.6066804  -7.0810103
## [56]  -6.6910921  -6.4371235  -6.3113849  -6.3018533  -6.3945358
## [61]  -6.5751902  -6.8306219  -7.1494140  -7.5218094  -7.9385462
## [66]  -8.3887494  -8.8573949  -9.3233263  -9.7591825 -10.1345447
## [71] -10.4224637 -10.6071237 -10.6884351 -10.6804877 -10.6048615
## [76] -10.4828708 -10.3303680 -10.1563332  -9.9646124  -9.7574635
## [81]  -9.5394287  -9.3201519  -9.1152155  -8.9449116  -8.8316765
## [86]  -8.7972061  -8.8599752  -9.0333490  -9.3240539  -9.7305965
## [91] -10.2412488 -10.8314455 -11.4609617 -12.0722798 -12.5931057
## [96] -12.9469211 -13.0727336
aic5.wge(nfjobs.first.diff)
## ---------WORKING... PLEASE WAIT... 
## 
## 
## Five Smallest Values of  aic
##       p    q        aic
## 15    4    2   11.46604
## 18    5    2   11.48619
## 4     1    0   11.54307
## 11    3    1   11.54682
## 9     2    2   11.54821
nfjobs.diff.model <- est.arma.wge(nfjobs.first.diff, p = 3)
## 
## Coefficients of Original polynomial:  
## 0.8557 -0.0002 -0.0662 
## 
## Factor                 Roots                Abs Recip    System Freq 
## 1-0.7319B              1.3664               0.7319       0.0000
## 1-0.3689B              2.7110               0.3689       0.0000
## 1+0.2451B             -4.0803               0.2451       0.5000
##   
## 
vals <- artrans.wge(nfjobs.first.diff, phi.tr = nfjobs.diff.model$phi)

treas10yr

This realization appears to trend downward. A constant mean assumption does not appear to be reasonable for this realization. The sample autocorrelations are positive and drop off slowly. The parzen window and periodogram show evidence of a root at 0. These plots are consistent with a non-stationary process.

An ARIMA(0,1,0) appears to be sufficient to model this realization. When the first difference is taken, the result appears to be consistent with white noise.

Sample Plots

vals <- plotts.sample.wge(data$treas10yr)

acf(data$treas10yr[1:68])
acf(data$treas10yr[69:135])

Model Fit

When the first difference is taken from the realization, the noise structure appears to be consistent with an white noise.

treas10yr.first.diff <- artrans.wge(data$treas10yr, phi.tr = c(1))

plotts.sample.wge(treas10yr.first.diff)

## $autplt
##  [1]  1.0000000000 -0.0631264155 -0.0261587420  0.1033213161 -0.0173819785
##  [6] -0.1859323736  0.0086023977 -0.1316255764 -0.0155372468  0.0277946661
## [11]  0.0097661922  0.0438260663  0.0006748775  0.0688426614  0.1281226599
## [16] -0.0236712705 -0.0402599389  0.0132704574 -0.0531971168 -0.1758478248
## [21]  0.0474197503 -0.1000622893  0.0213394391  0.0292460870  0.0647955928
## [26] -0.0486305347
## 
## $freq
##  [1] 0.005154639 0.010309278 0.015463918 0.020618557 0.025773196
##  [6] 0.030927835 0.036082474 0.041237113 0.046391753 0.051546392
## [11] 0.056701031 0.061855670 0.067010309 0.072164948 0.077319588
## [16] 0.082474227 0.087628866 0.092783505 0.097938144 0.103092784
## [21] 0.108247423 0.113402062 0.118556701 0.123711340 0.128865979
## [26] 0.134020619 0.139175258 0.144329897 0.149484536 0.154639175
## [31] 0.159793814 0.164948454 0.170103093 0.175257732 0.180412371
## [36] 0.185567010 0.190721649 0.195876289 0.201030928 0.206185567
## [41] 0.211340206 0.216494845 0.221649485 0.226804124 0.231958763
## [46] 0.237113402 0.242268041 0.247422680 0.252577320 0.257731959
## [51] 0.262886598 0.268041237 0.273195876 0.278350515 0.283505155
## [56] 0.288659794 0.293814433 0.298969072 0.304123711 0.309278351
## [61] 0.314432990 0.319587629 0.324742268 0.329896907 0.335051546
## [66] 0.340206186 0.345360825 0.350515464 0.355670103 0.360824742
## [71] 0.365979381 0.371134021 0.376288660 0.381443299 0.386597938
## [76] 0.391752577 0.396907216 0.402061856 0.407216495 0.412371134
## [81] 0.417525773 0.422680412 0.427835052 0.432989691 0.438144330
## [86] 0.443298969 0.448453608 0.453608247 0.458762887 0.463917526
## [91] 0.469072165 0.474226804 0.479381443 0.484536082 0.489690722
## [96] 0.494845361 0.500000000
## 
## $db
##  [1]  -1.04619691  -1.47780743  -4.59082196  -1.62285046  -3.82133869
##  [6]   1.30962101  -2.13542316  -3.58625289  -2.63640006  -0.89641852
## [11]  -6.07648016  -3.53150261   2.95952232  -2.98379889   6.91208115
## [16]   3.41643806  -0.85706324  -1.58245822   2.27585027   0.49140854
## [21]  -4.08707964  -2.48466847  -0.99089306  -1.78267429  -8.24310967
## [26]   3.04752229   0.39219189   0.44507973 -20.31962479 -16.63745563
## [31]  -7.58883935  -7.55035216   2.55572000  -2.77121655  -9.49497429
## [36] -17.68131624  -1.86822642  -1.78521552   0.87684669  -6.27270305
## [41]  -8.46592671   2.73201950  -2.56788085   2.56913737   1.04495171
## [46]  -3.17303184  -3.30452385  -4.61351410   4.37034253  -9.58440036
## [51]  -0.49969660 -16.56350927  -2.22543182   2.50422789  -2.70078570
## [56]   5.41034113  -3.69038639   1.77002541   5.62462736   0.98568013
## [61]  -4.19816640  -2.76812351   2.95108664  -1.87057340   0.70265345
## [66]   4.69805392  -5.94863063   6.45737523   0.33510780   3.20333325
## [71] -16.45486623   3.09512446  -3.02185817  -1.40810502   0.85526351
## [76]  -2.53511055  -4.54716402   2.37106086 -11.59477776  -0.89878616
## [81]  -6.04092540  -2.20240525  -4.49757048  -5.17945406   0.19138475
## [86]  -8.24697734   2.12755160   3.51029883  -3.56886292  -0.20496462
## [91]   2.60333123  -3.23903109 -10.59689644  -0.97382879  -5.67457859
## [96]   5.92413925  -0.01694511
## 
## $dbz
##  [1] -2.09303129 -2.05058103 -1.98568655 -1.89983565 -1.78519901
##  [6] -1.62317449 -1.39002231 -1.06887146 -0.66210585 -0.19576547
## [11]  0.28708035  0.73865455  1.11693728  1.39097393  1.54206369
## [16]  1.56315653  1.45811893  1.24145117  0.93808253  0.58203313
## [21]  0.21225414 -0.13528155 -0.43741935 -0.69057554 -0.90969762
## [26] -1.11970167 -1.34434192 -1.59739013 -1.87792909 -2.16941451
## [31] -2.44204964 -2.65862278 -2.78358136 -2.79313250 -2.68217366
## [36] -2.46473488 -2.16850634 -1.82719103 -1.47416164 -1.13864726
## [41] -0.84395709 -0.60678042 -0.43680165 -0.33617763 -0.29869996
## [46] -0.30880914 -0.34118705 -0.36238658 -0.33626133 -0.23357187
## [51] -0.04257199  0.22557443  0.54051292  0.86313804  1.15660006
## [56]  1.39365679  1.55993388  1.65451884  1.68903420  1.68524586
## [61]  1.67048491  1.67050991  1.70123570  1.76282590  1.83945842
## [66]  1.90483571  1.93017219  1.89102782  1.77137471  1.56518464
## [71]  1.27642049  0.91798151  0.50964668  0.07493684 -0.36265380
## [76] -0.78264769 -1.16794246 -1.50183671 -1.76370239 -1.92776958
## [81] -1.96918523 -1.87648298 -1.66223676 -1.36247155 -1.02442186
## [86] -0.69132149 -0.39224073 -0.13888682  0.07237843  0.25521537
## [91]  0.42599318  0.59617512  0.76696306  0.92845201  1.06341481
## [96]  1.15351835  1.18520283

fedintrate

The behavior of this realization appear to be correlated to treas3mo. The scatter plot of fedintrate vs treas3mo shows that there is a strong correlation between the two variables, \(\rho = 0.994\)

Sample Plots

vals <- plotts.sample.wge(data$fedintrate)

acf(data$fedintrate[1:68])
acf(data$fedintrate[69:135])

personincomechg

The sample plots seem to suggest an ARMA process with more than one complex autoregressive root. BIC suggests a model order of ARMA(5,0). When a fitted AR(5) model is removed from the realization, the result appears to be consistent with white noise.

Sample Plots

vals <- plotts.sample.wge(data$personincomechg)

acf(data$personincomechg[1:68])
acf(data$personincomechg[69:135])

Model Fit

A AR(5) model is suggested by BIC. When the fitted AR(5) is removed from the realization, the result appears to be consistent with white noise.

aic5.wge(data$personincomechg, p = 0:10, type = 'bic')
## ---------WORKING... PLEASE WAIT... 
## 
## 
## Five Smallest Values of  bic
##       p    q        bic
## 15    4    2  0.1729545
## 18    5    2  0.1960224
## 21    6    2  0.2082781
## 30    9    2  0.2132940
## 33   10    2  0.2260208
est <- est.arma.wge(data$personincomechg, p = 5)
## 
## Coefficients of Original polynomial:  
## 0.7926 0.1734 -0.0299 -0.5744 0.3245 
## 
## Factor                 Roots                Abs Recip    System Freq 
## 1+1.2230B+0.7163B^2   -0.8537+-0.8169i      0.8463       0.3785
## 1-1.3386B+0.6692B^2    1.0002+-0.7028i      0.8180       0.0975
## 1-0.6770B              1.4772               0.6770       0.0000
##   
## 
artrans.wge(data$personincomechg, phi.tr = est$phi)

##   [1]  0.848349609  2.287852382  5.181640491  1.537802310  0.931527438
##   [6]  0.616145321  0.027726904 -0.609181584 -0.164713894  0.508931663
##  [11] -1.452484893  0.534242363  4.821728991 -1.021592603 -0.254103262
##  [16]  2.046131698 -0.712096442  1.920854590  1.744189079  0.861102368
##  [21] -0.652312425  2.449635761  2.313632934  1.281700277  1.252975818
##  [26]  0.723411973  0.451605393  2.011772513 -0.414328641  0.447436998
##  [31]  0.012173989  0.306751737 -0.350001290  0.982856731  1.414278821
##  [36] -0.455457250  1.013310400  1.745381431 -0.073347342  0.536923758
##  [41]  1.711827566 -0.242739064  0.158673133  1.761435750  1.299299318
##  [46]  0.948566222  2.829090554  2.568199834  2.177373092  1.595848337
##  [51]  0.938224380 -0.125473156  2.468998316  0.445752476  1.075639773
##  [56]  2.086388636  0.872183375  1.064380180  0.110499473  1.220400599
##  [61] -1.413045382  2.271641746  2.070343225  1.557514759  1.872884055
##  [66]  0.586073755  0.885619070  0.976709983  1.047770311  0.637093402
##  [71]  1.050561652  0.642999733  1.351450569  0.174748103 -1.115865318
##  [76] -0.314557932  1.059745644  0.769025479  1.387681064  2.035385548
##  [81]  0.788230776  0.618982713  0.988236421  0.079214189  0.387165442
##  [86]  0.784827807  1.210181516  0.474114633  1.021921015  0.921453324
##  [91]  1.414900305  1.069316233  0.409136547  1.310254617  0.639663528
##  [96]  1.188528660  1.389938433  1.172615079  0.493958000  1.025524003
## [101]  1.172816577  1.379610125  2.057912979  2.482893243  1.780501714
## [106]  1.268283534  1.120607868  0.789839972  0.733383654  1.132537699
## [111]  2.064216432  1.947021380  1.693776309  1.458180524  0.325088301
## [116]  0.531223328  0.439268031  2.702278292 -0.425621504  1.727910657
## [121]  1.485576019 -0.847239874  1.561755677 -0.335221334  1.623189094
## [126]  1.697853124  1.574608912  0.074694871  0.886161998  0.640713126
## [131]  1.824993434 -0.257002794  0.512002590 -0.001292431  1.288400993
## [136]  3.218311777  0.406868708  0.242031345  0.588837315  1.306057664
## [141]  0.737416639  0.955264830 -0.119100523 -0.365198699  2.269350703
## [146] -1.345504340  0.357693908 -0.485058272  0.276070238  0.135786124
## [151] -0.250485474  0.606853600  0.325250268  2.430260057  0.626102889
## [156]  1.202572406 -1.178225165  0.888071609  0.998299101  2.044544227
## [161]  1.382544455 -0.469005123  2.780423675 -4.532671787  0.162464061
## [166]  1.395285563 -0.116105423  2.697929784  1.292356182  1.258859526
## [171] -0.092927530  2.778642688  0.664977731  1.146195852  0.835987035
## [176]  0.770056654  0.090558562  0.558045862  0.792279649  1.216898288
## [181]  1.025644551  0.695507845  1.003245533  1.499027516  1.264105983
## [186]  1.274128778  1.037986594  0.751690436  0.805640364  1.156338363

corpprofitchg

The sample plots appear to be consistent with white noise. Additionally, the model chosen by AIC is an ARMA(0,0), which is consistent with white noise.

Sample Plots

vals <- plotts.sample.wge(data$corpprofitchg)

acf(data$corpprofitchg[1:68])
acf(data$corpprofitchg[69:135])
aic5.wge(data$corpprofitchg, p = 0:5)
## ---------WORKING... PLEASE WAIT... 
## 
## 
## Five Smallest Values of  aic
##      p    q        aic
## 1    0    0   3.931277
## 4    1    0   3.941019
## 2    0    1   3.941078
## 3    0    2   3.946630
## 7    2    0   3.947326

Multivariate

Look at correlation between gdp and lags of the other variables.

GDP Change vs Unemployment Rate

There is evidence of a weak correlation between gdp_change and the first 10 lags of unrate.

plot.cross.lags(data, 'gdp_change', 'unrate', 19)

GDP Change vs Non-farm Jobs

There is evidence of a weak correlation between gdp_change and the first 10 lags of nfjobs.

plot.cross.lags(data, 'gdp_change', 'nfjobs', 19)

GDP Change vs 10 Year Treasury Yield

There is evidence of a weak correlation between gdp_change and the first 10 lags of treas10yr.

plot.cross.lags(data, 'gdp_change', 'treas10yr', 19)

GDP Change vs Federal Interest Rate

There is evidence of a weak correlation between gdp_change and the first 10 lags of fedintrate.

plot.cross.lags(data, 'gdp_change', 'fedintrate', 19)

GDP Change vs Change in Personal Income

There is evidence of a weak correlation between gdp_change and the first 4 lags of personincomechg.

plot.cross.lags(data, 'gdp_change', 'personincomechg', 19)

GDP Change vs Change in Corparate Profits

There does not seem to be a correlation between change in GDP and lags of change in corparate profits.

plot.cross.lags(data, 'gdp_change', 'corpprofitchg', 19)