[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: re: dear users of Statalist

From   Tobias Brütsch <>
To   <>
Subject   st: RE: re: dear users of Statalist
Date   Tue, 10 Jul 2007 08:40:54 +0200

That works!
Thank you!

-----Original Message-----
From: Kit Baum [] 
Sent: Montag, 9. Juli 2007 03:43
Subject: st: re: dear users of Statalist

Tobias said

But I can't get the right solution. It always gives me a sum of the  
past 30
returns. But I want to sum the futurereturns.

(At the 01.01.01 should be the sum of the daily returns from the  
till the 31.01.01)

Does that work with ROLLING or MVSUMM?

See the egen filter function from egenmore (ssc desc egenmore). It  
will allow you to compute a moving average(or sum)  over future  
periods. For instance

. egen sum10=filter(wpi), l(-10/0) c(1 1 1 1 1 1 1 1 1 1 1)

will compute sum10 as the sum of current and future 10 values of wpi  
(eleven terms in all).

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index