Series Generation - Moving Median

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

Odilon
Posts: 2
Joined: Wed Mar 30, 2016 6:04 am

Series Generation - Moving Median

Postby Odilon » Wed Mar 30, 2016 6:20 am

Hi,

My panel database is composed by the daily number of stocks traded (volume) for 139 companies in the past 8 years (2243 days * 139 companies)
For each company i need to compute the following indicator:

Indicator = log(volume) - log(median(volume(-1 to -20)).

In other words, what i am missing is a moving median, and as far as I understand, there is no such function in Eviews 9. Any workaround?

Many thanks! :)

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

Re: Series Generation - Moving Median

Postby EViews Gareth » Wed Mar 30, 2016 10:29 am

From within EViews...

Help->Quick Help Reference->Sample Programs and Data.

Look at the roll example, especially the one storing a moving standard deviation. Just change the function to use @median rather than @stdev.

Odilon
Posts: 2
Joined: Wed Mar 30, 2016 6:04 am

Re: Series Generation - Moving Median

Postby Odilon » Thu Mar 31, 2016 8:16 am

Thanks for your help Gareth. I did as you said and it worked!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests