tvtpTx: Dynamic Student-t Copula Model with exogenous variable

Description Usage Arguments Details Value Author(s) References Examples

Description

This function estimates the parameter(s) of a bivariate dynamic student-t copula with exogenous variable using maximum likelihood estimation.

Usage

1
dynamicTX(data,z, plot=TRUE)

Arguments

data

The matrix T x 2 margins of the two random varibles

data

plot the time varying dependence parameter (plot=TRUE, default)

z

The vector T x exogenous variable

Details

This model can be used as an alternative way of connecting the marginal distributions to restore the joint distribution. The ARMA(1,10) process of Patton(2006) is extened to ARMAX(1,10), thus the additional exogenous variable is added in the time varying copula equaiton.

Value

result

Estimated parameter, Standard error, t-stat, p-value

AIC

Akaiki Information Criteria

BIC

Bayesain Information Criteria

Loglikelihood

Log Likeihood function'

tvtpdep

the vector of time varying dependence parameter

Author(s)

Woraphon Yamaka

References

Patton, A. J. (2006). Modelling asymmetric exchange rate dependence. International economic review, 47(2), 527-556.

Maneejuk, P., & Yamaka, W. (2019). Predicting Contagion from the US Financial Crisis to International Stock Markets Using Dynamic Copula with Google Trends. Mathematics, 7(11), 1032.

Examples

 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
26
27
28
29
30
31
library(VineCopula)
library("tseries")
library("quantmod")
library("PerformanceAnalytics")

tckk <- c("^N225", "CL=F","^DJI") # ticker names defined
numtk <- length(tckk);
ustart <- "2010-12-30";
uend <- "2020-2-29" # start and end date
all_dat <- list(); # empty list to fill in the data
for(i in 1:numtk)
{
  all_dat[[i]] <- xxx <- get.hist.quote(instrument = tckk[i], start=ustart, end=uend, quote = c("Close"), provider = "yahoo", compression = "m")
}
OIL=all_dat[[2]]+0.000001
N225=all_dat[[1]]
DOWJ=all_dat[[3]]
rOIL=diff(log(OIL))     # exogenous variable
rN225=diff(log(N225))
rDOWJ=diff(log(DOWJ))
# normal margins
u=pnorm(rDOWJ/sd(rDOWJ))
v=pnorm(rN225/sd(rN225))

# Correlation rho
cor(u,v)
# maximum likelihood estimates for comparison
BiCopEst(u, v, family = 2, method = "mle")
# Dynamic Stdent-t Copula
data=cbind(u,v)
model=dynamicTx(data, z=rOIL, plot=TRUE)

woraphonyamaka/TVTPcop documentation built on June 6, 2020, 9:47 a.m.