Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6764497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:36:05+00:00 2026-05-26T14:36:05+00:00

I am try to fit an eGARCH model on an expanding basis using the

  • 0

I am try to fit an eGARCH model on an expanding basis using the rugarch package. I have 6 columns of data, and I am trying refit parameters ~6000 for each column. If I run the following code, I get an error in windows on the 2nd column (this means I am getting all the way through the first inner loop succesfully). By using gc() within the loop and removing the fitted object I have extended the length of time it takes to hit the memory error. Also, this process takes a very long time in general and I am wondering if there is anyway to improve it on my end. The package itself seems to be written pretty efficiently with most of the filtering being done in low level C. I could probably refit the model every 30-60 days, but I would really prefer to do it this way. I am running R 2.13.2 on 32-Bit windows. Thanks in advance. Edit: The error is: “The instruction at “0x6c732a07” referenced memory at “0x00000008.” The memory could not be “read””.

library(rugarch)
library(xts)
e.spec <- ugarchspec(variance.model = list(model = "eGARCH", garchOrder = c(1,1)),   mean.model = list(armaOrder = c(1,0), include.mean = TRUE)) 
dly.xts <- xts(matrix(rnorm(8000*6), nrow = 8000, ncol = 6), as.Date(1:8000))
tst.xts <- tail(dly.xts, 6000)
names(tst.xts) <- 1:6
tst.idx <- index(tst.xts)
dly.idx <- index(dly.xts)
for(j in 1:ncol(tst.xts)){
     sig.est <- rep(NA, nrow(tst.xts))
    for(i in 1:nrow(tst.xts)){
        print(i)
        dat <- dly.xts[dly.idx <= tst.idx[i], j]
        fit <- try(ugarchfit(e.spec, data = dat[-nrow(dat), ], solver = "solnp", solver.control = list(trace = FALSE)))
        if(class(fit) != "try-error"){
            spec.new <- ugarchspec(variance.model = list(model = "eGARCH", garchOrder = c(1,1)), mean.model = list(armaOrder = c(1,0), include.mean = TRUE), fixed.pars = coef(fit))
             sig.est[i] <- as.numeric(tail(sigma(ugarchfilter(spec = spec.new, data = dat)),1))
            rm(spec.new)
            rm(fit)
            gc()
        }else{
            sig.est[i] <- NA
        }
    }
    save(sig.est, file = paste("egarch", names(tst.xts)[j], ".RData", sep = ""))
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:36:05+00:00Added an answer on May 26, 2026 at 2:36 pm

    When changing the data types from xts to numeric, the problem went away and the speed of processing increased dramatically. (seems obvious in hindsight)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying from 2 days to curve fit some data that I have using
I am trying to fit collected data to a polynomial equation and I found
I fit a count model to a vector of actual data and would now
I try using the auto re-size stated at Auto Scale TextView Text to Fit
I try to display my post using two column, to make sure the fit
I'm currently trying to have an iframe fit the size of my screen, and
I'll try and describe best I can. Working with a bad data model. Table1
I'm trying to tweak my MySQL server to fit my needs... and I have
The dillema is like this: If I try to fit all the scripts blocks
I will try and ask my question clearly... I have three tables that each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.