fitmnts_par | R Documentation |
fitmnts_par
fit parameters
of the n-dimensional NTS distribution. A parallel version of fitmnts()
fitmnts_par(
returndata,
n,
alphaNtheta = NULL,
stdflag = FALSE,
parallelSocketCluster = NULL,
PDflag = TRUE
)
library(functional)
library(nloptr)
library(pracma)
library(spatstat)]
library(evmix)
library(Matrix)
library(foreach)
library(doParallel)
library(quantmod)
library(temStaR)
getSymbols("^GSPC", src="yahoo", from = "2016-1-1", to = "2020-08-31")
pr1 <- as.numeric(GSPC$GSPC.Adjusted)
getSymbols("^DJI", src="yahoo", from = "2016-1-1", to = "2020-08-31")
pr2 <- as.numeric(DJI$DJI.Adjusted)
returndata <- matrix(data = c(diff(log(pr1)),diff(log(pr2))),
ncol = 2, nrow = (length(pr1)-1))
numofcluster <- detectCores()
cl <- makePSOCKcluster(numofcluster)
registerDoParallel(cl)
res <- fitmnts_par( returndata = returndata, n=2, parallelSocketCluster = cl )
stopCluster(cl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.