Page 1 of 1

calculate the mean of returns only for a particular day

Posted: Thu Nov 17, 2011 12:03 pm
by Nau2306
Hi

I am new to eviews and with a series of daily exchange rates, i am trying to calculate the mean of the returns only for the observations on a particular day, say only mondays, or tuesdays.

Can someone please help me?

Thanks

Re: calculate the mean of returns only for a particular day

Posted: Thu Nov 17, 2011 12:16 pm
by EViews Gareth
Set the sample to be Mondays only, then calculate the mean:

Code: Select all

smpl if @weekday=1 scalar monmean = @mean(returns)
where returns is the name of the series you're calculating the mean of.

Re: calculate the mean of returns only for a particular day

Posted: Thu Nov 17, 2011 11:44 pm
by Nau2306
thx loadzzz ! :)

Re: calculate the mean of returns only for a particular day

Posted: Thu Nov 17, 2011 11:54 pm
by Nau2306
i am rily sry for disturbing u agen bt using the first command only, i fail to obtain the series with observations of Mondays only so that i can examine the descriptive statistics of this data set

thx

calculate the mean of returns only for a particular day

Posted: Fri Nov 18, 2011 12:06 am
by EViews Gareth
What do you mean by you fail?

Re: calculate the mean of returns only for a particular day

Posted: Fri Nov 18, 2011 12:29 am
by Nau2306
i mean i did get the sample but not the series containing only the monday returns. I wish to examine the statistics for only monday returns, tuesday returns, wednesday returns and so on.

Thx

Re: calculate the mean of returns only for a particular day

Posted: Fri Nov 18, 2011 7:27 am
by startz
How is your work file structured?

Re: calculate the mean of returns only for a particular day

Posted: Fri Nov 18, 2011 11:12 pm
by Nau2306
meaning??

Re: calculate the mean of returns only for a particular day

Posted: Sat Nov 19, 2011 9:13 am
by startz
All EViews workfiles have a structure: annual, monthly, "unstructured," etc.

Re: calculate the mean of returns only for a particular day

Posted: Sat Nov 19, 2011 10:17 am
by Nau2306
Oh ok... well its dated at daily frequency (7 day week).

Re: calculate the mean of returns only for a particular day

Posted: Sat Nov 19, 2011 1:32 pm
by startz

Code: Select all

smpl if @weekday=1
limits the sample to Mondays.

Re: calculate the mean of returns only for a particular day

Posted: Sat Nov 19, 2011 11:47 pm
by Nau2306
thanks... think i got it now