Back testing

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

NurfatimaD
Posts: 20
Joined: Wed May 23, 2012 10:04 pm
Location: Almaty, Kazakhstan

Back testing

Postby NurfatimaD » Wed Sep 12, 2012 12:35 am

Hello, everyone!

Is it possible to run a back-testing in EViews? Or maybe there is a special function which could replicate the same program over different sample periods?

Thank you!

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

Re: Back testing

Postby EViews Gareth » Wed Sep 12, 2012 7:47 am

What do you mean by back-testing?

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Back testing

Postby trubador » Wed Sep 12, 2012 11:34 am

Is it possible to run a back-testing in EViews?
Yes, EViews has all the necessary features and functions you need to perform backtesting. Since it will require a bit of coding, you may find it useful to learn EViews' programming language. Besides the manual, you can also refer here: http://forums.eviews.com/viewtopic.php?f=5&t=1638#p5508

NurfatimaD
Posts: 20
Joined: Wed May 23, 2012 10:04 pm
Location: Almaty, Kazakhstan

Re: Back testing

Postby NurfatimaD » Wed Sep 12, 2012 8:30 pm

Is it possible to run a back-testing in EViews?
Yes, EViews has all the necessary features and functions you need to perform backtesting. Since it will require a bit of coding, you may find it useful to learn EViews' programming language. Besides the manual, you can also refer here: http://forums.eviews.com/viewtopic.php?f=5&t=1638#p5508
I have viewed the page you posted the link to. But there are mainly some basic commands for equations. I made a model to forecast inflation 1-2M ahead (could be even more, but the error must be large) based on x12 deseasonalization process. I wrote a program that would perform all the steps just by clicking the button run. But in order to do back testing I have to set the sample end each time manually. So in fact I was wondering if there is a way that EViews performs backtesting (sometimes called backcasting) so that I do not need insert the same program but with different samples hundred times. If you know a specific command lines, could you please share them with me?

Thanks!

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Back testing

Postby trubador » Wed Sep 12, 2012 11:56 pm

Just put a For-Loop around your program that changes the sample at each stage. For instance, the following code would run from "2002m08 2010m11" to "2004m04 2012m07" period and produce 21 outputs.

Code: Select all

%pagesmpl = @pagesmpl 'initial position of the sample %sampend = "2012m07" 'end period of the backtesting sample !sampsize = 100 'number of observations to be used in the estimation for !i=20 to 0 step -1 'repeat the analysis starting from 20 periods back smpl {%sampend}-!i-!sampsize+1 {%sampend}-!i .... .... next smpl {%pagesmpl} 'do not forget to change the sample back


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest