Charting of Distributions

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

FossilRookie
Posts: 6
Joined: Mon May 24, 2010 3:56 pm

Charting of Distributions

Postby FossilRookie » Mon May 24, 2010 4:22 pm

First of all my apologies if this is already covered somewhere else within this forum.

I am a first time user of Eviews.

I have just imported second by second data stock market data for the Dow Jones Industrial Average (DJIA) for 1 year from the 1990s. NOTE: Data for exists for most but not every second. Approximately 1 million data points.

I have calculated returns between consecutive time points by using simple log returns through the generate function

Thus my data has four series: DATE, TIME, PRICE, LOGRETURN

First off I wish to draw a chart showing me the time of day vs. no of observations in the year (e.g. to see if there more activity at the Market Open)

Can any one guide me.

Thank you.

FossilRookie

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

Re: Charting of Distributions

Postby EViews Gareth » Mon May 24, 2010 4:45 pm

You're going to have to be more specific as to what you're trying to do.

What does "time of day vs. no of observations in the year" mean?

Can you define what you want the Y axis to be, what you want the X axis to be?

You say you only have 1 year of data. Surely the "no of observations in the year" is then fixed?

FossilRookie
Posts: 6
Joined: Mon May 24, 2010 3:56 pm

Re: Charting of Distributions

Postby FossilRookie » Tue May 25, 2010 12:04 am

Hi Gareth,

Thank you for the prompt reply, I apologise for not being specific enough.

Essentially I am looking for a frequency chart of the number of observations (vertical scale) against the market time of day (horizontal scale - say 9-10am, 10-11am, 11-12pm, ...3-4pm); extracted from one year of data (approximately 250 working days).

The next stage would be to evaluate the average return (i.e average market movement, in this example averaging the LOGRETURN) for the same horizontal scale, thus determining what is the most volatile time of the day to be trading this market.

Thank you in advance for your assistance.

FossilRookie

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

Re: Charting of Distributions

Postby EViews Gareth » Tue May 25, 2010 9:00 am

Can't you just do a histogram of your Time series? (Open up Time, click on View->Graph, then choose Histogram)

FossilRookie
Posts: 6
Joined: Mon May 24, 2010 3:56 pm

Re: Charting of Distributions

Postby FossilRookie » Tue May 25, 2010 2:00 pm

Hi Gareth,

Thank you for your response.

I had tried that first but dismissed it. The reason was that yes we get a frequency scale but in place of the time it seems only to go from approx 0.4 to approx 0.7 instead of 9.30am to 4pm (which are the trading hours of the Dow). It is something to do with data import formatting (from Excel)?

Thanks.

FossilRookie

FossilRookie
Posts: 6
Joined: Mon May 24, 2010 3:56 pm

Re: Charting of Distributions

Postby FossilRookie » Tue May 25, 2010 2:07 pm

Hi Gareth,

Please ignore the above. I think I am being a dork. I think 0.3 & 0.7 is a proportion of the 24 hour clock.

Can you help me with one more thing, how can I quickly calculate the average LOGRETURN across the same time scale?

Best,

FossilRookie

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

Re: Charting of Distributions

Postby EViews Gareth » Tue May 25, 2010 2:17 pm

Probably what you want to do is create a new page in your workfile and specify a time frequency that you are happy with. I'm not sure how far down you want to go, but you could, for example, create a new page that is half-hourly between 9am and 5pm. Then you could copy the data from your original page to the new page, using "AVERAGE" as the contraction method.

FossilRookie
Posts: 6
Joined: Mon May 24, 2010 3:56 pm

Re: Charting of Distributions

Postby FossilRookie » Tue May 25, 2010 2:47 pm

Hi Gareth,

I will live with the time frequency for now as I cannot find the option to set time frequency when clicking on new page, only days/date options available.

I do however need to work out the average “logreturn” in a given time of the day (e.g. 9am to 10am). I am not sure where the average contraction method is on the Eviews6 menu options.

Thanks again for the very prompt response,

Best,

FossilRookie

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

Re: Charting of Distributions

Postby EViews Gareth » Tue May 25, 2010 3:19 pm

If you're using EViews6, you're out of luck. EViews 6 won't do intraday frequencies.

FossilRookie
Posts: 6
Joined: Mon May 24, 2010 3:56 pm

Re: Charting of Distributions

Postby FossilRookie » Tue May 25, 2010 3:22 pm

Okay. Thank you for your time and patient advice.

FR


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests