Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Re: rolling standard deviation [was: ""]

From   Maarten Buis <>
Subject   st: Re: rolling standard deviation [was: ""]
Date   Wed, 29 Jun 2011 13:42:54 +0200

On Wed, Jun 29, 2011 at 1:29 PM,  wrote:
> I'm having a hard time trying to calculate the standard deviation of the first difference of logarithms of daily exchange rates for the past 6 month (or 180 days).
> As I'm using a huge dataset with daily data, I have gaps (or missings, if I use the fillin command before).

Such gaps are often the result of the fact that the data is not
generated by a daily process, e.g. no data for weekends and holidays.
In that case the calender time is not the appropriate time axis when
doing your analysis. For solutions see: Christopher F. Baum (2007)
"Stata tip 40: Taking care of business" The Stata Journal, 7(1):
137--139. <>

For computing the standard deviation of the past six months I would
use -rolling-, see: -help rolling-.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index