Windows error messages

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
potiv
Posts: 10
Joined: Fri Sep 04, 2009 6:26 am

Windows error messages

Unread post 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
moderator
Site Admin
Posts: 269
Joined: Thu Oct 19, 2006 4:33 pm

Re: Windows error messages

Unread post 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
potiv
Posts: 10
Joined: Fri Sep 04, 2009 6:26 am

Re: Windows error messages

Unread post 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
Attachments
CME_futures_prices_main_currencies_1987_2010_input.xls
(512 KiB) Downloaded 840 times
maxSR_strategies_outofsample.PRG
(2.21 KiB) Downloaded 1007 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Windows error messages

Unread post 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)
potiv
Posts: 10
Joined: Fri Sep 04, 2009 6:26 am

Re: Windows error messages

Unread post 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
April86
Posts: 10
Joined: Fri Feb 13, 2015 10:37 pm

Re: Windows error messages

Unread post by April86 »

potiv wrote: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
Is there any way to turn off error messages in the latest version of RATS on Windows 7? Thanks.

Sincerely,
Xue
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Windows error messages

Unread post by TomDoan »

ENV TRAPERRORS

will generally allow the program to continue operating through a loop despite errors. Errors (as opposed to warnings) usually mean a serious problem. Why would you want to turn those off?
April86
Posts: 10
Joined: Fri Feb 13, 2015 10:37 pm

Re: Windows error messages

Unread post by April86 »

Dear Tom,

Sorry that I did not make myself clear enough. The error code is X13 and the program was still running, so I thought it was more like a warning. When I run the same program using different data sets, the warning shows for a few data sets but not others. For data sets without any warning, the program ran without any problem. However, for data sets with the warning, after the program had been running for a couple of hours, my computer system (Windows 7, 4G memory) said it had low memory and forced me to close the RATS program. When I "cancel" this request, RATS simply stopped running.

I had 8000 draws in my MCMC and lots of loops in the program, and the same warning showed up twenty millions of times. So I thought it was the tons of warning messages that used up the memory. And I want to see the results by ignoring the warning.

Maybe I am wrong. My RATS program are based on "VAR with time-varying parameters and stochastic volatility" posted by Todd Clark. Actually for some data sets, the largest eigenvalue of the companion matrix in full sample VAR (with constant coefficient) has modulus close to one (e.g., 0.99886). Does this have something to do with the warning? Maybe I should posted my data sets and program under the folder by Todd. I will do it as soon as possible. Thanks.

Best,
Xue
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Windows error messages

Unread post by TomDoan »

X13 doesn't sound right. That's for a test with redundant restrictions.

At any rate, if you are getting a huge number of warnings, it could I guess run you out of editor memory. Have you tried running this on the 64-bit executable? (Having 4Gb doesn't help if you're running the 32-bit). You can also route the output to a file with something like

open output bigoutputfile.txt
April86
Posts: 10
Joined: Fri Feb 13, 2015 10:37 pm

Re: Windows error messages

Unread post by April86 »

Actually I have been running my programs on RATS Pro 64 9.00. After I routed the output to a text file, Windows no longer reports "low memory" warning and I have got the results. (Thanks for your suggestion!) But the results are obviously abnormal. I will work on the model and try to improve the results.

Best,
Xue
Post Reply