Title: | Geopolitical Volatility (GEOVOL) Modelling |
---|---|
Description: | Simulation, estimation and inference for the geopolitical volatility (GEOVOL) model of Engle and Campos-Martins (2020) <doi:10.2139/ssrn.3685213>, where GEOVOL is modelled as a latent multiplicative volatility factor with heterogeneous factor loadings. Estimation is carried out as a maximization-maximization procedure, where GEOVOL and the GEOVOL loadings are estimated iteratively until convergence. |
Authors: | Susana Campos-Martins [aut, cre] |
Maintainer: | Susana Campos-Martins <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-12-11 06:44:44 UTC |
Source: | CRAN |
Simulation, estimation and inference for the geopolitical volatility (GEOVOL) model of Engle and Campos-Martins (2020) <doi:10.2139/ssrn.3685213>, where GEOVOL is modelled as a latent multiplicative volatility factor with heterogeneous factor loadings. Estimation is carried out as a maximization-maximization procedure, where GEOVOL and the GEOVOL loadings are estimated iteratively until convergence.
Package: | GEOVOL |
Type: | Package |
Version: | 1.0 |
Date: | 2021-07-08 |
License: | GPL>=2 |
Susana Campos-Martins, https://sites.google.com/site/susanacamposmartins/
Maintainer: Susana Campos-Martins
Engle, R.F. and Campos-Martins, S. (2020) Measuring and hedging geopolitical risk. Available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3685213.
set.seed(123) ## Simulate from a GEOVOL model (default): eSim <- geovolSim(n = 1500, m = 30) ## Test for GEOVOL: geovolTest(e = eSim^2-1) ## Estimate a GEOVOL model: eEst <- geovol(e = eSim) eEst
set.seed(123) ## Simulate from a GEOVOL model (default): eSim <- geovolSim(n = 1500, m = 30) ## Test for GEOVOL: geovolTest(e = eSim^2-1) ## Estimate a GEOVOL model: eEst <- geovol(e = eSim) eEst
Extraction functions for objects of class 'geovol'.
## S3 method for class 'geovol' coef(object, as.zoo = TRUE, ...) ## S3 method for class 'geovol' fitted(object, as.zoo = TRUE, ...) ## S3 method for class 'geovol' logLik(object, ...) ## S3 method for class 'geovol' nobs(object, ...) ## S3 method for class 'geovol' print(x, n.extreme = 20, ...) ## S3 method for class 'geovol' residuals(object, as.zoo = TRUE, ...)
## S3 method for class 'geovol' coef(object, as.zoo = TRUE, ...) ## S3 method for class 'geovol' fitted(object, as.zoo = TRUE, ...) ## S3 method for class 'geovol' logLik(object, ...) ## S3 method for class 'geovol' nobs(object, ...) ## S3 method for class 'geovol' print(x, n.extreme = 20, ...) ## S3 method for class 'geovol' residuals(object, as.zoo = TRUE, ...)
object |
an object of class 'geovol'. |
x |
an object of class 'geovol'. |
as.zoo |
logical. If |
n.extreme |
|
... |
additional arguments. |
coef: |
numeric vector containing parameter estimates. |
fitted: |
fitted (squared) GEOVOL time series. |
logLik: |
log-likelihood (normal density). |
nobs: |
the number of observations used in the estimation. |
print: |
print of the estimation results. |
residuals: |
GEOVOL standardised residuals. |
Susana Campos-Martins
Engle, R.F. and Campos-Martins, S. (2020) Measuring and hedging geopolitical risk. Available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3685213.
set.seed(123) ## Simulate from a GEOVOL model (default): eSim <- geovolSim(n = 1000, m = 30) ## Test for GEOVOL eTest <- geovolTest(e = eSim^2) ## Estimate a GEOVOL model: geovolEst <- geovol(e = eSim) ## Print estimation results: print(geovolEst) ## Extract coefficients: coef(geovolEst) ## Extract and store GEOVOL: sigma2Est <- fitted(geovolEst) ## Extract optimised log-likelihood values: logLik(geovolEst) ## Extract and store GEOVOL standardised residuals: etaEst <- residuals(geovolEst)
set.seed(123) ## Simulate from a GEOVOL model (default): eSim <- geovolSim(n = 1000, m = 30) ## Test for GEOVOL eTest <- geovolTest(e = eSim^2) ## Estimate a GEOVOL model: geovolEst <- geovol(e = eSim) ## Print estimation results: print(geovolEst) ## Extract coefficients: coef(geovolEst) ## Extract and store GEOVOL: sigma2Est <- fitted(geovolEst) ## Extract optimised log-likelihood values: logLik(geovolEst) ## Extract and store GEOVOL standardised residuals: etaEst <- residuals(geovolEst)
Maximum likehlihood estimation of the GEOVOL and GEOVOL loadings. Estimation is carried out as a maximization-maximization procedure, where the latent multiplicative volatility factor and the factor loadings are estimated iteratively until convergence. Either a balanced or an unbalanced panel can be used. For each point in time t, GEOVOL is estimated using all the available values in the cross-section. The GEOVOL loadings are estimated for each time series.
geovol(e, initial.values = list())
geovol(e, initial.values = list())
e |
matrix, multivariate time series or |
initial.values |
a list containing the initial parameter values passed on to the optimization routine (optim for the GEOVOL factor and loadings. If list(), the default, then the values are chosen automatically; |
An object of class 'geovol'.
Susana Campos-Martins
Engle, R.F. and Campos-Martins, S. (2020) Measuring and hedging geopolitical risk. Available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3685213.
geovol
,
geovolSim
,
geovolTest
,
optim
,
set.seed(123) ## Simulate from a GEOVOL model (default): eSim <- geovolSim(n = 1000, m = 30) ## Test for GEOVOL geovolTest(e = eSim^2-1) ## Estimate a GEOVOL model: geovolEst <- geovol(e = eSim) ## Print estimation results: print(geovolEst) ## Extract coefficients: coef(geovolEst) ## Extract and store GEOVOL: sigma2Est <- fitted(geovolEst) ## Extract optimised log-likelihood values: logLik(geovolEst) ## Extract and store GEOVOL standardised residuals: etaEst <- residuals(geovolEst)
set.seed(123) ## Simulate from a GEOVOL model (default): eSim <- geovolSim(n = 1000, m = 30) ## Test for GEOVOL geovolTest(e = eSim^2-1) ## Estimate a GEOVOL model: geovolEst <- geovol(e = eSim) ## Print estimation results: print(geovolEst) ## Extract coefficients: coef(geovolEst) ## Extract and store GEOVOL: sigma2Est <- fitted(geovolEst) ## Extract optimised log-likelihood values: logLik(geovolEst) ## Extract and store GEOVOL standardised residuals: etaEst <- residuals(geovolEst)
Auxiliary function used in the estimation of the GEOVOL model. Not intended for the average user.
geovolObj(par, par.fixed, y, x, flag)
geovolObj(par, par.fixed, y, x, flag)
par |
scalar with the value of the parameter being estimated. If |
par.fixed |
numeric vector with the values of the parameters being fixed during estimation. If |
y |
numeric vector, time series or |
x |
logical. If |
flag |
integer. If 0, returns a numeric vector with the values of the objective function; if 1 returns the the value of the objective function; if 2, it returns the GEOVOL scaled by the loading of series i, if |
The values of the objective function or GEOVOL.
Susana Campos-Martins
geovol
, fitted.geovol
, residuals.geovol
Simulate from a GEOVOL model.
geovolSim(n, m, innovations = NULL, x.sd = 0.5, as.zoo = TRUE, verbose = FALSE)
geovolSim(n, m, innovations = NULL, x.sd = 0.5, as.zoo = TRUE, verbose = FALSE)
n |
integer indicating the number of observations. |
m |
integer indicating the number of time series. |
innovations |
|
x.sd |
numeric scalar indicating the standard deviation of the normal random variable, v, used to simulate the squared GEOVOL factor, x, according to the formula x = exp(v). |
as.zoo |
logical. If |
verbose |
|
A matrix with the simulated values.
Susana Campos-Martins
set.seed(123) ## Simulate from a GEOVOL model with s.d. 0.5 (default): eSim <- geovolSim(n = 1000, m = 30) ## Simulate from a GEOVOL model with s.d. 1: eSim <- geovolSim(n = 1000, m = 30, x.sd = 1)
set.seed(123) ## Simulate from a GEOVOL model with s.d. 0.5 (default): eSim <- geovolSim(n = 1000, m = 30) ## Simulate from a GEOVOL model with s.d. 1: eSim <- geovolSim(n = 1000, m = 30, x.sd = 1)
Compute the GEOVOL test statistic for examining the null hypothesis that the average correlation of the squared volatility standardized residuals (which should be uncorrelated) is zero against the alternative that it is positive.
geovolTest(e)
geovolTest(e)
e |
matrix, multivariate time series or |
The average correlation, the test statistic and the p-value.
Susana Campos-Martins
Engle, R.F. and Campos-Martins, S. (2020) Measuring and hedging geopolitical risk. Available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3685213.
set.seed(123) ## Simulate from a GEOVOL model with s.d. 0.5 (default): eSim <- geovolSim(n = 1500, m = 30) ## Test for GEOVOL: geovolTest(e = eSim^2-1)
set.seed(123) ## Simulate from a GEOVOL model with s.d. 0.5 (default): eSim <- geovolSim(n = 1500, m = 30) ## Test for GEOVOL: geovolTest(e = eSim^2-1)