diff --git a/.Rbuildignore b/.Rbuildignore old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 4b995d5..de22d60 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ README.Rmd *.o *.tmp inst/doc +inst/.DS_Store +.DS_Store diff --git a/DESCRIPTION b/DESCRIPTION old mode 100644 new mode 100755 index c67c3c0..789ac09 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,9 +2,9 @@ Package: tsgarch Type: Package Title: Univariate GARCH Models Version: 1.0.3 -Authors@R: c(person("Alexios", "Galanos", role = c("aut", "cre","cph"), email = "alexios@4dscape.com")) +Authors@R: c(person("Alexios", "Galanos", role = c("aut", "cre","cph"), email = "alexios@4dscape.com", comment = c(ORCID = "0009-0000-9308-0457"))) Maintainer: Alexios Galanos -Depends: R (>= 3.5.0), methods, tsmethods +Depends: R (>= 3.5.0), methods, tsmethods (>= 1.0.2) LinkingTo: Rcpp (>= 0.10.6), TMB(>= 1.7.20), RcppEigen Imports: TMB (>= 1.7.20), Rcpp, nloptr, Rdpack, numDeriv, xts, zoo, future.apply, future, progressr, flextable, stats, utils, data.table, tsdistributions, lubridate, sandwich Description: Multiple flavors of the Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model with a large choice of conditional distributions. Methods for specification, estimation, prediction, filtering, simulation, statistical testing and more. Represents a partial re-write and re-think of 'rugarch', making use of automatic differentiation for estimation. @@ -13,7 +13,7 @@ Encoding: UTF-8 LazyData: true BugReports: https://github.com/tsmodels/tsgarch/issues RdMacros: Rdpack -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) ByteCompile: true URL: https://github.com/tsmodels/tsgarch diff --git a/NAMESPACE b/NAMESPACE old mode 100644 new mode 100755 diff --git a/NEWS.md b/NEWS.md old mode 100644 new mode 100755 index 629a840..abd8bf0 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,7 @@ # tsgarch 1.0.3 * Added the log-likelihood vector to the returned fitted and filtered object -as this will be needed in the calculation of the standard errors in the +as this will be needed in the calculation of the standard errors in the upcoming multivariate GARCH package. * Added an extra option to the estimation method which adds the TMB object to the returned estimation object. This can then be used to directly vary @@ -22,6 +22,7 @@ is best approximated by the bootstrapped residuals rather than the imposed parametric distribution with estimated parameters. * For the bootstrap simulated prediction, the re-sampled standardized innovations are now scaled to avoid bias. +* Fix to h=1 and nsim. Previously when h=1, nsim was set to zero. # tsgarch 1.0.2 diff --git a/R/backtest.R b/R/backtest.R old mode 100644 new mode 100755 diff --git a/R/benchmark.R b/R/benchmark.R old mode 100644 new mode 100755 diff --git a/R/constraints.R b/R/constraints.R old mode 100644 new mode 100755 diff --git a/R/data.R b/R/data.R old mode 100644 new mode 100755 diff --git a/R/distribution.R b/R/distribution.R old mode 100644 new mode 100755 diff --git a/R/equations.R b/R/equations.R old mode 100644 new mode 100755 diff --git a/R/estimate.R b/R/estimate.R old mode 100644 new mode 100755 diff --git a/R/extractors.R b/R/extractors.R old mode 100644 new mode 100755 diff --git a/R/filter.R b/R/filter.R old mode 100644 new mode 100755 diff --git a/R/initialization.R b/R/initialization.R old mode 100644 new mode 100755 diff --git a/R/likelihood.R b/R/likelihood.R old mode 100644 new mode 100755 diff --git a/R/methods.R b/R/methods.R old mode 100644 new mode 100755 index af25378..63c0be1 --- a/R/methods.R +++ b/R/methods.R @@ -861,7 +861,7 @@ predict.tsgarch.estimate <- function(object, h = 1, newxreg = NULL, newvreg = NU } sim_method <- match.arg(sim_method[1], c("parametric","bootstrap")) h <- max(1, as.integer(h[1])) - if (h == 1) nsim <- 0 + #if (h == 1) nsim <- 0 nsim <- max(0, as.integer(nsim[1])) block <- max(0, as.integer(block[1])) model <- object$spec$model$model diff --git a/R/multispec.R b/R/multispec.R old mode 100644 new mode 100755 diff --git a/R/newsimpact.R b/R/newsimpact.R old mode 100644 new mode 100755 diff --git a/R/persistance.R b/R/persistance.R old mode 100644 new mode 100755 diff --git a/R/predict.R b/R/predict.R old mode 100644 new mode 100755 index 725470b..604c4b7 --- a/R/predict.R +++ b/R/predict.R @@ -103,7 +103,7 @@ simulated_distribution <- function(object, sigma, h = 1, nsim = 1, parameter <- NULL if (!is.null(seed)) set.seed(seed) series_sim <- sigma_sim <- NULL - if (nsim > 0 & h > 1) { + if (nsim > 0) { if (sim_method == "bootstrap") { out <- garch_bootstrap(object, h = h, nsim = nsim, block = block, vreg = tail(vreg, h), seed = seed) sigma_sim <- out$sigma diff --git a/R/print.R b/R/print.R old mode 100644 new mode 100755 diff --git a/R/profile.R b/R/profile.R old mode 100644 new mode 100755 diff --git a/R/reexports.R b/R/reexports.R old mode 100644 new mode 100755 diff --git a/R/sandwich.R b/R/sandwich.R old mode 100644 new mode 100755 diff --git a/R/simulate.R b/R/simulate.R old mode 100644 new mode 100755 diff --git a/R/solvers.R b/R/solvers.R old mode 100644 new mode 100755 diff --git a/R/specification.R b/R/specification.R old mode 100644 new mode 100755 diff --git a/R/tsgarch-package.R b/R/tsgarch-package.R old mode 100644 new mode 100755 diff --git a/R/unconditional.R b/R/unconditional.R old mode 100644 new mode 100755 diff --git a/R/utilities.R b/R/utilities.R old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index afcf21a..525c9c1 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![R-CMD-check](https://github.com/tsmodels/tsgarch/actions/workflows/rcmdcheck.yaml/badge.svg)](https://github.com/tsmodels/tsgarch/actions/workflows/R-CMD-check.yaml) -[![Last-changedate](https://img.shields.io/badge/last%20change-2024--06--28-yellowgreen.svg)](/commits/master) +[![R-CMD-check](https://github.com/tsmodels/tsgarch/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tsmodels/tsgarch/actions/workflows/R-CMD-check.yaml) +[![Last-changedate](https://img.shields.io/badge/last%20change-2024--09--22-yellowgreen.svg)](/commits/master) [![packageversion](https://img.shields.io/badge/Package%20version-1.0.3-orange.svg?style=flat-square)](commits/master) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/tsgarch)](https://cran.r-project.org/package=tsgarch) diff --git a/data/dmbp.rda b/data/dmbp.rda old mode 100644 new mode 100755 diff --git a/data/nikkei.rda b/data/nikkei.rda old mode 100644 new mode 100755 diff --git a/inst/REFERENCES.bib b/inst/REFERENCES.bib old mode 100644 new mode 100755 diff --git a/man/AIC.Rd b/man/AIC.Rd old mode 100644 new mode 100755 diff --git a/man/BIC.Rd b/man/BIC.Rd old mode 100644 new mode 100755 diff --git a/man/as_flextable.benchmark.Rd b/man/as_flextable.benchmark.Rd old mode 100644 new mode 100755 diff --git a/man/as_flextable.summary.Rd b/man/as_flextable.summary.Rd old mode 100644 new mode 100755 diff --git a/man/benchmark_fcp.Rd b/man/benchmark_fcp.Rd old mode 100644 new mode 100755 diff --git a/man/benchmark_laurent.Rd b/man/benchmark_laurent.Rd old mode 100644 new mode 100755 diff --git a/man/bread.Rd b/man/bread.Rd old mode 100644 new mode 100755 diff --git a/man/coef.Rd b/man/coef.Rd old mode 100644 new mode 100755 diff --git a/man/confint.Rd b/man/confint.Rd old mode 100644 new mode 100755 diff --git a/man/dmbp.Rd b/man/dmbp.Rd old mode 100644 new mode 100755 diff --git a/man/estfun.Rd b/man/estfun.Rd old mode 100644 new mode 100755 diff --git a/man/estimate.Rd b/man/estimate.Rd old mode 100644 new mode 100755 diff --git a/man/fitted.Rd b/man/fitted.Rd old mode 100644 new mode 100755 diff --git a/man/garch_modelspec.Rd b/man/garch_modelspec.Rd old mode 100644 new mode 100755 diff --git a/man/halflife.Rd b/man/halflife.Rd old mode 100644 new mode 100755 diff --git a/man/logLik.Rd b/man/logLik.Rd old mode 100644 new mode 100755 diff --git a/man/newsimpact.Rd b/man/newsimpact.Rd old mode 100644 new mode 100755 diff --git a/man/nikkei.Rd b/man/nikkei.Rd old mode 100644 new mode 100755 diff --git a/man/nloptr_options.Rd b/man/nloptr_options.Rd old mode 100644 new mode 100755 diff --git a/man/nobs.Rd b/man/nobs.Rd old mode 100644 new mode 100755 diff --git a/man/omega.Rd b/man/omega.Rd old mode 100644 new mode 100755 diff --git a/man/persistence.Rd b/man/persistence.Rd old mode 100644 new mode 100755 diff --git a/man/pit.Rd b/man/pit.Rd old mode 100644 new mode 100755 diff --git a/man/plot.Rd b/man/plot.Rd old mode 100644 new mode 100755 diff --git a/man/plot.tsgarch.estimate.Rd b/man/plot.tsgarch.estimate.Rd old mode 100644 new mode 100755 diff --git a/man/plus-.tsgarch.spec.Rd b/man/plus-.tsgarch.spec.Rd old mode 100644 new mode 100755 diff --git a/man/predict.Rd b/man/predict.Rd old mode 100644 new mode 100755 diff --git a/man/print.Rd b/man/print.Rd old mode 100644 new mode 100755 diff --git a/man/print.summary.tsgarch.profile.Rd b/man/print.summary.tsgarch.profile.Rd old mode 100644 new mode 100755 diff --git a/man/reexports.Rd b/man/reexports.Rd old mode 100644 new mode 100755 diff --git a/man/residuals.Rd b/man/residuals.Rd old mode 100644 new mode 100755 diff --git a/man/sigma.Rd b/man/sigma.Rd old mode 100644 new mode 100755 diff --git a/man/simulate.Rd b/man/simulate.Rd old mode 100644 new mode 100755 diff --git a/man/summary.Rd b/man/summary.Rd old mode 100644 new mode 100755 diff --git a/man/summary.tsgarch.profile.Rd b/man/summary.tsgarch.profile.Rd old mode 100644 new mode 100755 diff --git a/man/to_multi_estimate.Rd b/man/to_multi_estimate.Rd old mode 100644 new mode 100755 diff --git a/man/tsbacktest.Rd b/man/tsbacktest.Rd old mode 100644 new mode 100755 diff --git a/man/tsequation.Rd b/man/tsequation.Rd old mode 100644 new mode 100755 diff --git a/man/tsfilter.Rd b/man/tsfilter.Rd old mode 100644 new mode 100755 diff --git a/man/tsgarch-package.Rd b/man/tsgarch-package.Rd old mode 100644 new mode 100755 index a86ec02..adf2d57 --- a/man/tsgarch-package.Rd +++ b/man/tsgarch-package.Rd @@ -17,7 +17,7 @@ Useful links: } \author{ -\strong{Maintainer}: Alexios Galanos \email{alexios@4dscape.com} [copyright holder] +\strong{Maintainer}: Alexios Galanos \email{alexios@4dscape.com} (\href{https://orcid.org/0009-0000-9308-0457}{ORCID}) [copyright holder] } \keyword{internal} diff --git a/man/tsprofile.Rd b/man/tsprofile.Rd old mode 100644 new mode 100755 diff --git a/man/unconditional.Rd b/man/unconditional.Rd old mode 100644 new mode 100755 diff --git a/man/vcov.Rd b/man/vcov.Rd old mode 100644 new mode 100755 diff --git a/src/Makevars b/src/Makevars old mode 100644 new mode 100755 diff --git a/src/Makevars.win b/src/Makevars.win old mode 100644 new mode 100755 diff --git a/src/TMB/aparchfun.hpp b/src/TMB/aparchfun.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/aparchjac.hpp b/src/TMB/aparchjac.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/aparchkappa.h b/src/TMB/aparchkappa.h old mode 100644 new mode 100755 diff --git a/src/TMB/cgarchfun.hpp b/src/TMB/cgarchfun.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/compile.R b/src/TMB/compile.R old mode 100644 new mode 100755 diff --git a/src/TMB/distfun.h b/src/TMB/distfun.h old mode 100644 new mode 100755 diff --git a/src/TMB/egarchfun.hpp b/src/TMB/egarchfun.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/egarchkappa.h b/src/TMB/egarchkappa.h old mode 100644 new mode 100755 diff --git a/src/TMB/fgarchfun.hpp b/src/TMB/fgarchfun.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/fgarchjac.hpp b/src/TMB/fgarchjac.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/fgarchkappa.h b/src/TMB/fgarchkappa.h old mode 100644 new mode 100755 diff --git a/src/TMB/garchextra.h b/src/TMB/garchextra.h old mode 100644 new mode 100755 diff --git a/src/TMB/garchfun.hpp b/src/TMB/garchfun.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/gjrgarchfun.hpp b/src/TMB/gjrgarchfun.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/gjrgarchjac.hpp b/src/TMB/gjrgarchjac.hpp old mode 100644 new mode 100755 diff --git a/src/TMB/gjrkappa.h b/src/TMB/gjrkappa.h old mode 100644 new mode 100755 diff --git a/src/TMB/tsgarch_TMBExports.cpp b/src/TMB/tsgarch_TMBExports.cpp old mode 100644 new mode 100755 diff --git a/src/filters.cpp b/src/filters.cpp old mode 100644 new mode 100755 diff --git a/src/simulation.cpp b/src/simulation.cpp old mode 100644 new mode 100755 diff --git a/tests/longtests/test-backtest.R b/tests/longtests/test-backtest.R old mode 100644 new mode 100755 diff --git a/tests/longtests/test-prediction.R b/tests/longtests/test-prediction.R old mode 100644 new mode 100755 diff --git a/tests/longtests/test-profile.R b/tests/longtests/test-profile.R old mode 100644 new mode 100755 diff --git a/tests/testthat.R b/tests/testthat.R old mode 100644 new mode 100755 diff --git a/tests/testthat/helper-global.R b/tests/testthat/helper-global.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-benchmarks.R b/tests/testthat/test-benchmarks.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-estimation.R b/tests/testthat/test-estimation.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-filtering.R b/tests/testthat/test-filtering.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-newsimpact.R b/tests/testthat/test-newsimpact.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-operator.R b/tests/testthat/test-operator.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-simulation.R b/tests/testthat/test-simulation.R old mode 100644 new mode 100755 diff --git a/tests/testthat/test-tmb.R b/tests/testthat/test-tmb.R old mode 100644 new mode 100755 diff --git a/tsgarch.Rproj b/tsgarch.Rproj new file mode 100755 index 0000000..767608a --- /dev/null +++ b/tsgarch.Rproj @@ -0,0 +1,20 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 4 +Encoding: UTF-8 + +RnwWeave: knitr +LaTeX: XeLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/vignettes/.gitignore b/vignettes/.gitignore old mode 100644 new mode 100755 diff --git a/vignettes/benchmark.Rmd b/vignettes/benchmark.Rmd old mode 100644 new mode 100755 diff --git a/vignettes/custom.css b/vignettes/custom.css old mode 100644 new mode 100755 diff --git a/vignettes/demonstration.Rmd b/vignettes/demonstration.Rmd old mode 100644 new mode 100755 diff --git a/vignettes/garch_models.Rmd b/vignettes/garch_models.Rmd old mode 100644 new mode 100755 diff --git a/vignettes/references.bib b/vignettes/references.bib old mode 100644 new mode 100755