Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: mvsumm and missing observations (part 2)


From   jansoko@umich.edu
To   statalist@hsphsun2.harvard.edu
Subject   st: mvsumm and missing observations (part 2)
Date   Wed, 11 Aug 2004 14:01:23 -0400

Dear Kit and Nick,

thanks you for your prompt responses.  I understand your concern.  However, I am
applying -mvsumm- in a finance setting: I need to estimate the volatility of
stock returns using the preceding 60 months of returns.  Sometimes, I have just
1 observation missing...  and as long as this observation is part of the
preceding 60 months, I get no estimate of the volatility for that company's
stock (i.e. I lose 60 observations by insisting on a complete history).  I am
willing to make the tradeoff between gaining 60 observations at the cost of a
slightly less reliable measure of volatility.

In your answer you suggested to clone and reprogram your original -mvsumm-. I am
not a programming whiz - do you have any pointers?

This is a common procedure in finance - I think you may underestimate the demand
for such a feature in -mvsumm- ;-)

Thanks a lot!!  Jan



> Dear Stata users,

> I have a similar question to Adrian's about -mvsumm-.  Unfortunately, the
> proposed solution (using -tssmooth-) doesn't work as I am interested in
> moving
> variances, not moving averages.

> How can I get create a variable that contains the variance of the five
> preceding
> observations in a panel data set, even if one or two of the those preceding
> observations are missing?  And how can I specify the minimum number of
> non-missing observations within the window?

> Thanks, Jan

*
*   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