Program running interrupted every 15 minutes

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

divac
Posts: 10
Joined: Sun Jan 30, 2011 4:36 pm

Program running interrupted every 15 minutes

Postby divac » Thu Aug 03, 2017 9:37 am

Hi,

I am trying to run a program with a large number of loops in Eviews 9.5. I've noticed that after 15 minutes of running a program file in quiet mode Eviews shows an error message. One message was saying something like "!TODAY is invalid" and the second one was "%TYPE" something...

Basically my second run was from the place where the first one was interrupted which means the code works fine. Can there be other reasons why Eviews breaks the program?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11378
Joined: Tue Sep 16, 2008 5:38 pm

Re: Program running interrupted every 15 minutes

Postby EViews Gareth » Thu Aug 03, 2017 9:40 am

Sounds like a coding error.
Follow us on Twitter @IHSEViews

divac
Posts: 10
Joined: Sun Jan 30, 2011 4:36 pm

Re: Program running interrupted every 15 minutes

Postby divac » Thu Aug 03, 2017 4:22 pm

EViews Gareth wrote:Sounds like a coding error.


Maybe. I am mostly adapting existing codes for my own needs, but it is strange.I am running 2-step DCC Garch regressions using one of the add-ins and it works fine for say 5-10 stocks (I started with 3 stocks and then increased it to 5 and then 10; all is estimated fine). So, I thought the loop works and everything. However, once I increased the code to 50 stocks both runs it stopped on the correlation 307 or 308 or in about 15 minutes. It also works if I restart the loop from say a pair combination number 290. It just go through the 307th or 308th pair of stocks just fine until it breaks again in 15 minutes time or on the next 600th correlation or so.

Now I've tried it on my home PC. I've got "!TODAY is not defined" message on stocks pair number 126, after around 6 minutes. Can it be because I am using EViews via Jukebox, an app that my Uni supplies so everyone has a remote access to all programs purchased by the Uni? Also I have a Mac at home and I am using Parallels Desktop for Windows, while at Uni it is Windows 10 PC. Here is the code I am using (the data attached):

Code: Select all

'create empty equation to be used inside the loop
equation eq

'counter of how many equations we have run
!rowcounter=1

'run pairwise regressions between each series
for !i=1 to 50
  !rowcounter = !i
  for !j=1 to 50
    if !i<>!j then
      equation eq{!i}.ls x{!i} c ar(1)
      eq{!i}.makeresid x{!i}r
    endif
  next
next

'company 1
for !i=2 to 50
  !rowcounter = !i
'  for !j=2 to 50
    if !i<>!j then
      group g1{!i} x1r x{!i}r
   g1{!i}.dccgarch11(unifit="GARCH",ctarget,correl,dccout,unigarch)
     endif
  next
'next

'company 2
for !i=3 to 50
 !rowcounter = !i
 ' for !j=3 to 50
    if !i<>!j then
      group g2{!i} x2r x{!i}r
      g2{!i}.dccgarch11(unifit="GARCH",ctarget,correl,dccout,unigarch)
endif
  next
'next

'company 3
for !i=4 to 50
 !rowcounter = !i
 ' for !j=4 to 50
    if !i<>!j then
      group g3{!i} x3r x{!i}r
      g3{!i}.dccgarch11(unifit="GARCH",ctarget,correl,dccout,unigarch)
endif
  next
'next

'company 4
for !i=5 to 50
 !rowcounter = !i
 ' for !j=5 to 50
    if !i<>!j then
      group g4{!i} x4r x{!i}r
      g4{!i}.dccgarch11(unifit="GARCH",ctarget,correl,dccout,unigarch)
endif
  next
Attachments
n=5 trial dcc.wf1
(446.25 KiB) Downloaded 15 times

EViews Matt
EViews Developer
Posts: 158
Joined: Thu Apr 25, 2013 7:48 pm

Re: Program running interrupted every 15 minutes

Postby EViews Matt » Fri Aug 04, 2017 11:29 am

Hello,

This is an issue with the addin. The addin attempts to access (at least) one variable that doesn't exist, !today, but doesn't immediately abort because the addin internally increases the number of allowed errors. Your program invokes the addin enough times to eventually reach the error limit and abort. Since this is an issue with the addin, you should post in the forum for the addin and hopefully the author will fix it.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 12 guests