Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Creating Standard Deviation variable for daily panel data (stock returns)


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Creating Standard Deviation variable for daily panel data (stock returns)
Date   Wed, 3 Jul 2013 18:28:30 +0100

Indeed. A month variable must exist first.

Nick
[email protected]

On 3 July 2013 18:25, Steve Nakoneshny <[email protected]> wrote:

> You could create a month var via -g month=month(date)- and then substitute month into your -egen- statement.

On 2013-07-03, at 11:13 AM, C. Evans wrote:

>> I would like standard deviation values of returns calculated for each id
>> each month. So I would have a value of 0.2 everyday in one month for id=1
>> and then the 2nd month a different standard deviation. I should see a
>> different SD each month and for each different Id - probably.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index