Page 1 of 1

Windows error messages

PostPosted: Wed Sep 28, 2011 7:28 am
by potiv
Dear All,
I am running RATS code on Windows 7 that I knows works on Windows XP. It goes through many loops to do rolling forecasts of various series. Basically, I am using 5-year windows of monthly data to generate monthly out-of-sample forecasts of currency returns. In Windows XP it just used to take a while (about half an hour) to go though all the loops and used to 'go blank' so to speak, but then he'd recover and generate the desired output. Now, just after it has 'gone blank' it stops working. I suspect it is Windows 7 that it is stopping the RATS or causing it to crash by detecting an error and/or trying to send one of those silly error reports. Anyhow, the message i get from Windows 7 is that "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available" and my suspicion is that it's precisely the procedure that eventually generates this error message actually causes RATS to crash. Perhaps Windows 7 is simply less tolerant than Windows XP when RATS is slowly working through a large task and throws up an error too early? Has anybody had the same problem? Is there a way around? I tried to turn off error reporting in Windows 7, which is useless anyway, but to no avail.
Best regards,
Valerio

Re: Windows error messages

PostPosted: Thu Sep 29, 2011 2:03 pm
by moderator
It's unlikely that the problem has anything specifically to do with which version of Windows you are using. If RATS is crashing, the specific behavior may vary between XP and Windows 7, but the underlying cause probably doesn't have anything to do with the operating system.

I would suggest sending the program and required data files to us at support@estima.com so we can take a look. Be sure to include your full name, your RATS serial number, and the specific version of RATS you are running (do Help-About RATS to check) in your email.

Regards,
Tom Maycock
Estima

Re: Windows error messages

PostPosted: Fri Sep 30, 2011 1:20 pm
by potiv
Dear Tom,

Many thanks for getting back to me. Actually, i have good news. Today I upgraded to RATS 8 from RATS 7.20 and now the code works without crashing!

I am attaching the code (and the dataset) anyway in case it may help explain why it was causing my laptop to crash when i was running it in RATS 7.20. Also, I would be grateful if you could have a look at it and let me know if perhaps the way i wrote it makes the computer task unnecessarily hard.

Best regards,
Valerio

Re: Windows error messages

PostPosted: Sat Oct 01, 2011 9:17 am
by TomDoan
This is doing a great deal of number crunching. You're doing 36 ARMA models and a GARCH for each window and for each stock, so it will take a long time. I'm not sure what your version of BJAUTOFIT is doing, but you need to remember that BJAUTOFIT is choosing the model based upon the likelihood assuming homoscedastic residuals; you then go on to use that in a GARCH model which has a different likelihood. I would probably choose a single ARMA model for each stock, rather than trying to choose one for each window.

The following will speed things up a bit, but not anywhere near as much as reducing the amount of calculation.

1. Take the SOURCE instruction outside the loop. (That might actually have been the cause of your problem with instability).

2. Get rid of any of the output inside the loop.

I would also throw an INFOBOX around your outer loop so you can keep track of the progress of that loop.

infobox(action=define,progress,lower=1,upper=stock_nr)
do i=1,stock_nr
{
...
infobox(current=i)
}
end do i
infobox(action=remove)

Re: Windows error messages

PostPosted: Mon Oct 03, 2011 10:49 am
by potiv
Dear Tom,
Many thanks for getting back to me. Yes, taking the source instruction out of the loops speeds things up a bit, but as you say there is still an awful lot of calculations to be done so it still takes a while. Unfortunately i need to get all those calculations done, can't get around that unless I am happy to work with just one ARMA model for each asset, but that would reduce forecasting performance a bit. But all stability problems are gone. Also, the infobox looks pretty cool!
Best regards,
Valerio