Copy monthly data to quaterly gmean

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

Jelena
Posts: 11
Joined: Wed Dec 04, 2013 7:28 am

Copy monthly data to quaterly gmean

Postby Jelena » Fri Dec 06, 2013 3:07 am

Hello,

my workfile consists of different pages with different sampling frequencies (1. page- daily, 2. page -monthly, 3. page - quaterly).
I am trying to copy monthly data to the quaterly data page by taking the geometric mean of every quater.
I know about the possibility "paste special..." and to select some methods.
But I did not find a way to convert the monthly data into the the geometric mean for each quater.
Does somebody have an idea?

Thank you very much in advance!
Jelena

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

Re: Copy monthly data to quaterly gmean

Postby trubador » Fri Dec 06, 2013 6:38 am

You can try the following trick:
1) Take the logarithm of the monthly series.
2) Copy and paste special the values to your quarterly page using "Average observations" as the high-to-low frequency conversion method.
3) And take the exponential of the series.

Jelena
Posts: 11
Joined: Wed Dec 04, 2013 7:28 am

Re: Copy monthly data to quaterly gmean

Postby Jelena » Fri Dec 06, 2013 9:31 am

Hello,

thanks for your response!

I thought of the following definition of the geometric mean:

(return 1 * return 2 *...* return n)^1/n

I think your proposed procedure doesn't really reflect this definition...
Do you maybe have another idea? I am thankful about every hint :)

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

Re: Copy monthly data to quaterly gmean

Postby trubador » Fri Dec 06, 2013 11:42 am

In fact, it does:
(return 1 * return 2 *...* return n)^1/n = exp[(ln(return1) + ln(return2) + ... + ln(returnn))/n]

Jelena
Posts: 11
Joined: Wed Dec 04, 2013 7:28 am

Re: Copy monthly data to quaterly gmean

Postby Jelena » Wed Dec 11, 2013 7:06 am

Thanks! It works :)
Sorry for the confusion!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests