I am a noob in Eviews and have never worked with it, so can anybody help me with the following questions:
I would like to test whether a some calendar anomalies exist in the index options on the S&P500.
Therefore I created a dataset (I attached my dataset file so you can have a look at it) with one column of data (from 1996-2010, exclusing weekends and some other days) and different columns of excess returns for different portfolios of options.
My questions are:
- How do I import this dataset into eviews so I can use it for the regressions (since some days are missing in the dates and a lot of excess returns are missing on different dates)?
- Do I leave missing values blank or do I have to fill something in in these cells?
- How do I make dummy variables and run a regression on them (for example: a dummy variable where I test for higher excess returns on all days in January)?
- What kind of robustness checks are easy to do to make the results more reliable?
I hope somebody will help me!
Best regards, Jochem
Import data and run a regression with dummy variables
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
jochemvandalfsen
- Posts: 5
- Joined: Wed May 16, 2012 5:13 am
Import data and run a regression with dummy variables
- Attachments
-
- Eviews Input Data.xlsx
- Dataset
- (452.51 KiB) Downloaded 717 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13605
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Import data and run a regression with dummy variables
Have you read through the first few chapters of EViews Illustrated? http://eviews.com/illustrated/illustrated.html
-
jochemvandalfsen
- Posts: 5
- Joined: Wed May 16, 2012 5:13 am
Re: Import data and run a regression with dummy variables
Yes, I already read them, but I am just not that good with these kind of programs...
It would be great if you could explain the first steps, so I can move on a bit and then use the guide to go further...
Rgds, Jochem
It would be great if you could explain the first steps, so I can move on a bit and then use the guide to go further...
Rgds, Jochem
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13605
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Import data and run a regression with dummy variables
Have you tried opening the data in EViews?
-
jochemvandalfsen
- Posts: 5
- Joined: Wed May 16, 2012 5:13 am
Re: Import data and run a regression with dummy variables
Yes, I attached the file with the data opened in Eviews.
So you see one sheet with the dates, 4 sheets with the excess returns of the different portfolios, and 4 sheets with the delta hedge excess returns of the different portfolios.
What to do next is not clear to me...
So you see one sheet with the dates, 4 sheets with the excess returns of the different portfolios, and 4 sheets with the delta hedge excess returns of the different portfolios.
What to do next is not clear to me...
- Attachments
-
- Eviews data imported.WF1
- Eviews data imported
- (309.12 KiB) Downloaded 510 times
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Import data and run a regression with dummy variables
1. (1) I am not sure how you import the dataset into EViews. The easiest way is to select File-->Open-->Foreign Data as Workfile-->find your data file.- How do I import this dataset into eviews so I can use it for the regressions (since some days are missing in the dates and a lot of excess returns are missing on different dates)?
- Do I leave missing values blank or do I have to fill something in in these cells?
- How do I make dummy variables and run a regression on them (for example: a dummy variable where I test for higher excess returns on all days in January)?
- What kind of robustness checks are easy to do to make the results more reliable?
(2) Based on my understanding, your dataset should be structured as "Dated." Here is the way to make it as a Dated workfile. Select Proc-->Structure/Resize Current Page-->Select "Dated -specified by date series" from the Workfile structure type" tab. Enter "date" in the "Identifier series" tab. Select "Daily-5 day week" from the "Frequency" tab.--> Click OK
2. You do not need to worry about missing values (NAs). If you are estimating an equation, EViews will use the set of observations in the sample that have no NAs for the dependent and all the the independent variables.
3. Please tell me more what you are trying to do. A common way to generate a dummy variable is series dummy = @recode(your condition,1,0).
4. When you run your regression, please select the View tab from from the equation object. You will see a variety of Diagnostics options.
-
jochemvandalfsen
- Posts: 5
- Joined: Wed May 16, 2012 5:13 am
Re: Import data and run a regression with dummy variables
Dear Esther,
1. Is done, thanks (I attached my workfile with the dataset structured as dated)
2. I noticed, thanks.
3. So at this moment all my data (daily excess and delta hedge excess returns from 1996 - 2010 for 4 different portfolios) is in eviews (well structured), and I would like to check for existence of one of the following 3 calendar anomalies: The January Effect (abnormal excess returns from 1 January – 31 January), The Weekend Effect (abnormal excess returns on each trading day on Monday) and The Halloween Effect (abnormal excess returns on each trading day in the period from 1 November to April 30). I would like to check, for each portfolio separately, whether these calendar effects exist.
Can you maybe explain how I make a dummy for the The January Effect and how I run the regression and what values I should use for my results on these regressions?
Thanks in advance!
Jochem
1. Is done, thanks (I attached my workfile with the dataset structured as dated)
2. I noticed, thanks.
3. So at this moment all my data (daily excess and delta hedge excess returns from 1996 - 2010 for 4 different portfolios) is in eviews (well structured), and I would like to check for existence of one of the following 3 calendar anomalies: The January Effect (abnormal excess returns from 1 January – 31 January), The Weekend Effect (abnormal excess returns on each trading day on Monday) and The Halloween Effect (abnormal excess returns on each trading day in the period from 1 November to April 30). I would like to check, for each portfolio separately, whether these calendar effects exist.
Can you maybe explain how I make a dummy for the The January Effect and how I run the regression and what values I should use for my results on these regressions?
Thanks in advance!
Jochem
- Attachments
-
- eviews data imported.wf1
- Well structured eviews data
- (338.84 KiB) Downloaded 457 times
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Import data and run a regression with dummy variables
The January effect:The January Effect (abnormal excess returns from 1 January – 31 January), The Weekend Effect (abnormal excess returns on each trading day on Monday) and The Halloween Effect (abnormal excess returns on each trading day in the period from 1 November to April 30).
Code: Select all
series dummy1 = @recode(@datepart(@date,"mm")=1,1,0)Code: Select all
series dummy2 = @recode(@datepart(@date,"w")=1,1,0)Code: Select all
series dummy3 = 0
smpl if @datepart(@date,"mm")<5
dummy3 = 1
smpl if @datepart(@date,"mm")>10
dummy3 = 1
smpl @all
-
jochemvandalfsen
- Posts: 5
- Joined: Wed May 16, 2012 5:13 am
Re: Import data and run a regression with dummy variables
Thanks a lot! This is really helpful!!
So after making for example the dummy to test for the January effect, how do I actually run a regression using this dummy and how can I interpret the results? What statistical values give me information on the existence of the January Effect in one of the portfolios I want to test?
Thanks for the help!
Rgds, Jochem
So after making for example the dummy to test for the January effect, how do I actually run a regression using this dummy and how can I interpret the results? What statistical values give me information on the existence of the January Effect in one of the portfolios I want to test?
Thanks for the help!
Rgds, Jochem
Who is online
Users browsing this forum: No registered users and 2 guests
