Splitting positive and negative values within same timeserie

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

d77g03
Posts: 2
Joined: Tue Apr 05, 2011 11:59 am

Splitting positive and negative values within same timeserie

Postby d77g03 » Tue Apr 05, 2011 12:08 pm

Hello,
I am running a time-series regression where I have to split index returns in to positive and negative variables whilst keeping them on the same dates. If I split them up prior (through using excel) the regression doesn't want to run so I'm assuming there is a command to split them up throughout the time series. If anyone know how to perform this that would be great as I'm fairly new to eviews

change in VIX=bo + b1VIXt-1+ SPXret+ +SPXret-......

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

Re: Splitting positive and negative values within same times

Postby EViews Gareth » Tue Apr 05, 2011 1:27 pm

It isn't clear what you mean by this.

I'm assuming you have a series (a column of data) called SPXret. You have another column called VIX.

The question is, what do you want the values of SPXret+ to be when SPXret is negative? And what do you want the values of SPXret- to be when SPXret is positive?

d77g03
Posts: 2
Joined: Tue Apr 05, 2011 11:59 am

Re: Splitting positive and negative values within same times

Postby d77g03 » Wed Apr 06, 2011 1:22 am

the full regression i am trying to run is:

change in vix = bo + b1VIXt-1 + SPXret+ + SPXret- + DevMA5+ + DevMA5- + e

I have data from 2006 to 2010. I am looking at the effect contemporaneous index returns has on the VIX (looking at leverage effect). I have a full series of data for SPX returns but i need to separate them somehow in eviews to all the positive returns and all the negative returns. If i split them up beforehand i will only have roughly 2 half sets of data (positive and negative variables). this won't run on eviews as it says I obviously dont have enough data per variable. There must be a way of sorting positive and negative returns in to separate variables when running the regression. I don't want to have any other value for data that isn't in the correct column (eg, 0's when data isn't positive in SPXret+ variable). This has obviously been done as it has been shown in previous journals but the explanation as to how it was computed is very vague.

I hope this may clear things up and any help would be great

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

Re: Splitting positive and negative values within same times

Postby trubador » Wed Apr 06, 2011 4:53 am

I am not sure, but the following might help:

Code: Select all

vix c vix(-1) spxret*(spxret>0) spxret*(spxret<0) devma5*(devma5>0) devma5*(devma5<0)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests