Type: | Package |
Title: | Network Structures in VAR Models |
Version: | 0.1-2 |
Date: | 2025-08-26 |
LazyLoad: | yes |
LazyData: | true |
Depends: | R (≥ 3.5.0) |
Imports: | fields, fGarch |
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. |
License: | GPL (≥ 3) |
NeedsCompilation: | yes |
Packaged: | 2025-09-17 09:04:31 UTC; simontrimborn |
RoxygenNote: | 7.3.2 |
Author: | Simon Trimborn [aut, cre] |
Maintainer: | Simon Trimborn <trimborn.econometrics@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2025-09-22 11:30:07 UTC |
The LISAR model
Description
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"
and
"AdapLASSO"
.
Usage
LISAR(
x,
Model = "LISAR.LASSO",
eval.criteria = "MSFE",
Lags = 3,
alpha.pens = 0.5,
gamma.pens = 0.5,
lambda1_seq = 0.5,
lambda2_seq = 0.5,
lambda3_seq = 0.5,
a.pen = 3.7,
eps1 = 1e-04,
eps2 = 1e-04,
T1 = NULL,
T2 = NULL,
reoptim = FALSE
)
Arguments
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 |
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 |
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 |
Value
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 |
References
Kexin Zhang, Simon Trimborn (2023).
Influential assets in Large-Scale Vector Autoregressive Models
SSRN Working paper.
doi:10.2139/ssrn.4619531
Examples
# 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)
Trading data for 11 US stocks from the finance sector
Description
A dataset containing the 5 minute log returns of 11 US stocks for the 22.02.2022.
Format
A matrix with 5 minute trading data for 11 stocks on 22.02.2022.
Source
Yahoo-Finance.
Plotting function for objects of class NetVAR
Description
Plots an object of class NetVAR
Usage
## S3 method for class 'NetVAR'
plot(x, join_graphs = TRUE, scale_range = TRUE, legend = FALSE, ...)
Arguments
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. |
Value
None
Printing function for objects of class NetVAR
Description
print.NetVAR
prints the values of an object of class NetVAR.
Usage
## S3 method for class 'NetVAR'
print(x, ...)
Arguments
x |
An object of |
... |
Further arguments to be passed over. Currently none. |
Value
None
Printing function for objects of class NetVAR
Description
summary.NetVAR
prints the values of an object of class NetVAR.
Usage
## S3 method for class 'NetVAR'
summary(object, ...)
Arguments
object |
An object of |
... |
Further arguments to be passed over. Currently none. |
Value
None