Rolling windows: avoid treating overlap as fresh confirmation
Adjacent rolling statistics often reuse most of the same observations. Repeated high values therefore do not necessarily provide repeated independent confirmation of a research claim. Record the underlying dates in each window, identify which new information entered and which old information left, and inspect the raw sequence before calling a smooth trend persistent.
Distinguish a window from a new experiment
A three-month moving average produces one output per month once enough observations exist. That output count is not the count of independent three-month experiments. Successive outputs share data by construction even if the original monthly observations were independent. This mechanical dependence is different from economic serial correlation in the original series.
The pandas windowing guide distinguishes windows defined by observation counts from windows defined by time offsets and describes endpoint and labeling choices. Those implementation details help reproduce a statistic. The independence argument and worked example here are analytical deductions, not a pandas investment performance claim.
A hypothetical shipment spike
Assume an invented shipment series has January through June values of 10, 10, 40, 10, 10 and 10. Three adjacent three-month totals are all 60. Someone reading only those totals might describe three confirmations of stronger demand. In fact, the same March observation drives all three windows.
| Output window | Included values | Total | New observation relative to prior window |
|---|---|---|---|
| January–March | 10, 10, 40 | 60 | Initial window |
| February–April | 10, 40, 10 | 60 | April 10 replaces January 10 |
| March–May | 40, 10, 10 | 60 | May 10 replaces February 10 |
| April–June | 10, 10, 10 | 30 | June 10 replaces March 40 |
The rolling totals are correctly calculated. The unsupported step is treating their repetition as three separate demand shocks. The raw sequence supports one unusual month followed by ordinary observations in this example. Whether the spike represents genuine demand, timing or a data error requires separate operating evidence.
Quantify overlap before interpreting persistence
Two adjacent fixed three-observation windows share two observations, or two thirds of their contents. Under the special illustrative assumption of independent monthly values with equal variance, the correlation between adjacent unweighted three-month averages is also two thirds: their shared terms create covariance. That calculation is a mechanical example, not an empirical estimate for company shipments.
Real series may have additional serial dependence, missing periods or unequal weights. Do not apply the two-thirds correlation universally. Time-based windows can even contain different numbers of observations, so count the actual included records rather than assuming a calendar label tells you the sample size.
Describe the update as entries and exits
For each new window, record the entering observation, the exiting observation and any revisions to shared values. A stable rolling average can conceal offsetting changes. A falling average may reflect an old exceptional month leaving rather than a deterioration in current activity. Those mechanisms imply different follow-up questions for a research thesis.
Inspect both the raw values and a clearly labeled smoothed series. Nonoverlapping windows can help diagnose how much repetition came from shared data, but they reduce the number of outputs and can be sensitive to the chosen starting month. They are a diagnostic view, not an automatic cure for all dependence.
Preserve timing and definitions
State whether the statistic is trailing or centered, which endpoints are included and how incomplete windows are handled. A centered window may use observations later than its displayed date. That is acceptable for a retrospective description when labeled, but not for pretending a historical decision had information that had not yet arrived.
Keep release dates and revisions when comparing research decisions over time. A newly published monthly total can update several rolling outputs simultaneously; those revised outputs are not several independent news events. The underlying information event should remain identifiable in the evidence log.
Bound the research claim
Use smoothing to describe noisy data while explaining how much evidence is actually new. In the example, three high rolling totals support persistence of the calculation, not persistence of three new demand observations. Additional confirmation should come from new underlying measurements or a defensible statistical model that accounts for dependence.
FAQ
Are rolling averages misleading by definition?
No. They can make patterns easier to inspect. The error is interpreting overlapping outputs as independent evidence or hiding the raw series.
Does switching to nonoverlapping windows solve everything?
No. Economic dependence, sample size and boundary choices remain. Show the change as a diagnostic and keep the interpretation conditional.