| Title: | Network Structures in VAR Models |
|---|---|
| Description: | Vector AutoRegressive (VAR) type models with tailored regularisation structures are provided to uncover network type structures in the data, such as influential time series (influencers). Currently the package implements the LISAR model from Zhang and Trimborn (2023) <doi:10.2139/ssrn.4619531>. The package automatically derives the required regularisation sequences and refines it during the estimation to provide the optimal model. The package allows for model optimisation under various loss functions such as Mean Squared Forecasting Error (MSFE), Akaike Information Criterion (AIC), and Bayesian Information Criterion (BIC). It provides a dedicated class, allowing for summary prints of the optimal model and a plotting function to conveniently analyse the optimal model via heatmaps. |
| Authors: | Simon Trimborn [aut, cre] |
| Maintainer: | Simon Trimborn <[email protected]> |
| License: | GPL (>=3) |
| Version: | 0.1-2 |
| Built: | 2026-06-06 13:30:22 UTC |
| Source: | https://github.com/simontrimborn/netvar |
LISAR contains the LISAR model described in Zhang and
Trimborn (2023). The model is computed based on 3 lambda tuning parameters
which are automatically determined by the package. A scaling parameter
boosts/lowers the strength of the regularization on assets which values are
determined less/more important than others (influencers). The function
allows to compute the LISAR model under "LASSO", "SCAD",
"AdapLASSO", and "Elastic.Net".
LISAR( x, Model = "LISAR.LASSO", eval.criteria = "MSFE", Lags = 3, alpha.pens = 0.5, gamma.pens = 0.5, delta.elastic.net.pens = 0.5, lambda1_seq = 0.5, lambda2_seq = 0.5, lambda3_seq = 0.5, a.pen = 3.7, standardise = TRUE, eps1 = 1e-04, eps2 = 1e-04, T1 = NULL, T2 = NULL, reoptim = FALSE )LISAR( x, Model = "LISAR.LASSO", eval.criteria = "MSFE", Lags = 3, alpha.pens = 0.5, gamma.pens = 0.5, delta.elastic.net.pens = 0.5, lambda1_seq = 0.5, lambda2_seq = 0.5, lambda3_seq = 0.5, a.pen = 3.7, standardise = TRUE, eps1 = 1e-04, eps2 = 1e-04, T1 = NULL, T2 = NULL, reoptim = FALSE )
x |
A matrix containing the data with rows being observations and columns being time series. |
Model |
The LISAR model to use with either LASSO
|
eval.criteria |
The evaluation criteria to use to choose the
best model under the regularization parameters. Can be either |
Lags |
The maximum number of lags to consider. Default 3. |
alpha.pens |
A number or vector specifying the boosting parameter increasing/decreasing the strength of regularization. Should be a number(s) between (0,1). See Zhang and Trimborn (2023) for details on the alpha parameters. |
gamma.pens |
A number or vector specifying the adaptive parameter
for |
delta.elastic.net.pens |
A number or vector specifying the elastic net parameter
for |
lambda1_seq |
The factor by which the regularization sequence of lambda1, regularizing the lag structure, decreases towards 0. Should be a value between (0,1). |
lambda2_seq |
The factor by which the regularization sequence of lambda2, indicating which time series are more influential (influencers), decreases towards 0. Should be a value between (0,1). |
lambda3_seq |
The factor by which the regularization sequence of lambda3, regularizing the individual parameters, decreases towards 0. Should be a value between (0,1). |
a.pen |
The parameter specifying by which the SCAD penalty taperes off
towards no regularization. Only required for |
standardise |
Logical. If TRUE, then the data are column-wise demeaned
and scaled with a GARCH(1,1) model. If set to |
eps1 |
Control parameter for the inner optimization algorithm. The algorithm
converged when between optimization steps the parameters change by less than
|
eps2 |
Control parameter for the outer optimization algorithm. The algorithm
converged when between optimization steps the parameters change by less than
|
T1 |
A numeric stating the row of |
T2 |
A numeric stating the row of |
reoptim |
Logical. If TRUE, then the best model found under the
initially derived lambda sequences is further optimized by a new lambda
sequence around the previous best solution. Stops when a more granular
lambda sequence no longer improves the model under |
An object of the class netstruc with the components
Model.optimal |
a list containing the optimal model, evaluation criteria and model regularizers |
data.training |
the training data |
data.evaluation |
the evaluation data |
data.outofsample |
the out-of-sample data. |
Model.estimation |
estimation specifics for the model |
Kexin Zhang, Simon Trimborn (2023).
Influential assets in Large-Scale Vector Autoregressive Models
SSRN Working paper.
doi:10.2139/ssrn.4619531
# Investigate influential assets relationship between 3 assets only data(TradingData) LISAR(TradingData[,c("AIG", "AXP", "BAC")], Model = "LISAR.LASSO", Lags = 1) # Reoptimise the penalisation sequence LISAR(TradingData[,c("AIG", "AXP", "BAC")], Model = "LISAR.LASSO", Lags = 1, reoptim = TRUE) # Investigate influential assets relationship between the entire asset universe with starting values LISAR(TradingData, Model = "LISAR.LASSO") # Reoptimise the penalisation sequence LISAR(TradingData, Model = "LISAR.LASSO", reoptim = TRUE) # Consider a different model LISAR(TradingData, Model = "LISAR.SCAD", Lags = 1)# Investigate influential assets relationship between 3 assets only data(TradingData) LISAR(TradingData[,c("AIG", "AXP", "BAC")], Model = "LISAR.LASSO", Lags = 1) # Reoptimise the penalisation sequence LISAR(TradingData[,c("AIG", "AXP", "BAC")], Model = "LISAR.LASSO", Lags = 1, reoptim = TRUE) # Investigate influential assets relationship between the entire asset universe with starting values LISAR(TradingData, Model = "LISAR.LASSO") # Reoptimise the penalisation sequence LISAR(TradingData, Model = "LISAR.LASSO", reoptim = TRUE) # Consider a different model LISAR(TradingData, Model = "LISAR.SCAD", Lags = 1)
Plots an object of class NetVAR
## S3 method for class 'NetVAR' plot(x, join_graphs = TRUE, scale_range = TRUE, legend = FALSE, ...)## S3 method for class 'NetVAR' plot(x, join_graphs = TRUE, scale_range = TRUE, legend = FALSE, ...)
x |
An object of |
join_graphs |
Logical. If TRUE, then heatmaps for each lagged parameter matrix are returned in one plot. If FALSE, a single figure per heatmap is generated. |
scale_range |
Logical. If TRUE, parameters larger 1 or smaller -1 are truncated to 1 and -1 purely for visualisation purposes. If FALSE, then the actual values are plotted in the heatmaps. |
legend |
Add a legend to plots. Default FALSE |
... |
Further arguments, currently none. |
None
print.NetVAR prints the values of an object of class NetVAR.
## S3 method for class 'NetVAR' print(x, ...)## S3 method for class 'NetVAR' print(x, ...)
x |
An object of |
... |
Further arguments to be passed over. Currently none. |
None
summary.NetVAR prints the values of an object of class NetVAR.
## S3 method for class 'NetVAR' summary(object, ...)## S3 method for class 'NetVAR' summary(object, ...)
object |
An object of |
... |
Further arguments to be passed over. Currently none. |
None
A dataset containing the 5 minute log returns of 11 US stocks for the 22.02.2022.
A matrix with 5 minute trading data for 11 stocks on 22.02.2022.
Yahoo-Finance.