Creating a loop

For questions regarding programming in the EViews programming language.

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

JeroenZ
Posts: 1
Joined: Mon Jan 26, 2015 6:36 am

Creating a loop

Postby JeroenZ » Mon Jan 26, 2015 6:51 am

Hello everyone,

First of all, I'm rather new to Eviews but willing to learn. I've searched my question on your forum but for so far without any result and therefore just ask you via this new thread wherefore my excuse..

For my project we want to run multiple uni variate regressions. In this regression the return of a certain stock, Apple for instance, will be explained by the return of the S&P500. --> Return Apple = a + b*ReturnS&P500 + e. This regression will be ran twice for every stock I observe, once before such a stock is included to the S&P 500 and once after it is included to the S&P500. I do expect an increase in covariance after inclusion. The moment of inclusion can denoted as some sort of 'event date'. I therefore want to observe 13 untill 1 month prior to the inclusion and 1 untill 13 months thereafter. Due to the many inclusions to the S&P500, doing this manually does not seem to be an option. Therefore I have some questions:

Do I have to specify such an event date for every stock by hand since the returns of all stocks have the same observation period (1976 - 2000) but different event dates.

What 'loop' do I exactly need? I read about FOR loops for instance? Can someone post a thread according to which I can setup my model?

Is it possible to account for event dates in loops?

Many thanks in advance,
Jeroen

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 45 guests