Statalist


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

st: RE: re: dear users of Statalist


From   Tobias Brütsch <topsi@ihcn.ch>
To   <statalist@hsphsun2.harvard.edu>
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 [mailto:baum@bc.edu] 
Sent: Montag, 9. Juli 2007 03:43
To: statalist@hsphsun2.harvard.edu
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  
01.01.01
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
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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