Skip to content
Prev 177206 / 398503 Next

From daily series to monthly and viceversa

Ok, thanks for the quick reply.
I was not able to use the first command, but reading the quick reference
helped me.
Here's what I did.
1996-01-01 1996-01-02 1996-01-03 1996-01-04 1996-01-05 1996-01-08 1996-01-09
1996-01-10 1996-01-11 1996-01-12 1996-01-15 
   1.33139    1.33244    1.32790    1.31406    1.32811    1.32665    1.32469   
1.32842    1.32902    1.32680    1.32279

Then, using
gen 1996 feb 1996 mar 1996 apr 1996 mag 1996 giu 1996 lug 1996 ago 1996 set
1996 ott 1996 nov 1996 dic 1996 gen 1997 
 1.28836  1.30718  1.30173  1.26778  1.27209  1.27933  1.31271  1.31042 
1.27980  1.28972  1.27267  1.27112  1.19681

But this is not what I wanted, because for example the january observation
is not the mean of the month of january, it is simply the last observation
of january. What I need is the mean of the month to be my monthly
observation. Also, the series has some missing data (exchange rates are not
traded every day) and every month could have different # of observation, is
this going to be a problem?

Thanks, Marco
Gabor Grothendieck wrote: