Você está na página 1de 68

Project of Financial Modeling

Time Series Analysis


Submitted to: Prof. Dr. M. Shahzad Chaudhary
Submitted by: Samar Fatima
Roll No. 12
M.Phil 2nd Semester
Session 2014-2016

Hailey College of Commerce


University of the Punjab
Lahore, Pakistan

Topics to be covered in this Project:


1. Determining whether data is stationary or non
stationary (Graphs+ Dickey Fuller Test)
2. Making data Stationary by taking differences
3. ARMA/ARIMA Processes
Applying different ARIMA Models
Predicting Residuals of Significant ARIMA Models
Making Correlograms of Residuals to determine the
status
Applying wntestq test to determine if Residuals are
white noise or purely random
Only those ARIMA Models are selected whose
Residuals are purely random

Applying AIC (Akike Information Criteria) and BIC (Bayes


Information Criteria) to determine best suited model

4. ARCH/GARCH Effects
Generating Log of concerned variable
Tsline Graphs of first difference of log of variable to see
the element of Volatility Clustering
Applying estat archlm test to determine if there is ARCH
effect
Applying several possible combinations of ARCH/GARCH
Models
Among the significant models, select the best suited
model by using AIC and BIC

5. Cointegration
6. Error Correction Model
7. Vector Autoregression (VAR)

Data Set Used:


The data set used in this project is taken from World Banks
website. GDP, Interest Rate, Inflation Rate, Exports and Imports
of United Kingdom are taken as time series variables.
The URL of data set is given below:
http://data.worldbank.org/country/united-kingdom

United Kingdoms Real Economic Data


From the Year 1960-2014
Year

GDP

1960

7232804704

1961

7669436063

1962

Inflation

Interest

Exports

Imports

14616021507

15617572733

3.376356564

15258543541

15522854822

8060193963

3.717638563

15655395385

15815127026

1963

8544376667

1.972795305

16511191129

16851607900

1964

9338759881

4.0545827

17491172418

19076116871

1965

1.01E+01

4.795834507

18622333929

19509114056

1966

1.07E+01

4.318658684

20082873495

20239775212

1967

1.11E+01

2.887830707 2.53885155

20542668837

21697473493

1968

1.05E+01

4.207110489 1.84045935

21672959116

22507195655

1969

1.13E+01

5.451641531 1.11269815

24206781923

23743551743

1970

1.31E+01

5.028517259 2.11512339

27878329734

26697384209

1971

1.48E+01

8.009560704 -0.47177373

31719396447

29629350207

1972

1.70E+01

7.285111785 0.20029639

34311188811

34335664336

1973

1.93E+01

8.400246767 -0.36923049

42283194512

46458108770

1974

2.06E+01

15.10097432 -5.30054099

54087657784

63546049556

1975

2.42E+01

25.86753593 -12.3119138

60079424779

63813938053

1976

2.33E+01

14.98165176 -3.23637296

63747529200

65990116801

1977

2.63E+01

13.55698375 -4.34317959

76362986220

74203035060

1978

3.36E+01

11.53637776 -2.04989421

92052540748

87309875360

1979

4.39E+01

14.14623841 -0.20112072

1.18E+11

1.15E+11

1980

5.65E+01

19.87267505 -3.09162065

1.47E+11

1.34E+11

1981

5.41E+01

11.63626691 1.44552763

1.37E+11

1.22E+11

1982

5.15E+01

7.333900565 4.1628812

1.29E+11

1.19E+11

1983

4.90E+01

5.142602267 4.42167522

1.23E+11

1.18E+11

1984

4.61E+01

5.041399827 4.41319662

1.24E+11

1.24E+11

1985

4.89E+01

6.125405712 5.84961497

1.34E+11

1.28E+11

1986

6.01E+01

4.325113396 6.23840197

1.46E+11

1.49E+11

1987

7.45E+01

5.287254429 4.11991517

1.78E+11

1.84E+11

1988

9.10E+01

5.931141743 4.11637678

1.95E+11

2.23E+11

1989

9.27E+01

7.998681777 5.47968252

2.03E+11

2.35E+11

1990

1.09E+01

8.097270912 6.15439134

2.47E+11

2.65E+11

1991

1.14E+12

6.562613091 4.67242068

2.50E+11

2.53E+11

1992

1.18E+01

3.273786589 5.94815033

2.62E+11

2.69E+11

1993

1.06E+01

2.577153491 3.25561108

2.55E+11

2.58E+11

1994

1.14E+01

1.219196462 4.20865839

2.88E+11

2.87E+11

1995

1.24E+01

2.47712814

4.10859665

3.36E+11

3.30E+11

1996

1.30E+01

4.021771216 1.86168923

3.62E+11

3.58E+11

1997

1.44E+01

2.477579555 4.0064898

3.92E+11

3.85E+11

1998

1.53E+01

1.501940304 5.62195462

3.88E+11

3.99E+11

1999

1.56E+01

1.134752464 4.15147193

3.92E+11

4.17E+11

2000

1.55E+01

2.402651951 3.4925997

4.07E+11

4.38E+11

2001

1.53E+01

1.092343041 3.94786605

4.00E+11

4.36E+11

2002

1.67E+01

2.651753607 1.31341779

4.21E+11

4.66E+11

2003

1.94E+01

2.17219149

1.48309289

4.80E+11

5.24E+11

2004

2.30E+01

2.906510022 1.44725859

5.60E+11

6.25E+11

2005

2.41E+01

2.808504841 1.78713667

6.21E+11

6.84E+11

2006

2.58E+01

2.685238376 1.90932502

7.18E+11

7.79E+11

2007

2.96E+12

2.872734219 2.5741506

7.60E+11

8.41E+11

2008

2.79E+01

2.888570847 1.68767933

7.74E+11

8.56E+11

2009

2.31E+12

1.990987494 -1.33932176

6.24E+11

6.67E+11

2010

2.41E+01

3.170637205 -2.58856325

6.91E+11

7.48E+11

2011

2.59E+01

2.125945212 -1.59209807

8.00E+11

8.38E+11

2012

2.61E+01

1.660953748 -1.14198589

7.91E+11

8.45E+11

2013

2.68E+01

1.79333911

-1.27055377

8.07E+11

8.59E+11

2014

2.94E+01

1.765220456 -1.24327393

8.34E+11

8.88E+11

1. Determining whether data is stationary or non


stationary (Graphs+ Dickey Fuller Test):
For forecasting purpose It is necessary that data is stationary, if data is non-stationary
but treated as stationary, it does not give the appropriate anticipation or prediction.

1st Variable GDP:


Correlogram of GDP:
. corrgram GDP

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC
0.9416
0.8860
0.8339
0.7793
0.7294
0.6876
0.6271
0.5533
0.4877
0.4234
0.3590
0.3070
0.2642
0.2264
0.1876
0.1460
0.0990
0.0512
0.0086
-0.0311
-0.0660
-0.0968
-0.1320
-0.1672
-0.2042

PAC
1.0214
-0.2750
0.3845
-0.2534
0.2895
0.4064
0.3285
0.1787
-0.5248
-0.0197
0.4992
1.0547
-0.1833
0.2402
0.7376
-0.4961
-1.0587
-0.6519
-0.4099
-0.8236
-1.0040
-0.3424
-0.6789
0.9657
0.9129

Prob>Q

51.476
97.914
139.84
177.17
210.53
240.78
266.46
286.88
303.09
315.58
324.76
331.64
336.84
340.76
343.52
345.24
346.05
346.27
346.27
346.36
346.76
347.65
349.36
352.19
356.54

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

The correlogram shows GDP is non stationary because 1st PAC is


significantly different from zero. Further verification will be made by dickey
fuller test as follows:

. dfuller GDP
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

1.136

Number of obs

-3.574

H0: Data is non stationary


H1: Data is stationary
As p> so accept H0 and concluded that data is non stationary

Correlogram of Inflation Rate

54

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value

MacKinnon approximate p-value for Z(t) = 0.9955

2nd Variable Inflation Rate:

-2.927

-2.598

. corrgram Inflation

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC

PAC

0.8103
0.6364
0.5353
0.5060
0.4842
0.3359
0.1772
0.0923
0.0862
0.0602
-0.0035
-0.0786
-0.0913
-0.0779
-0.0521
-0.0933
-0.1794
-0.2215
-0.2361
-0.2144
-0.2163
-0.2372
-0.2586
-0.2531
-0.2211

0.8198
-0.0560
0.1283
0.1556
0.0458
-0.3253
-0.1152
0.0236
0.0858
-0.0767
0.0164
-0.0076
0.0493
-0.0722
0.0345
-0.0973
-0.1710
0.0385
0.0003
0.0315
-0.0129
-0.0459
-0.0825
-0.0366
0.0067

Prob>Q

37.467
61.02
78.013
93.498
107.97
115.07
117.09
117.65
118.15
118.4
118.4
118.85
119.46
119.92
120.13
120.82
123.45
127.57
132.39
136.48
140.77
146.08
152.61
159.06
164.16

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller Inflation
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-2.222

Number of obs

53

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.576

-2.928

-2.599

MacKinnon approximate p-value for Z(t) = 0.1985


.

Both the graph and dickey fuller proves that Inflation Rate is non stationary data

3rd Variable Interest Rate:


. corrgram Interest

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

AC

PAC

0.7708
0.6299
0.5470
0.3957
0.2925
0.1868
0.0414
-0.0438
-0.0802
-0.1808
-0.2282
-0.2272
-0.2184
-0.2489
-0.2613
-0.2229
-0.2632
-0.2471
-0.2542
-0.2778
-0.2485
-0.2373

0.7807
0.0970
0.0975
-0.1670
0.0005
-0.0995
-0.2031
-0.0708
-0.0090
-0.1636
-0.0292
0.0533
0.0988
-0.2386
-0.0470
0.1496
-0.1832
0.0296
-0.2267
-0.2277
0.0296
-0.1698

Prob>Q

30.336
51.041
67.001
75.542
80.317
82.311
82.411
82.526
82.922
84.986
88.366
91.807
95.079
99.452
104.42
108.15
113.51
118.39
123.74
130.36
135.85
141.04

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller Interest
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-2.322

Number of obs

47

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.600

-2.938

-2.604

MacKinnon approximate p-value for Z(t) = 0.1649


.

Both the graph and dickey fuller proves that Interest Rate is non stationary data

4th Variable Exports:


. corrgram Exports

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC

PAC

0.9391
0.8764
0.8158
0.7512
0.7002
0.6577
0.5904
0.5193
0.4483
0.3879
0.3326
0.2854
0.2458
0.2090
0.1704
0.1321
0.0893
0.0433
0.0006
-0.0374
-0.0683
-0.0963
-0.1254
-0.1543
-0.1846

1.0267
-0.1029
0.2770
0.0719
0.1404
0.1915
1.3087
0.0574
0.3157
0.8277
0.1116
-0.5963
1.2380
0.5406
1.2100
1.4790
-2.0561
1.1139
-0.1449
0.3748
-1.2617
0.9287
1.6289
0.0836
2.1637

Prob>Q

51.197
96.631
136.76
171.45
202.18
229.86
252.62
270.61
284.31
294.8
302.68
308.61
313.13
316.46
318.74
320.14
320.8
320.96
320.96
321.09
321.52
322.4
323.94
326.34
329.9

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller Exports
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

1.433

Number of obs

54

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.574

-2.927

-2.598

MacKinnon approximate p-value for Z(t) = 0.9973


.

Both the graph and dickey fuller proves that Exports are non stationary data

5th Variable Imports:


. corrgram Imports

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC

PAC

0.9405
0.8795
0.8197
0.7587
0.7062
0.6645
0.5939
0.5196
0.4473
0.3836
0.3244
0.2757
0.2333
0.1948
0.1561
0.1180
0.0775
0.0367
-0.0033
-0.0391
-0.0695
-0.0967
-0.1257
-0.1538
-0.1853

1.0251
-0.0758
0.2207
0.0914
0.0278
0.2630
0.9520
0.0693
-0.4979
0.6857
0.4584
-0.3233
0.7734
1.5048
1.6361
1.9199
-1.6333
1.2650
-1.1975
0.9145
-1.2578
0.1766
0.2289
-1.7670
0.7887

Prob>Q

51.353
97.107
137.62
173
204.27
232.51
255.55
273.56
287.19
297.45
304.94
310.49
314.55
317.45
319.36
320.48
320.97
321.09
321.09
321.23
321.67
322.56
324.11
326.5
330.09

0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller Imports
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

1.303

Number of obs

54

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.574

-2.927

-2.598

MacKinnon approximate p-value for Z(t) = 0.9966


.

Both the graph and dickey fuller proves that Imports are non stationary data

1. Making data Stationary by taking differences


1st Variable GDP:
1st difference of GDP is created by following command:
Gen diffGDP=D1.GDP
After creating first difference of GDP, its stationairty is checked by
correlogram and dickey fuller test
. corrgram diffGDP

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC

PAC

0.2795
-0.2191
0.0338
-0.0035
-0.3910
-0.2143
0.1565
0.2162
0.1464
0.1124
-0.0300
-0.0156
-0.0638
-0.1027
0.0482
0.2257
0.1492
-0.0185
-0.0114
-0.0102
-0.1859
-0.1651
-0.0702
0.0661
0.0482

0.2959
-0.3468
0.2805
-0.2571
-0.3462
-0.0038
0.2308
0.6267
0.1031
-0.2371
-0.6602
0.6018
0.1375
-0.2758
0.9762
1.2009
0.7038
0.3921
0.7875
1.0137
0.3182
0.6988
-0.8274
0.8594
2.7460

Prob>Q

4.4588
7.2508
7.3186
7.3194
16.753
19.648
21.224
24.297
25.738
26.606
26.67
26.687
26.988
27.785
27.965
32.02
33.838
33.867
33.878
33.887
37.053
39.631
40.112
40.552
40.794

0.0347
0.0266
0.0624
0.1199
0.0050
0.0032
0.0035
0.0020
0.0023
0.0030
0.0052
0.0086
0.0125
0.0152
0.0218
0.0099
0.0088
0.0131
0.0190
0.0269
0.0166
0.0119
0.0149
0.0186
0.0241

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. *seems it became stationary, lets confirm by applying the test

. dfuller diffGDP
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-5.113

Number of obs

53

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.576

-2.928

-2.599

MacKinnon approximate p-value for Z(t) = 0.0000

Hence it is concluded that GDP becomes stationary at first difference

2nd Variable Inflation Rate:


1st difference of Inflation Rate is created by following command:
Gen diffInflation=D1.Inflation
After creating first difference of Inflation Rate, its stationairty is checked by
correlogram and dickey fuller test
. corrgram diffInflation

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.

AC

PAC

-0.0415
-0.2096
-0.1837
-0.0089
0.3358
0.0289
-0.1968
-0.2122
0.0532
0.1183
0.0217
-0.1627
-0.0535
0.0259
0.1214
0.1189
-0.1233
-0.0513
-0.0863
0.0151
0.0424
-0.0037
-0.0476
-0.0554

-0.0415
-0.2116
-0.2111
-0.0887
0.2684
0.0301
-0.1069
-0.1545
0.0095
-0.0780
-0.0520
-0.1011
0.0198
-0.0863
0.0662
0.1140
-0.1267
-0.0742
-0.1116
-0.0001
0.0363
0.0448
-0.0311
-0.0976

Prob>Q

.09633
2.6073
4.5737
4.5784
11.426
11.478
13.932
16.848
17.035
17.985
18.017
19.9
20.109
20.159
21.289
22.402
23.633
23.852
24.49
24.51
24.674
24.675
24.896
25.204

0.7563
0.2715
0.2058
0.3334
0.0436
0.0747
0.0524
0.0317
0.0482
0.0552
0.0812
0.0690
0.0925
0.1252
0.1279
0.1307
0.1298
0.1599
0.1780
0.2208
0.2616
0.3129
0.3557
0.3947

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

dfuller diffInflation

Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-7.372

Number of obs

52

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.577

-2.928

MacKinnon approximate p-value for Z(t) = 0.0000


.

Hence it is proved Inflation Rate is Stationary at first difference

-2.599

3rd Variable Interest Rate:


1st difference of Interest Rate is created by following command:
Gen diffInterest=D1.Interest
After creating first difference of Interest Rate, its stationairty is checked by
correlogram and dickey fuller test
. corrgram diffInterest

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

AC

PAC

-0.1977
-0.1270
0.1444
-0.1090
0.0151
0.1228
-0.1047
-0.0850
0.1088
-0.1173
-0.1172
-0.0263
0.1284
-0.0629
-0.1191
0.1914
-0.1439
0.0231
0.0573
-0.1102
0.0303

-0.1977
-0.1733
0.0873
-0.0894
0.0098
0.0999
-0.0533
-0.1470
0.0812
-0.0886
-0.1232
-0.1504
0.1982
0.0143
-0.1257
0.2039
-0.0106
0.2430
0.2395
-0.0665
0.1762

Prob>Q

1.9567
2.7826
3.8743
4.511
4.5235
5.3701
6.0013
6.4283
7.1461
8.0025
8.8808
8.9262
10.043
10.319
11.339
14.06
15.65
15.693
15.963
16.999
17.08

0.1619
0.2487
0.2754
0.3412
0.4767
0.4973
0.5396
0.5994
0.6219
0.6286
0.6329
0.7092
0.6904
0.7385
0.7282
0.5942
0.5487
0.6140
0.6598
0.6530
0.7062

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller diffInterest
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-8.111

Number of obs

46

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.607

-2.941

-2.605

MacKinnon approximate p-value for Z(t) = 0.0000


.

Hence it is proved Interest Rate is stationary at first difference

4th Variable Exports:


1st difference of Exports is created by following command:
Gen diffExports=D1.Exports
After creating first difference of Exports, its stationairty is checked by
correlogram and dickey fuller test
. corrgram diffExports

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC

PAC

0.1525
-0.1758
-0.0351
-0.0103
-0.0750
-0.0428
0.1365
0.1670
0.0640
0.0929
0.0896
-0.0576
-0.0756
-0.0507
0.0117
0.1777
0.0615
0.0120
-0.0635
0.0138
-0.0269
-0.1379
-0.0432
-0.0010
-0.0070

0.1530
-0.2038
0.0289
-0.0529
-0.0920
-0.0396
0.8448
0.4080
-0.0925
0.6338
1.0273
-0.7498
0.2042
-0.0813
0.2848
2.6551
-0.5527
0.7761
0.1192
1.3520
-0.6800
-1.3506
0.3016
0.1562
1.1526

Prob>Q

1.3275
3.1244
3.1976
3.204
3.5514
3.6667
4.8659
6.6983
6.9732
7.5661
8.1308
8.3697
8.791
8.9855
8.9961
11.509
11.818
11.83
12.178
12.195
12.261
14.057
14.239
14.239
14.245

0.2493
0.2097
0.3621
0.5243
0.6156
0.7217
0.6763
0.5695
0.6399
0.6711
0.7015
0.7556
0.7885
0.8320
0.8777
0.7771
0.8111
0.8559
0.8779
0.9092
0.9323
0.8994
0.9198
0.9411
0.9573

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller diffExports
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-6.124

Number of obs

53

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.576

-2.928

-2.599

MacKinnon approximate p-value for Z(t) = 0.0000


.

Hence it is proved that Exports are Stationary at first difference

5th Variable Imports:


1st difference of Imports is created by following command:
Gen diffImports=D1.Imports
After creating first difference of Imports, its stationairty is checked by
correlogram and dickey fuller test
. corrgram diffImports

LAG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

AC

PAC

0.1214
-0.1397
-0.0467
0.0483
-0.1415
0.0027
0.1295
0.1820
0.0643
0.0625
0.0335
-0.0161
-0.0733
-0.0668
0.0011
0.1543
0.0377
0.0832
-0.0367
-0.0043
-0.0945
-0.0949
-0.0423
0.0120
-0.0182

0.1216
-0.1567
-0.0090
0.0414
-0.1867
0.2249
0.6608
0.7817
-0.2677
0.0704
0.6565
-0.2908
-0.6215
-0.4045
0.0960
2.8750
-0.1996
2.2495
-0.2949
1.8458
-0.0235
-0.1873
1.7562
-1.1003
-0.6959

Prob>Q

.84023
1.9751
2.1043
2.2454
3.4814
3.4819
4.5602
6.7385
7.0161
7.2844
7.3633
7.382
7.7781
8.1157
8.1158
10.01
10.126
10.707
10.824
10.825
11.643
12.494
12.669
12.683
12.718

0.3593
0.3725
0.5510
0.6907
0.6262
0.7464
0.7135
0.5651
0.6354
0.6984
0.7689
0.8314
0.8578
0.8832
0.9191
0.8661
0.8983
0.9064
0.9296
0.9506
0.9488
0.9463
0.9588
0.9711
0.9798

-1
0
1 -1
0
1
[Autocorrelation] [Partial Autocor]

. dfuller diffImports
Dickey-Fuller test for unit root

Test
Statistic
Z(t)

-6.324

Number of obs

53

Interpolated Dickey-Fuller
1% Critical
5% Critical
10% Critical
Value
Value
Value
-3.576

-2.928

-2.599

MacKinnon approximate p-value for Z(t) = 0.0000


.

Hence it is proved that Imports are Stationary at first difference

3. ARIMA Processes
1st variable GDP:
Applying different ARIMA Models
ARIMA (0,1,1) Model

. arima GDP, arima(0,1,1)


ARIMA regression
Sample:

1961 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -1450.048

OPG
Std. Err.

P>|z|

=
=
=

54
65.46
0.0000

D.GDP

Coef.

[95% Conf. Interval]

_cons

5.49e+10

ma
L1.

.5805577

.0717584

8.09

0.000

.4399138

.7212017

/sigma

1.11e+11

GDP

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.

ARIMA (2,1,0) Model

. arima GDP, arima(2,1,0)


ARIMA regression
Sample:

1961 - 2014

Number of obs
Wald chi2(2)
Prob > chi2

Log likelihood = -1450.428

OPG
Std. Err.

P>|z|

=
=
=

54
43.21
0.0000

D.GDP

Coef.

[95% Conf. Interval]

_cons

5.36e+10

ar
L1.
L2.

.3899978
-.3355386

.0711511
.0846288

5.48
-3.96

0.000
0.000

.2505442
-.5014079

.5294514
-.1696692

/sigma

1.12e+11

GDP

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.

Predicting Residuals of Significant ARIMA Models:


After getting the significant models the next step is to predict their residuals and
then apply the wntestQ test to determine whether the error terms of selected
ARIMA model is purely random or white noise. Only those models will be
considered right whose error term shows purely random process. The residuals
are predicted by following command:
Predict e, residuals

Further test applied on error terms of above mentioned significant models is


given below as:

wntestq e ARIMA (0,1,1)


. wntestq e3
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(25)
=

28.0345
0.3063

wntestq e2 AIMA (2,1,0)


. predict e2, residuals
(1 missing value generated)
. wntestq e2
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(25)
=

27.9104
0.3120

Applying AIC (Akike Information Criteria) and BIC (Bayes


Information Criteria) to determine best suited model:
Thus both the models are satisfying the condition of ARIMA Modeling. Now the
best suited model will be determined by AIC and BIC
ARIMA (0,1,1)

. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1450.048

2902.096

2904.085

Note:

N=Obs used in calculating BIC; see [R] BIC note

ARIMA (2,1,0)
. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1450.428

2904.855

2908.833

Note:

N=Obs used in calculating BIC; see [R] BIC note

Conclusion: The best suited model for GDP is ARIMA (0,1,1) according to AIC and
BIC , because it is showing lesser differences. It is MA Model integrated at first
difference.

2nd Variable Inflation Rate:


1st Model ARIMA (1,2,2)
. arima Inflation, arima(1,2,2)

ARIMA regression
Sample:

1963 - 2014

Number of obs
Wald chi2(3)
Prob > chi2

Log likelihood = -132.6454

OPG
Std. Err.

P>|z|

=
=
=

52
13580.06
0.0000

D2.Inflation

Coef.

[95% Conf. Interval]

Inflation
_cons

-.014696

.0328942

-0.45

0.655

-.0791673

.0497754

ar
L1.

.8209976

.3715876

2.21

0.027

.0926993

1.549296

ma
L1.
L2.

-1.998521
.9999981

.3603057
.4027015

-5.55
2.48

0.000
0.013

-2.704707
.2107176

-1.292335
1.789278

/sigma

2.881749

ARMA

After predicting the residuals, by applying wntestq test:


. predict e, residuals
(3 missing values generated)
. wntestq e
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(24)
=

23.7218
0.4776

Applying AIC and BIC:


. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

52

-132.6454

273.2907

281.0957

Note:

N=Obs used in calculating BIC; see [R] BIC note

2nd Model ARIMA (0, 2, 1)

ARIMA regression
Sample:

1963 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -133.6337

OPG
Std. Err.

P>|z|

=
=
=

52
87.48
0.0000

D2.Inflation

Coef.

[95% Conf. Interval]

Inflation
_cons

-.0134573

.0491316

-0.27

0.784

-.1097535

.0828389

ma
L1.

-.9999992

.1069159

-9.35

0.000

-1.20955

-.790448

/sigma

3.042764

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.

After predicting the residuals, by applying wntestq test:


. wntestq e2
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(24)
=

26.1842
0.3439

Applying AIC and BIC:


. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

52

-133.6337

271.2674

275.1699

Note:

N=Obs used in calculating BIC; see [R] BIC note

Conclusion: According to Akike and Bayes Information Criteria the best suited
ARIMA Model for second variable Inflation Rate is (0,2,1). It is a moving average
term integrated at second difference.

3rd Variable Interest Rate:


1st Model ARIMA (1,1,1)
ARIMA regression
Sample:

1968 - 2014

Number of obs
Wald chi2(2)
Prob > chi2

Log likelihood = -105.8996

OPG
Std. Err.

P>|z|

=
=
=

47
173.23
0.0000

D.Interest

Coef.

[95% Conf. Interval]

Interest
_cons

-.0088936

.1436402

-0.06

0.951

-.2904231

.2726359

ar
L1.

.8034576

.0640125

12.55

0.000

.6779953

.9289199

ma
L1.

-1.000001

.1367714

-7.31

0.000

-1.268068

-.7319339

/sigma

2.259345

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.
.

After predicting the residuals, by applying wntestq test:


. wntestq e
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(21)
=

14.3233
0.8553

Hence result of white noise test is showing that p <, thus H0 is accepting here
that states errors are not white noise, thus this model disqualifies due to the
reason its errors are not purely random.

2nd Model ARIMA (0,1,1)


ARIMA regression
Sample:

1968 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -106.3503

OPG
Std. Err.

P>|z|

=
=
=

47
9.42
0.0021

D.Interest

Coef.

[95% Conf. Interval]

Interest
_cons

-.0771925

.3187205

-0.24

0.809

-.7018733

.5474882

ma
L1.

-.2485257

.0809822

-3.07

0.002

-.4072479

-.0898035

/sigma

2.323684

.1533554

15.15

0.000

2.023113

2.624255

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.

After predicting the residuals, by applying wntestq test:


. wntestq e2
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(21)
=

Applying AIC and BIC:

11.3399
0.9558

. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

47

-106.3503

218.7005

224.251

Note:

N=Obs used in calculating BIC; see [R] BIC note

Conclusion: among the two significant ARIMA Models, one of the Model ARIMA
1,1,1 does not follow the requirement of random errors, hence best fitted
model is ARIMA 0,1,1 i.e MA term integrated at first difference.

4th Variable Exports:


1st Model ARIMA 1,1,0
ARIMA regression
Sample:

1961 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -1386.395

OPG
Std. Err.

P>|z|

=
=
=

54
3.70
0.0543

D.Exports

Coef.

[95% Conf. Interval]

Exports
_cons

1.52e+10

ar
L1.

.1506258

.0782622

1.92

0.054

-.0027653

.3040169

/sigma

3.42e+10

1.40e+09

24.44

0.000

3.14e+10

3.69e+10

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.
.

After predicting the residuals, by applying wntestq test:

. predict e, residuals
(1 missing value generated)
. wntestq e
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(25)
=

11.8412
0.9878

Applying AIC and BIC:


. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1386.395

2776.789

2780.767

Note:

N=Obs used in calculating BIC; see [R] BIC note

2nd Model ARIMA 0,1,1


ARIMA regression
Sample:

1961 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -1386.027

OPG
Std. Err.

P>|z|

=
=
=

54
13.29
0.0003

D.Exports

Coef.

[95% Conf. Interval]

Exports
_cons

1.52e+10

ma
L1.

.2337091

.0641074

3.65

0.000

.1080609

.3593572

/sigma

3.39e+10

1.38e+09

24.57

0.000

3.12e+10

3.66e+10

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.
.

After predicting the residuals, by applying wntestq test:

. wntestq e2
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(25)
=

10.5415
0.9949

Applying AIC and BIC:


. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1386.027

2776.054

2780.032

Note:

N=Obs used in calculating BIC; see [R] BIC note

Conclusion: According to AIC and BIC the best suited model for Exports is
ARIMA (0,1,1), in other words it is a moving average term integrated at first
difference.

5th Variable Imports:


1st Model ARIMA 0,1,1

ARIMA regression
Sample:

1961 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -1392.427

D.Imports

OPG
Std. Err.

Coef.

P>|z|

=
=
=

54
5.92
0.0150

[95% Conf. Interval]

Imports
_cons

1.61e+10

ma
L1.

.1628361

.066913

2.43

0.015

.031689

.2939833

/sigma

3.82e+10

1.32e+09

28.98

0.000

3.56e+10

4.08e+10

ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.

After predicting the residuals, by applying wntestq test:


. wntestq e
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(25)
=

10.4811
0.9951

Applying AIC and BIC:


. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1392.427

2788.854

2792.832

Note:

N=Obs used in calculating BIC; see [R] BIC note

2nd Model ARIMA 0,2,1

ARIMA regression
Sample:

1962 - 2014

Number of obs
Wald chi2(1)
Prob > chi2

Log likelihood = -1367.656

=
=
=

53
119.45
0.0000

OPG
Std. Err.

P>|z|

[95% Conf. Interval]

6.70e+08

3.46e+08

1.93

0.053

-8734125

1.35e+09

ma
L1.

-.999991

.0914948

-10.93

0.000

-1.179317

-.8206644

/sigma

3.75e+10

D2.Imports

Coef.

Imports
_cons
ARMA

Note: The test of the variance against zero is one sided, and the two-sided confidence interval is
truncated at zero.

After predicting the residuals, by applying wntestq test:


. wntestq e2
Portmanteau test for white noise
Portmanteau (Q) statistic =
Prob > chi2(24)
=

13.7425
0.9523

Applying AIC and BIC


. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

53

-1367.656

2739.312

2743.252

Note:

N=Obs used in calculating BIC; see [R] BIC note

Conclusion: in both the cases it is a MA term, no AR term came significant in


either model. According to AIC and BIC the best suited model is ARIMA 0,2,1. A
moving average term integrated at second difference.

4. ARCH/GARCH Effects
1st Variable GDP:
Generating Log of concerned variable by following command
gen ln_GDP=GDP
Tsline Graphs of first difference of log of variable to see
the element of Volatility Clustering by the following
command:

-4.00e+11 -2.00e+11D.ln_GDP

2.00e+11 4.00e+11

tsline D.ln_GDP

1960

1980

2000
Year

2020

The graph is showing the arch effect but it will be verified by the
appropriate test i.e
Regress D.ln_GDP
. regress D.ln_GDP
Source

SS

df

MS

Model
Residual

0
8.2704e+23

0
53

.
1.5605e+22

Total

8.2704e+23

53

1.5605e+22

D.ln_GDP

Coef.

_cons

5.31e+10

Std. Err.
1.70e+10

t
3.13

Number of obs
F( 0,
53)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

54
0.00
.
0.0000
0.0000
1.2e+11

P>|t|

[95% Conf. Interval]

0.003

1.90e+10

8.72e+10

The test to determine the squared residuals heteroscadastic variance


the command is one of the post estimation test like this:
estat archlm, lags()
. estat archlm, lags(2)
LM test for autoregressive conditional heteroskedasticity (ARCH)
lags(p)

chi2

df

Prob > chi2

4.777

0.0918

H0: no ARCH effects

vs.

H1: ARCH(p) disturbance

The numbers of lags is determined according to the following


formula:
[12*(n/100)^1/4]

Thus according to the results H0 is rejected here, so we conclude


GDP is having volatility clustering that is arch effect in it. Now
appropriate model will be selected by using other formulas.
1st proposed arch model is
Arch D.ln_GDP, arch(1)
ARCH family regression
Sample: 1961 - 2014
Distribution: Gaussian
Log likelihood = -1442.601

D.ln_GDP

Coef.

Number of obs
Wald chi2(.)
Prob > chi2

OPG
Std. Err.

P>|z|

=
=
=

54
.
.

[95% Conf. Interval]

ln_GDP
_cons

1.66e+10

arch
L1.

1.679375

.477225

3.52

0.000

.7440308

2.614719

_cons

2.75e+21

ARCH

estat ic
. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1442.601

2887.203

2889.192

Note:

N=Obs used in calculating BIC; see [R] BIC note

2nd proposed arch model:

arch D.ln_GDP, arch(2)

ARCH family regression


Sample: 1961 - 2014
Distribution: Gaussian
Log likelihood = -1447.882

D.ln_GDP

Coef.

Number of obs
Wald chi2(.)
Prob > chi2

OPG
Std. Err.

P>|z|

=
=
=

54
.
.

[95% Conf. Interval]

ln_GDP
_cons

3.91e+10

arch
L2.

.8777948

.2761661

3.18

0.001

.3365192

1.41907

_cons

6.10e+21

ARCH

Estat ic:
. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

54

-1447.882

2897.763

2899.752

Note:

N=Obs used in calculating BIC; see [R] BIC note

Conclusion: according to AIC and BIC the best suited ARCH model for
GDP is ARCH (1).
2nd Variable Inflation Rate:
Generating Log of concerned variable by following command
gen ln_Inflation=Inflation

Tsline Graphs of first difference of log of variable to see


the element of Volatility Clustering by the following
command:

-10

-5

D.ln_Inflation

10

tsline D.ln_Inflation

1960

1980

2000

2020

Year

The graph is showing data has volatility clustering, but it will be proved
by proper tests.
Regress D.ln_Inflation

. regress D.ln_Inflation
Source

SS

df

Model
Residual

0
483.68159

0
52

.
9.30156903

Total

483.68159

52

9.30156903

D.
ln_Inflation

Coef.

_cons

-.0303988

MS

Std. Err.
.4189288

Number of obs
F( 0,
52)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

-0.07

0.942

=
=
=
=
=
=

53
0.00
.
0.0000
0.0000
3.0498

[95% Conf. Interval]


-.8710408

.8102433

Estat archlm, lags(2)


*lags are decided according to the formula
[12*(n/100)^1/4]
. estat archlm, lags(2)
LM test for autoregressive conditional heteroskedasticity (ARCH)
lags(p)

chi2

df

Prob > chi2

23.004

0.0000

H0: no ARCH effects

vs. H1: ARCH(p) disturbance

As p is less than alpha so H0 is rejected and it is concluded that data is


having arch effect in its residuals.
Arch D.ln_Inflation, arch(1)

ARCH family regression


Sample: 1962 - 2014
Distribution: Gaussian
Log likelihood = -114.0302

Number of obs
Wald chi2(.)
Prob > chi2

OPG
Std. Err.

=
=
=

53
.
.

D.
ln_Inflation

Coef.

ln_Inflation
_cons

-.0746097

.23802

-0.31

0.754

-.5411203

.3919008

arch
L1.

.983249

.4886243

2.01

0.044

.0255629

1.940935

_cons

1.694972

.6215302

2.73

0.006

.4767949

2.913148

P>|z|

[95% Conf. Interval]

ARCH

. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

53

-114.0302

234.0603

239.9712

Note: N=Obs used in calculating BIC; see [R] BIC note

2nd proposed model


Arch D.ln_Inflation, arch(1) garch(1)
ARCH family regression
Sample: 1962 - 2014
Distribution: Gaussian
Log likelihood = -114.2315

Number of obs
Wald chi2(.)
Prob > chi2

OPG
Std. Err.

=
=
=

53
.
.

D.
ln_Inflation

Coef.

ln_Inflation
_cons

-.0707637

.2041075

-0.35

0.729

-.4708069

.3292796

arch
L1.

.7834474

.4357573

1.80

0.072

-.0706211

1.637516

garch
L1.

.4497701

.2088906

2.15

0.031

.0403521

.8591881

_cons

.157091

.3021076

0.52

0.603

-.435029

.7492109

P>|z|

[95% Conf. Interval]

ARCH

Estat ic
. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

53

-114.2315

236.463

244.3442

Note: N=Obs used in calculating BIC; see [R] BIC note

Conclusion: According to AIC and BIC the best fitted arch/garch model
is Arch[1] model because of lesser values of AIC and BIC.
Interpretation: for every one unit change in year there will be .9824
unit chances of change in data clustering in the same direction.
3rd variable Interest Rate:
Tsline D.ln_Interest

10
5
-10

-5

D.ln_interest

1960

1980

2000

2020

Year

Graph is showing data can have volatility clustering but further tests are required
to validate.
Regress D.ln_interest
. regress D.ln_interest
Source

SS

df

MS

Model
Residual

0
267.657578

0
46

.
5.818643

Total

267.657578

46

5.818643

D.
ln_interest

Coef.

_cons

-.0804707

Estat archlm, lags(2)

Std. Err.
.3518535

t
-0.23

Number of obs
F( 0,
46)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.820

=
47
=
0.00
=
.
= 0.0000
= 0.0000
= 2.4122

[95% Conf. Interval]


-.7887152

.6277737

. estat archlm, lags(1)


LM test for autoregressive conditional heteroskedasticity (ARCH)
lags(p)

chi2

df

Prob > chi2

9.427

0.0021

H0: no ARCH effects

vs.

H1: ARCH(p) disturbance

H0 is rejected here and concluded that data have arch effects in it.
1st proposed model for Interest Rate
Arch D.ln_interest, arch(1)
ARCH family regression
Sample: 1968 - 2014
Distribution: Gaussian
Log likelihood = -98.06024

Number of obs
Wald chi2(.)
Prob > chi2

OPG
Std. Err.

=
=
=

47
.
.

D.
ln_interest

Coef.

ln_interest
_cons

-.1418719

.2965876

-0.48

0.632

-.7231729

.4394292

arch
L1.

.50474

.2833284

1.78

0.075

-.0505734

1.060053

_cons

2.302034

.5702961

4.04

0.000

1.184274

3.419794

P>|z|

[95% Conf. Interval]

ARCH

Estat ic
. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

47

-98.06024

202.1205

207.6709

Note:

N=Obs used in calculating BIC; see [R] BIC note

2nd proposed model


Arch D.ln_interest, ar(1) arch(1)
ARCH family regression -- AR disturbances
Sample: 1968 - 2014
Distribution: Gaussian
Log likelihood = -97.63469

Number of obs
Wald chi2(1)
Prob > chi2

OPG
Std. Err.

=
=
=

47
1.04
0.3075

D.
ln_interest

Coef.

ln_interest
_cons

-.1583056

.2678106

-0.59

0.554

-.6832048

.3665936

ar
L1.

-.1733027

.1698164

-1.02

0.307

-.5061367

.1595313

arch
L1.

.4564087

.2564416

1.78

0.075

-.0462076

.959025

_cons

2.355003

.5656965

4.16

0.000

1.246258

3.463748

P>|z|

[95% Conf. Interval]

ARMA

ARCH

. estat ic

Model

Obs

ll(null)

ll(model)

df

AIC

BIC

47

-97.63469

203.2694

210.67

Note: N=Obs used in calculating BIC; see [R] BIC note

Interpretation:
The best suited arch model for Interest rate is arch (1) model as it contains
lesser values of AIC and BIC. For every one unit change in year there will be
.5047 units chances of change in interest rate in the same direction.

4th Variable Exports:

0
-1.50e+11-1.00e+11-5.00e+10

D.ln_exports

5.00e+10 1.00e+11

Tsline D.ln_exports

1960

1980

2000

2020

Year

Regress D. ln_exports
. regress D.ln_exports
Source

SS

MS

Model
Residual

0
6.4587e+22

0
.
53 1.2186e+21

Total

6.4587e+22

53 1.2186e+21

D.ln_exports

Coef.

_cons

1.52e+10

df

Number of obs
F( 0,
53)
Prob > F
R-squared
Adj R-squared
Root MSE

=
54
=
0.00
=
.
= 0.0000
= 0.0000
= 3.5e+10

Std. Err.

P>|t|

[95% Conf. Interval]

4.75e+09

3.19

0.002

5.65e+09

2.47e+10

Estat archlm, lags(2)


. estat archlm, lags(2)
LM test for autoregressive conditional heteroskedasticity (ARCH)
lags(p)

chi2

df

Prob > chi2

3.864

0.1449

H0: no ARCH effects

vs. H1: ARCH(p) disturbance

Conclusion: H0 is accepted here and it is concluded that Exports do


not show sudden changes or volatility clustering in it.

5th Variable Imports:

-1.00e+11
-2.00e+11

D.ln_imports

1.00e+11

Tsline D.ln_imports

1960

1980

2000
Year

2020

Regress D.ln_imports
. regress D.ln_imports
Source

SS

df

MS

Model
Residual

0
8.0518e+22

0
.
53 1.5192e+21

Total

8.0518e+22

53 1.5192e+21

D.ln_imports

Coef.

_cons

1.61e+10

Number of obs
F( 0,
53)
Prob > F
R-squared
Adj R-squared
Root MSE

=
54
=
0.00
=
.
= 0.0000
= 0.0000
= 3.9e+10

Std. Err.

P>|t|

[95% Conf. Interval]

5.30e+09

3.04

0.004

5.51e+09

2.68e+10

Estat archlm, lags(2)


. estat archlm, lags(2)
LM test for autoregressive conditional heteroskedasticity (ARCH)
lags(p)

chi2

df

Prob > chi2

1.226

0.5416

H0: no ARCH effects

vs. H1: ARCH(p) disturbance

Conclusion:
H0 is accepted here and concluded that imports do not have the arch effect or
volatility clustering in it.

5. Cointegration:
1st pair GDP and Inflation:

1.000e+12

2.000e+12

3.000e+12

Tsline GDP Inflation:

1960

1980

2000
Year

GDP (Current US$)

Run Spurious Regression :

Inflation Rate

2020

. regress GDP Inflation


Source

SS

df

MS

Model
Residual

1.0609e+25
3.5728e+25

1
52

1.0609e+25
6.8707e+23

Total

4.6337e+25

53

8.7429e+23

GDP

Coef.

Inflation
_cons

-8.93e+10
1.57e+12

Std. Err.
2.27e+10
1.71e+11

t
-3.93
9.17

Number of obs
F( 1,
52)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.000

=
=
=
=
=
=

54
15.44
0.0003
0.2290
0.2141
8.3e+11

[95% Conf. Interval]


-1.35e+11
1.23e+12

-4.37e+10
1.91e+12

Number of obs
F( 2,
49)
Prob > F
R-squared
Adj R-squared
Root MSE

=
52
=
0.79
= 0.4618
= 0.0310
= -0.0085
= 3.2e+11

Predict residuals:
. reg D.e L.e D.L.e
Source

SS

df

MS

Model
Residual

1.5915e+23
4.9669e+24

2
49

7.9574e+22
1.0137e+23

Total

5.1261e+24

51

1.0051e+23

D.e

Coef.

Std. Err.

P>|t|

[95% Conf. Interval]

e
L1.
LD.

-.071485
.063168

.0576305
.1445435

-1.24
0.44

0.221
0.664

-.1872978
-.2273031

.0443278
.353639

_cons

4.82e+10

4.47e+10

1.08

0.286

-4.16e+10

1.38e+11

Conclusion: as L1 s value is not significant thus we accept H0 which


states there is no co integration between GDP and Inflation. The same
result was shown by tsline of both.

2nd Pair GDP and Exports

1.000e+12

2.000e+12

3.000e+12

tsline GDP Exports

1960

1980

2000

2020

Year
GDP (Current US$)

Exports(Goods, Services)

Graph shows both are co integrated, it will be verified by the respective tests.

Run spurious regression


. reg GDP Exports
Source

SS

df

MS

Model
Residual

4.6677e+25
6.2548e+23

1
53

4.6677e+25
1.1801e+22

Total

4.7302e+25

54

8.7597e+23

GDP

Coef.

Exports
_cons

3.527901
7.34e+10

Std. Err.
.0560962
2.13e+10

t
62.89
3.44

Number of obs
F( 1,
53)
Prob > F
R-squared
Adj R-squared
Root MSE

=
55
= 3955.18
= 0.0000
= 0.9868
= 0.9865
= 1.1e+11

P>|t|

[95% Conf. Interval]

0.000
0.001

3.415387
3.06e+10

3.640416
1.16e+11

Predict residuals
Now the next command is
regress D.e3 L.e3 D.L.e3
. regress D.e3 L.e3 D.L.e3
Source

SS

df

MS

Model
Residual

3.7828e+22
2.6731e+23

2
50

1.8914e+22
5.3462e+21

Total

3.0514e+23

52

5.8681e+21

Std. Err.

Number of obs
F( 2,
50)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

53
3.54
0.0366
0.1240
0.0889
7.3e+10

D.e3

Coef.

[95% Conf. Interval]

e3
L1.
LD.

-.2286055
-.0601567

.1017333
.1519005

-2.25
-0.40

0.029
0.694

-.4329428
-.3652578

-.0242683
.2449444

_cons

-1.09e+08

1.01e+10

-0.01

0.991

-2.03e+10

2.01e+10

H0: There is no cointegration


H1: There is cointegration
Here L1s t calculated value is less than supplied table value of 0.029 so H0 is rejected and it is
concluded that GDP and Exports are cointegrated.

Hence all of the three conditions of

cointegration Engle Granger test are fulfilled which are:

Both variables are integrated at the same difference

L1 is significant

Coefficient of L1 is negative

Error Correction Model:


. reg D.GDP D.Exports L.e2
Source

SS

df

MS

Model
Residual

5.7251e+23
2.5454e+23

2
51

2.8625e+23
4.9910e+21

Total

8.2704e+23

53

1.5605e+22

D.GDP

Coef.

Std. Err.

Exports
D1.

3.054832

.285246

e2
L1.

-.2096698

_cons

7.07e+09

Number of obs
F( 2,
51)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

54
57.35
0.0000
0.6922
0.6802
7.1e+10

P>|t|

[95% Conf. Interval]

10.71

0.000

2.482177

3.627487

.0920713

-2.28

0.027

-.3945107

-.0248288

1.05e+10

0.67

0.505

-1.41e+10

2.82e+10

Conclusion: The negative sign of coefficient of error term is negative and significant , its
stationaity is also proved by following dfuller test, hence error correction model is fit.
. dfuller e2
Dickey-Fuller test for unit root

Z(t)

Number of obs

Test
Statistic

1% Critical
Value

-2.674

-3.574

54

Interpolated Dickey-Fuller
5% Critical
10% Critical
Value
Value

MacKinnon approximate p-value for Z(t) = 0.0787

-2.927

-2.598

1.000e+12

2.000e+12

3.000e+12

3rd Pair GDP and Imports:

1960

1980

2000

2020

Year
GDP (Current US$)

Imports(Goods, Services)

Graph shows data is cointegrated


Run spurious regression
. reg GDP Imports
Source

SS

df

MS

Model
Residual

4.6758e+25
5.4435e+23

1
53

4.6758e+25
1.0271e+22

Total

4.7302e+25

54

8.7597e+23

GDP

Coef.

Imports
_cons

3.252524
9.67e+10

Predict residuals

Std. Err.
.0482052
1.96e+10

t
67.47
4.93

Number of obs
F( 1,
53)
Prob > F
R-squared
Adj R-squared
Root MSE

=
55
= 4552.54
= 0.0000
= 0.9885
= 0.9883
= 1.0e+11

P>|t|

[95% Conf. Interval]

0.000
0.000

3.155837
5.73e+10

3.349212
1.36e+11

. reg D.e L.e D.L.e


Source

SS

df

MS

Model
Residual

3.6445e+22
2.1609e+23

2
50

1.8223e+22
4.3219e+21

Total

2.5254e+23

52

4.8565e+21

Std. Err.

Number of obs
F( 2,
50)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

53
4.22
0.0203
0.1443
0.1101
6.6e+10

D.e

Coef.

[95% Conf. Interval]

e
L1.
LD.

-.1950144
-.1766348

.0970647
.1506306

-2.01
-1.17

0.050
0.246

-.3899746
-.4791852

-.0000543
.1259156

_cons

5.10e+08

9.04e+09

0.06

0.955

-1.77e+10

1.87e+10

Here L1s t calculated value is less than supplied table value of -2.01 so H0 is rejected and it is
concluded that GDP and Imports are cointegrated.

Hence all of the three conditions of

cointegration Engle Granger test are fulfilled which are:

Both variables are integrated at the same difference

L1 is significant

Coefficient of L1 is negative

Error Correction Model:


. reg D.GDP D.Imports L.epsilon
Source

SS

df

MS

Model
Residual

6.1744e+23
2.0961e+23

2
51

3.0872e+23
4.1100e+21

Total

8.2704e+23

53

1.5605e+22

Std. Err.

Number of obs
F( 2,
51)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

54
75.11
0.0000
0.7466
0.7366
6.4e+10

D.GDP

Coef.

[95% Conf. Interval]

Imports
D1.

2.84505

.2324736

12.24

0.000

2.37834

3.311761

epsilon
L1.

-.1994135

.0895559

-2.23

0.030

-.3792045

-.0196225

_cons

7.35e+09

9.49e+09

0.77

0.442

-1.17e+10

2.64e+10

Conclusion: as error term s L1 is significant and negative, now stationaity of


error will be checked as:
. dfuller epsilon
Dickey-Fuller test for unit root

Z(t)

Number of obs

Test
Statistic

1% Critical
Value

-2.664

-3.574

54

Interpolated Dickey-Fuller
5% Critical
10% Critical
Value
Value
-2.927

-2.598

MacKinnon approximate p-value for Z(t) = 0.0806


.

Conclusion: as error term is also stationary , thus error correction model is fit.

4th pair Exports and Imports

6.000e+11
8.000e+11
2.000e+11
4.000e+11
1.000e+12

Tsline Exports Imports

1960

1980

2000

2020

Year
Exports(Goods, Services)

Imports(Goods, Services)

Run spurious regression


Reg exports imports
. reg Exports Imports
Source

SS

df

MS

Model
Residual

3.7422e+24
8.0959e+21

1
53

3.7422e+24
1.5275e+20

Total

3.7503e+24

54

6.9451e+22

Exports

Coef.

Imports
_cons

.9201482
7.13e+09

Std. Err.
.0058788
2.39e+09

t
156.52
2.98

Number of obs
F( 1,
53)
Prob > F
R-squared
Adj R-squared
Root MSE

=
55
=24498.63
= 0.0000
= 0.9978
= 0.9978
= 1.2e+10

P>|t|

[95% Conf. Interval]

0.000
0.004

.9083568
2.33e+09

.9319395
1.19e+10

. predict e, residuals
. reg D.e L.e D.L.e
Source

SS

df

MS

Model
Residual

5.0239e+20
3.5537e+21

2
50

2.5119e+20
7.1073e+19

Total

4.0561e+21

52

7.8001e+19

Std. Err.

Number of obs
F( 2,
50)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

53
3.53
0.0367
0.1239
0.0888
8.4e+09

D.e

Coef.

[95% Conf. Interval]

e
L1.
LD.

-.2484818
-.0111272

.1013902
.1419242

-2.45
-0.08

0.018
0.938

-.4521299
-.2961904

-.0448336
.2739359

_cons

2.96e+08

1.16e+09

0.26

0.800

-2.03e+09

2.62e+09

H0: There is no cointegration


H1: There is cointegration
Here L1s t calculate value -2.45 is less than table value so H0 is rejected and it is concluded that
Exports and Imports are cointegrated. Hence all of the three conditions of cointegration Engle
Granger test are fulfilled which are:

Both variables are integrated at the same difference

L1 is significant

Coefficient of L1 is negative

Error Correction Model:


Reg D.exports D.imports L.e

. reg D.Exports D.Imports L.e


Source

SS

df

MS

Model
Residual

6.1213e+22
3.3738e+21

2
51

3.0607e+22
6.6154e+19

Total

6.4587e+22

53

1.2186e+21

Std. Err.

Number of obs
F( 2,
51)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

54
462.66
0.0000
0.9478
0.9457
8.1e+09

D.Exports

Coef.

[95% Conf. Interval]

Imports
D1.

.8725537

.0287025

30.40

0.000

.814931

.9301764

e
L1.

-.2423954

.0911093

-2.66

0.010

-.425305

-.0594857

_cons

1.04e+09

1.20e+09

0.87

0.391

-1.37e+09

3.45e+09

Conclusion: as error term s L1 is significant and negative, now stationaity of


error will be checked as:
. dfuller e
Dickey-Fuller test for unit root

Z(t)

Number of obs

Test
Statistic

1% Critical
Value

-2.705

-3.574

54

Interpolated Dickey-Fuller
5% Critical
10% Critical
Value
Value
-2.927

-2.598

MacKinnon approximate p-value for Z(t) = 0.0731


.

Third condition of ECM also satisfied hence error correction model is fit.

5th Pair Inflation and Interest

-10

10

20

30

Tsline inflation interest

1960

1980

2000

2020

Year
Inflation Rate

Real Interest Rate

Run spurious regression


Reg Inflation Interest
. reg Inflation Interest
Source

SS

df

MS

Model
Residual

525.115503
773.362228

1
46

525.115503
16.8122224

Total

1298.47773

47

27.6271858

Inflation

Coef.

Interest
_cons

-.9330964
7.288771

Std. Err.
.1669597
.6414647

t
-5.59
11.36

Number of obs
F( 1,
46)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.000

=
=
=
=
=
=

48
31.23
0.0000
0.4044
0.3915
4.1003

[95% Conf. Interval]


-1.269169
5.99757

-.597024
8.579973

Predict residuals
Reg D.e L.e D.L.e
. predict e, res
(7 missing values generated)
. reg D.e L.e D.L.e
Source

SS

df

MS

Model
Residual

14.8552694
138.377954

2 7.42763468
43 3.21809196

Total

153.233223

45 3.40518274

Std. Err.

Number of obs
F( 2,
43)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

46
2.31
0.1116
0.0969
0.0549
1.7939

D.e

Coef.

[95% Conf. Interval]

e
L1.
LD.

-.113007
.2765788

.0698214
.1513627

-1.62
1.83

0.113
0.075

-.2538153
-.0286732

.0278014
.5818307

_cons

-.0662731

.2654936

-0.25

0.804

-.6016919

.4691457

Hence all of the three conditions of cointegration Engle Granger test are fulfilled which are:

Both variables are integrated at the same difference

L1 is significant

Coefficient of L1 is negative

Conclusion: as calculated value -1.62 is less than table value so h0 is


rejected and concluded that there is cointegration between inflation rate
and interest rate.
Error Correction Model:
reg D.Inflation D.Interest L.e

. reg D.Inflation D.Interest L.epsilon


Source

SS

df

MS

Model
Residual

329.852801
143.531706

2
164.9264
44 3.26208422

Total

473.384506

46 10.2909675

Std. Err.

Number of obs
F( 2,
44)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

=
=
=
=
=
=

47
50.56
0.0000
0.6968
0.6830
1.8061

D.Inflation

Coef.

[95% Conf. Interval]

Interest
D1.

-1.085917

.1130621

-9.60

0.000

-1.313778

-.8580548

epsilon
L1.

-.0572412

.0685676

-0.83

0.408

-.1954301

.0809476

_cons

-.1031298

.2638602

-0.39

0.698

-.6349051

.4286454

Conclusion: as error term s L1 is not significant, thus error correction model is


not fit.

7. Vector Autoregression (VAR)


1st Pair GDP,Exports, Imports
The first step of VAR model is to determine the stationarity of the data. This
procedure is being performed in 1st topic of this assignment. The data is not
stationary at the level; rather data is stationary at first difference.
I . Determining the appropriate number of Lags:
Varsoc GDP Exports Imports,maxlag(4)
. varsoc GDP Exports Imports, maxlag(4)
Selection-order criteria
Sample: 1964 - 2014
lag
0
1
2
3
4

LL

LR

-4039.78
-3891.46
-3883.29
-3865.61
-3848.93

Endogenous:
Exogenous:

296.64
16.339
35.368
33.363*

Number of obs
df

FPE

AIC

9
9
9
9

0.000
0.060
0.000
0.000

1.4e+65
6.1e+62
6.3e+62
4.5e+62
3.4e+62*

158.54
153.077
153.109
152.769
152.468*

HQIC
158.584
153.251
153.413
153.203
153.032*

51
SBIC
158.654
153.531*
153.905
153.905
153.945

GDP Exports Imports


_cons

Thus the most appropriate number of Lags is 4, as suggested by most of the


selection criteria.
II. Choosing whether it is Unrestricted VAR or Restricted VAR:
Command is:
Vecrank GDP Exports Imports, trend(constant) lag(4)max

. vecrank GDP Exports Imports, trend(constant) lag(4)max


Johansen tests for cointegration
Trend: constant
Sample: 1964 - 2014

maximum
rank
0
1
2
3

maximum
rank
0
1
2
3

parms
30
35
38
39

parms
30
35
38
39

LL
-3865.9695
-3853.6663
-3849.1933
-3848.9254

LL
-3865.9695
-3853.6663
-3849.1933
-3848.9254

Number of obs =
Lags =

eigenvalue
.
0.38275
0.16089
0.01045

eigenvalue
.
0.38275
0.16089
0.01045

51
4

5%
trace
critical
statistic
value
34.0882
29.68
9.4819*
15.41
0.5358
3.76

max
statistic
24.6063
8.9462
0.5358

5%
critical
value
20.97
14.07
3.76

Results:
As calculated value 15.41 is greater than trace statistics 9.4819 so we cant reject
h0.
H0: data is not cointegrated
H1: data is cointegrated
Conclusion: the Data is not cointegrated so unrestricted VAR test will be used.
III. Unrestricted VAR Test:
Command:
Var diffGDP diffExports diffImports, lags(1/4)
*as appropriate number of lags determined in 1st step states it should have 4 lags.

. var D.GDP D.Exports D.Imports, lags(1/4)


Vector autoregression
Sample: 1965 - 2014
Log likelihood = -3779.552
FPE
= 4.50e+62
Det(Sigma_ml) = 9.12e+61

No. of obs
AIC
HQIC
SBIC

Equation

Parms

RMSE

R-sq

chi2

P>chi2

D_GDP
D_Exports
D_Imports

13
13
13

1.1e+11
3.0e+10
3.4e+10

0.4576
0.4615
0.4771

42.18965
42.84365
45.61679

0.0000
0.0000
0.0000

Coef.

Std. Err.

P>|z|

=
=
=
=

50
152.7421
153.31
154.2335

[95% Conf. Interval]

D_GDP
GDP
LD.
L2D.
L3D.
L4D.

.380519
-.8739826
.6377902
-.3640291

.2628017
.2634491
.2903967
.3096911

1.45
-3.32
2.20
-1.18

0.148
0.001
0.028
0.240

-.1345628
-1.390333
.0686232
-.9710125

.8956009
-.3576319
1.206957
.2429543

Exports
LD.
L2D.
L3D.
L4D.

3.722847
-2.366835
-1.106319
-4.045534

1.885719
1.881631
1.922412
2.275415

1.97
-1.26
-0.58
-1.78

0.048
0.208
0.565
0.075

.0269059
-6.054764
-4.874178
-8.505266

7.418788
1.321095
2.66154
.4141971

Imports
LD.
L2D.
L3D.
L4D.

-2.496808
2.902288
.7549021
3.413825

2.054648
1.893657
1.971358
2.10747

-1.22
1.53
0.38
1.62

0.224
0.125
0.702
0.105

-6.523844
-.8092123
-3.108889
-.71674

1.530229
6.613789
4.618693
7.544391

_cons

4.79e+10

1.77e+10

2.70

0.007

1.32e+10

8.26e+10

GDP
LD.
L2D.
L3D.
L4D.

.1107332
-.245669
.2401332
.0559665

.0731075
.0732876
.0807841
.0861515

1.51
-3.35
2.97
0.65

0.130
0.001
0.003
0.516

-.032555
-.3893101
.0817993
-.1128873

.2540213
-.1020279
.398467
.2248203

Exports
LD.
L2D.
L3D.
L4D.

.2696115
.0728646
.1250753
-1.465594

.5245791
.523442
.5347867
.6329868

0.51
0.14
0.23
-2.32

0.607
0.889
0.815
0.021

-.7585446
-.9530629
-.9230874
-2.706225

1.297768
1.098792
1.173238
-.2249623

Imports
LD.
L2D.
L3D.
L4D.

-.1699957
.2111111
-.5271659
.9518542

.5715727
.5267875
.5484027
.586267

-0.30
0.40
-0.96
1.62

0.766
0.689
0.336
0.104

-1.290258
-.8213734
-1.602016
-.197208

.9502662
1.243596
.5476836
2.100916

_cons

1.49e+10

4.93e+09

3.02

0.002

5.25e+09

2.46e+10

D_Exports

Interpretation: For Example for every one unit change in Lag 1 of GDP, there
will be .3805 units change in GDP in the same direction. Similarly interpretations

for all variables can be made. If coefficients has positive sign it means change will
be in the same direction.

D_Imports
GDP
LD.
L2D.
L3D.
L4D.

.1546579
-.2962858
.2876106
.0249989

.0804924
.0806907
.0889444
.094854

1.92
-3.67
3.23
0.26

0.055
0.000
0.001
0.792

-.0031043
-.4544366
.1132829
-.1609115

.3124202
-.1381349
.4619384
.2109092

Exports
LD.
L2D.
L3D.
L4D.

.166054
.1686138
.0473798
-1.423096

.5775689
.5763169
.5888075
.6969272

0.29
0.29
0.08
-2.04

0.774
0.770
0.936
0.041

-.9659602
-.9609465
-1.106662
-2.789048

1.298068
1.298174
1.201421
-.0571436

Imports
LD.
L2D.
L3D.
L4D.

-.1459721
.2636059
-.62161
1.016463

.6293094
.5800003
.603799
.645488

-0.23
0.45
-1.03
1.57

0.817
0.649
0.303
0.115

-1.379396
-.8731739
-1.805034
-.2486708

1.087452
1.400386
.5618142
2.281596

_cons

1.54e+10

5.43e+09

2.84

0.004

4.79e+09

2.61e+10

if coefficients has negative sign like in the case of Exports as dependent


variable, lag 2 of Exports states that for every one unit change in L2 of Exports
there will be .768 units change in Exports in the opposite direction.
Opposite direction means:
Increse in lagDecrease in coming period
Decrease in lagIncrease in coming period

IV. Checking the Stability of VAR:


Command immediately after running the regression:
varstable, graph

-1

-.5

Imaginary

.5

Roots of the companion matrix

-1

-.5

0
Real

.5

. varstable, graph
Eigenvalue stability condition
Eigenvalue
.4883815
.4883815
-.2904646
-.2904646
-.6281226
-.6281226
-.8143904
.6841111
.6841111
.1866678
.1866678
.4374025

+
+
+
-

.7509101i
.7509101i
.820659i
.820659i
.5772116i
.5772116i

+
+
-

.4168689i
.4168689i
.5687755i
.5687755i

Modulus
.895758
.895758
.870546
.870546
.85306
.85306
.81439
.801116
.801116
.598624
.598624
.437402

All the eigenvalues lie inside the unit circle.


VAR satisfies stability condition.
.

Conclusion:
This VAR model satisfies the condition of Stability, means this model is reluctant
to change while change in other factors. One might say it is the robustness of the
model.
V. Granger Causality of VAR:
As processes show that data is not cointegrated, so in order to determine the short
run causality the var model will be run on first difference of variables. After
regression the granger causality will be checked. When Granger is applied on first
difference this will predict short run causality.

. var D.GDP D.Exports D.Imports


Vector autoregression
Sample: 1963 - 2014
Log likelihood = -3954.103
FPE
= 5.05e+62
Det(Sigma_ml) = 2.24e+62
Equation

Parms

D_GDP
D_Exports
D_Imports

7
7
7

Coef.

No. of obs
AIC
HQIC
SBIC
RMSE

R-sq

chi2

P>chi2

1.2e+11
3.2e+10
3.5e+10

0.2632
0.2848
0.3240

18.57352
20.70917
24.92176

0.0049
0.0021
0.0004

Std. Err.

P>|z|

=
=
=
=

52
152.8886
153.1907
153.6766

[95% Conf. Interval]

D_GDP
GDP
LD.
L2D.

.5204809
-.6347128

.2628698
.2769794

1.98
-2.29

0.048
0.022

.0052655
-1.177583

1.035696
-.0918431

Exports
LD.
L2D.

2.266529
-1.622448

1.863029
1.828841

1.22
-0.89

0.224
0.375

-1.384941
-5.206911

5.917999
1.962016

Imports
LD.
L2D.

-2.25667
2.405585

1.948993
1.872425

-1.16
1.28

0.247
0.199

-6.076627
-1.2643

1.563286
6.075469

_cons

4.80e+10

1.72e+10

2.79

0.005

1.43e+10

8.17e+10

GDP
LD.
L2D.

.161815
-.186485

.0723409
.0762238

2.24
-2.45

0.025
0.014

.0200295
-.3358809

.3036005
-.0370891

Exports
LD.
L2D.

.1463618
.0712939

.5126991
.5032908

0.29
0.14

0.775
0.887

-.8585101
-.9151379

1.151234
1.057726

Imports
LD.
L2D.

-.3037624
.1557817

.5363561
.5152847

-0.57
0.30

0.571
0.762

-1.355001
-.8541578

.7474763
1.165721

_cons

1.59e+10

4.73e+09

3.36

0.001

6.64e+09

2.52e+10

GDP
LD.
L2D.

.215134
-.2436152

.0785389
.0827545

2.74
-2.94

0.006
0.003

.0612007
-.4058109

.3690674
-.0814194

Exports
LD.
L2D.

.213366
-.0023038

.556626
.5464116

0.38
-0.00

0.701
0.997

-.877601
-1.073251

1.304333
1.068643

Imports
LD.
L2D.

-.4856613
.4055034

.5823099
.5594332

-0.83
0.72

0.404
0.469

-1.626968
-.6909654

.6556452
1.501972

_cons

1.61e+10

5.14e+09

3.14

0.002

6.04e+09

2.62e+10

D_Exports

D_Imports

VAR Granger:
. vargranger
Granger causality Wald tests
Equation

Excluded

chi2

df Prob > chi2

D_GDP
D_GDP
D_GDP

D.Exports
D.Imports
ALL

2.5453
3.9025
5.4141

2
2
4

0.280
0.142
0.247

D_Exports
D_Exports
D_Exports

D.GDP
D.Imports
ALL

13.385
.52097
16.108

2
2
4

0.001
0.771
0.003

D_Imports
D_Imports
D_Imports

D.GDP
D.Exports
ALL

19.699
.14925
21.966

2
2
4

0.000
0.928
0.000

H0: GDPs lagged values does not cause change in Exports and Imports
H1: GDPs lagged values cause change in Exports and Imports
Similarly such hypotheses are developed for each variable in the VAR
model.
Conclusion:
For GDP:
GDPs lagged values do not cause change in Exports and Imports in the
short run.
For Exports:
Exports lagged values cause change in GDP in the short run.
For Imports:

Imports lagged values cause change in GDP in the short run.


*Imports and Exports do not cause change in each other in the short
run.
VI . Autocorrelation of Errors:
The varlmar performs a Lagrange multiplier test for the joint null hypothesis
of no auto-correlation of the residuals of the two equations:
. varlmar, mlag(4)
Lagrange-multiplier test
lag

chi2

df

Prob > chi2

1
2
3
4

21.5198
23.2392
24.9213
6.4620

9
9
9
9

0.01053
0.00568
0.00306
0.69294

H0: no autocorrelation at lag order


.

Conclusion:
According to Lagrange multiplier test, there is no autocorrelation of errors in the
proposed VAR Model.

Concluding Remark on the Results:


The Time series results obtained from this real data set indicated that
results are according to theory. For example the economical
relationship between GDP and Exports is proved with the results as
theory suggests.

Você também pode gostar