Date: Wed, 18 Apr 2007 12:58:49 -0500
Reply-To: "Huang, JS" <Huang.JS@PRINCIPAL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Huang, JS" <Huang.JS@PRINCIPAL.COM>
Subject: Re: calculating rolling standard deviation
Content-Type: text/plain; charset="us-ascii"
I assume that you are calculating population standard deviation
instead of sample standard deviation. If not, then std(1) is not
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Wednesday, April 18, 2007 12:45 PM
Subject: calculating rolling standard deviation
I am trying to calculate a rolling standard deviation for a variable
date obs_number value_x stdandard_deviation
01012000 1 1 std(1)
01022000 1 1.2 std(1,1.2)
01032000 1 12 std(1,1.2,12)
01042000 1 5 std(1,1.2,12,5)
01052000 1 6 ....
01012000 2 42
01022000 2 1.422
01032000 2 15232
01042000 2 65
01052000 2 63
As you see, each next value of standard_deviation uses one extra
observation of value_x.
Would appreciate your help!
This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to Connect@principal.com and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.
Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act ("E-Sign")
unless a specific statement to the contrary is included in this message.
While this communication may be used to promote or market a transaction
or an idea that is discussed in the publication, it is intended to provide
general information about the subject matter covered and is provided with
the understanding that The Principal is not rendering legal, accounting,
or tax advice. It is not a marketed opinion and may not be used to avoid
penalties under the Internal Revenue Code. You should consult with
appropriate counsel or other advisors on all matters pertaining to legal,
tax, or accounting obligations and requirements.