Cointegration in when two random series are connected by some form of relationship. The relationship is that of linear correlation; when one factor rises or falls, the other rises or falls with it. Consumption and Income would be co-integrated as consumption is dependent on current income which is why when current income takes either positive / negative shock consumption would also experience the same shock and vice versa, that shocks to current consumption there would also be an effect current income.
Stock Price and Dividends would be thought to be co-integrated as dividends should be retrospect to the price of their stock. As if prices change without a change to the dividend then the effect is transitory but if the dividends change then that should be reflected similarly in the change in the stock price.
The point of this paper was to test if there was mean-reversion in GNP and stock prices as to examine long run properties. To help examine these relationships there needed to be a good forecaster of GNP growth and stock price alteration. The Consumption GNP ratio was used as a forecaster for GNP growth as due to the co-integration of income and consumption it would be a useful indicator. As if consumption did not change then effects on GNP were believed to be transitory. That is that GNP would have mean reversion as only permanent effects could change it thus it would return to a natural state after a transitory effect. Near similar results were attained in Stock Prices as using the forecast ability of the Price Dividend ratio that without changes to dividends the effects were transitory and there would eventually be a mean reversion.
If there is an increase in a stock price but there is no change to the dividend then according to the result obtained in this research the change in price would be transitory. That given an amount of time there would be mean reversion and stock would settle back at some long run equilibrium. There would be no change in the dividend amount and the stock price would temporarily rise before returning to the mean.
If there is a decrease in GDP and there is also a decrease in consumption then there is likely to be a permanent fall in both. Due to research taken by others and in this paper the relationship between income and consumption is a useful indicator for the future and if consumption falls with the fall in GDP then near all believe that these effects in income will last.
Consumption defines the trend in GNP as it provides a good measure of expectations in the long run of GNP.
library(vars); library(dplyr); library(tsDyn) #the hardest part is probably trying to find out why tsDyn didn't load (needed "iterators" package)
## Warning: package 'vars' was built under R version 3.2.2
## Loading required package: MASS
## Loading required package: strucchange
## Warning: package 'strucchange' was built under R version 3.2.2
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 3.2.2
##
## Attaching package: 'zoo'
##
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Loading required package: sandwich
## Warning: package 'sandwich' was built under R version 3.2.2
## Loading required package: urca
## Warning: package 'urca' was built under R version 3.2.2
## Loading required package: lmtest
## Warning: package 'lmtest' was built under R version 3.2.2
##
## Attaching package: 'dplyr'
##
## The following object is masked from 'package:MASS':
##
## select
##
## The following objects are masked from 'package:stats':
##
## filter, lag
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Warning: package 'tsDyn' was built under R version 3.2.2
#the following data is All sectors; Final Consumption Expenditure (series type: trend) and Gross Domestic Product (series type: trend)
olddata <- read.csv("week11 gdp - cons.csv")
newdata <- log(olddata)
newnewdata <- newdata %>% mutate(d.GDP = c(NA, diff(GDP)),
d.CONS = c(NA, diff(CONS))) %>% #added difference columns with lag
filter(!is.na(d.GDP)) %>% #deleted rows with NA
select(-GDP, -CONS) #deleted GDP and CONS columns
myfittedmodel <- VAR(newnewdata, p = 3, type = "const") #used lag value of 3 to minimise the number
AIC(myfittedmodel)
## [1] -4201.987
myirfs <- irf(myfittedmodel)
plot(myirfs)
vecm2 <- VECM(data = newdata, lag = 3, r = 1, include = "const", estim = "ML", beta = 0) #used logs
AIC(vecm2)
## [1] -5448.256
myirfs2 <- irf(vecm2)
plot(myirfs2)
vecm3 <- VECM(data = newnewdata, lag = 3, r = 1, include = "const", estim = "ML", beta = 0) #used differences
AIC(vecm3)
## [1] -5405.832
myirfs3 <- irf(vecm3)
plot(myirfs3)
future <- predict(myfittedmodel, n.ahead = 4)
plot(future)
#learning these R codes throughout the semester was actually fun, though it just may be my personal experience - Jack Nguyen