help me!!!!

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

petertohen
Posts: 1
Joined: Fri Aug 04, 2017 2:30 am

help me!!!!

Postby petertohen » Fri Aug 04, 2017 7:58 am

hi all.
I desire to make Eviews implement automatically serial correlation and ADF tests for multiple windows of data. More specifically, I want to divide 22,000 return observations into non-overlapping windows of 100 observations and perform the autocorrelation and unit root test for each block. Moreover, I would prefer to have all results into a single matrix and not to copy the figures from 440 opened ones. Can this procedure be developed in Eviews? What are the involved steps?
thank for all.
have a nicce day

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

Re: help me!!!!

Postby EViews Matt » Fri Aug 04, 2017 9:20 am

Hello,

What you want is definitely possible. An EViews program to do this can loop through each window of 100 observations, setting the sample for each. For each window:

  1. Create and freeze the correlogram view (.correl) of your series (this creates a table).
  2. Extract the correlation information you want from the frozen table.
  3. Create and freeze the unit test view (.uroot) for your series.
  4. Extract the ADF information you want from the frozen table.
As a simplified example, here's a little code that extracts the lag 1 AC values for a series x and stores them in a vector named AC. You should be able to expand and adapt this to your needs.

Code: Select all

vector(@obsrange / 100) AC
for !i = 1 to @obsrange step 100
   smpl !i !i+99
   freeze(tmp) x.correl
   AC((!i + 99) / 100) = @val(tmp(7, 4))
   delete tmp
next


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests