Skip to content
#small language model Open access

An Exponential Moving Average Remembers Its Starting Value for Hundreds of Bars — From Zero It Takes 116 Bars at N=20, 292 at N=50 and 1,168 at N=200, With Bars ÷ N of 5.83, 5.84 and 5.84 [F045]

Sep 2026 · Zenodo (CERN European Organization for Nuclear Research)

Abstract

指数移動平均は漸化式である。x[t] = a·v[t] + (1−a)·x[t−1] と書けるので、初期値の重みは (1−a)^n で減るが、決してゼロにはならない。つまり、どこから始めたかがいつまでも残る。単純移動平均は違い、窓から出た値はきっぱり消えるので N 本で完全に忘れる。では「十分なデータを使った」の「十分」は何本なのか。本稿の分離子は、初期化の方法(どこから始めたか)である。系列・期間・銘柄・格子をすべて固定し、どこから始めたかだけを変える。 四銘柄(USDJPY・EURUSD・GBPUSD・XAUUSD)の2019年から2024年までの1時間足で、比べる区間の 5,000 本前から始めた版を「正解」とし、三つの初期化(A 最初の値・B 最初の N 本の平均・C ゼロ)から始めた版がそれに追いつくまでの本数を数えた。比べる区間は 29,892 から 31,534 本である。追いつくとは、差が価格の刻みの 0.1 倍を下回り、二度と超えないことである。一度下回るだけでは足りない。期間は N = 20・50・200(RSI は 14)で、判定は移動平均が価格の上か下か、および RSI が 70 を超えたかである。 ゼロから始めた指数移動平均は、正解に追いつくまで N=20 で 116 本・N=50 で 292 本・N=200 で 1,168 本かかる。一時間足なら N=200 はおよそ七週間ぶんである。本数 ÷ N は 5.83・5.84・5.84 で、最大 ÷ 最小が 1.0026 とほぼ完全に比例する。差が (1−a)^n で減るなら、一定の割合まで落ちるのに要る本数は 1/a、つまり N に比例するので、予言①は当たった。単純移動平均は 19・49・199 本で追いつき、N を超えることは一度も無い。最初の差が 11,802.7115 pips あっても 199 本で完全に消える(予言②も当たった)。そして同じ N・同じ初期化でも、指数は単純の 5.87 から 6.13 倍かかる。「N 本の移動平均」という同じ呼び名で、要るウォームアップが六倍違う。 予言は二つ外れた。一つは判定で、値より早く落ち着いた。判定が一致する本数 ÷ 値が追いつく本数は中央 0.4787(幅 0.1609 から 0.7945)である。理由は単純で、価格は普通ならし線から離れているので、わずかな誤差では上下が入れ替わらない。私は「閾値のすぐ近く」を考えていたが、そこは全体のごく一部だった。もう一つは比例で、三つの初期化をまとめると本数 ÷ N の最大 ÷ 最小は 3.1064 になる。ゼロから始めた場合だけなら 1.0026 である。崩れるのは、最初の差そのものが N で変わるからで、A と B では最初の差が N=50 の 4.6803 pips から N=200 の 64.8450 pips まで動く。ゼロから始めれば、最初の差は N によらず価格そのものである。RSI(ウィルダー平滑・14)でも値は 62 から 66 本かかるが(N=14 の 4.43 から 4.71 倍)、「70 を超えたか」の判定は A と B で 0 本、C でも 6 本しか食い違わない。 基準線として合成乱数で同じことをすると、実測 ÷ 合成乱数は中央 0.9278(幅 0.5987 から 1.0069)で、ゼロから始めた場合は 1.0043・1.0069・1.0056 とほとんど一致する。最初の差が系列に依らないからである。つまりこれは市場の性質ではなく、漸化式の算術であり、どんな系列でも同じだけ覚えている。結論として、指数平滑を使うときに必要なのは期間の約六倍のウォームアップである。そして「値がもう合っている」と「判定がもう合っている」は別の時点であり、本稿の測定では判定のほうが先に落ち着いた。だが N=200 をゼロから始めると、最初の 1,000 本の 0.2450 は上下が食い違う。四本に一本である。初期化を選べば A(最初の値)で 0.0655 まで小さくなるが、ゼロにはならない。 この論文の位置づけ:新しい数学定理も新しい法則も主張しない。指数平滑の初期値の減衰は初等的な結果である。特定の教材やその著者、販売元は主題ではなく、一切名指していない。特定の実装も論じておらず、どの取引ソフトがどう初期化しているかは調べていない。売買を論じておらず、成績も損益も測っていない。予言③が外れており、判定の食い違いは値より早く消えた。一致の基準を一つに決めている(価格の刻みの 0.1 倍であり、基準を変えれば本数も変わる)。RSI の判定が食い違わない理由は測っていない。初期化を三通り、格子を一つに固定している。測定は日中・少数銘柄・四銘柄六年・1 時間足に限られ、月次の時系列モメンタムのようにより長い保有で文書化されている結果を否定するものではない。 作成にあたって:本稿の着想と内容は、著者自身の考察に基づくものです。文章の構成整理や英訳、集計に用いたスクリプトの作成には AI(大規模言語モデル)の助力を得ました。最終的な内容の解釈や誤りがあれば、それらはすべて著者の責に帰します。お気づきの点があれば、ご教示いただければ幸いです。 ----- An exponential moving average is a recurrence, x[t] = a·v[t] + (1−a)·x[t−1], so the weight on the initial value decays as (1−a)^n but never reaches zero: where it was started stays with it forever. A simple moving average is different — a value that leaves the window is gone for good, so it forgets completely in N bars. How many bars, then, is the "enough" in "enough data was used"? The separator in this paper is the initialization, that is, where the average was started. The series, the period, the instruments and the grid are all held fixed, and only the starting point is changed. Using one-hour bars for four instruments (USDJPY, EURUSD, GBPUSD, XAUUSD) from 2019 to 2024, a version started 5,000 bars before the comparison window was taken as the correct one, and the number of bars needed for three initializations (A the first value, B the mean of the first N, C zero) to catch up with it was counted. The comparison window runs from 29,892 to 31,534 bars. "Catches up" means the difference falls below 0.1 of a price tick and never exceeds it again — falling below once is not enough. The periods are N = 20, 50 and 200 (RSI at 14), and the verdicts are whether the price is above or below the average and whether RSI exceeds 70. Started from zero, an exponential moving average takes 116 bars at N=20, 292 at N=50 and 1,168 at N=200 to catch up; on one-hour bars, N=200 is about seven weeks. Bars ÷ N is 5.83, 5.84 and 5.84, with a maximum ÷ minimum of 1.0026 — almost perfectly proportional. If the difference decays as (1−a)^n, the bars needed to fall to a fixed fraction are 1/a, that is, proportional to N, so prediction ① held. A simple moving average catches up in 19, 49 and 199 bars and never exceeds N: an initial difference of 11,802.7115 pips disappears completely in 199 bars (prediction ② held too). And at the same N with the same initialization, the exponential takes 5.87 to 6.13 times as long as the simple — under the same name, "an N-bar moving average", the warm-up required differs sixfold. Two predictions failed. The first is the verdict, which settled sooner than the value: bars until the verdict agrees ÷ bars until the value catches up has a median of 0.4787 (range 0.1609 to 0.7945). The reason is simple — the price is usually well away from the average, so a small error rarely flips which side it is on. I had been thinking of "right next to the threshold", but that is a small part of the whole. The second is proportionality: pooling the three initializations gives a maximum ÷ minimum of 3.1064 for bars ÷ N, against 1.0026 for the start from zero alone. It breaks because the initial error itself changes with N — under A and B the initial difference runs from 4.6803 pips at N=50 to 64.8450 at N=200, whereas started from zero the initial difference is the price itself, whatever N is. For RSI (Wilder smoothing, 14) the value also takes 62 to 66 bars (4.43 to 4.71 times N=14), but the verdict "does it exceed 70" disagrees for 0 bars under A and B and only 6 under C. On the baseline, running the same procedure on a synthetic random walk gives measured ÷ random walk with a median of 0.9278 (range 0.5987 to 1.0069), and for the start from zero 1.0043, 1.0069 and 1.0056 — almost identical, because the initial difference does not depend on the series. So this is not a property of the market but the arithmetic of a recurrence: any series remembers just as long. The conclusion is that exponential smoothing needs a warm-up of about six times the period. And "the value already agrees" and "the verdict already agrees" are different moments; in this measurement the verdict settled first. But start N=200 from zero and 0.2450 of the first 1,000 bars come out on the wrong side — one bar in four. Choosing the initialization shrinks it to 0.0655 under A (the first value), though it does not reach zero. Scope of this paper: no new mathematical theorem and no new law is claimed; the decay of the initial value in exponential smoothing is elementary. No real course, author, or vendor is the subject here, and none is named. No particular implementation is discussed either — which trading software initializes how was not examined. No trading is discussed, and neither performance nor profit and loss is measured. Prediction ③ failed: the verdict stopped disagreeing sooner than the value did. One criterion for agreement is fixed (0.1 of a price tick; a different criterion gives different counts). Why the RSI verdict barely disagrees is not measured. Three initializations and one grid are fixed. The measurement is intraday and covers four instruments over six years on one-hour bars, and does not contradict results documented at longer holding periods, such as monthly time-series momentum. Acknowledgement: The ideas and content of this paper stem from the author's own considerations. Assistance from an AI (a large language model) was used for structuring, English translation, and writing the scripts used for the measurement. Any remaining errors or misinterpretations are solely the author's. Feedback and corrections are sincerely appreciated.

View source

Similar papers

#small language model Dataset Open access Oct 2026

Socratic guiding questions in synthetic arithmetic data: matched LoRA runs (revision v2)

Supporting data, adapters, predictions and code for the article *Low-Cost LoRA Fine-Tuning of Small Language Models for Multi-Step Arithmetic Reasoning* by Jake O'Grady, Asena Isik Gürhan, Chee Fong Ting and Effirul Ramlan (University of Galway). We generated 20,000 GSM8K-derived arithmetic problems with step-by-step s...

O'Grady, Jake, Gürhan, Asena Isik, Chee, Fong Ting et al. · 465 citations
#computer vision Open access Jun 2016

Software Development in Startup Companies: The Greenfield Startup Model

The results are packaged in the Greenfield Startup Model (GSM), which explains the priority of startups to release the product as quickly as possible, and the need to shorten time-to-market, by speeding up the development through low-precision engineering activities.

Carmine Giardino, Nicolò Paternoster, M. Unterkalmsteiner et al. · 178 citations · ⚡14
#computer vision Open access Oct 2016

Software Startups - A Research Agenda

Software startup companies develop innovative, software-intensive products within limited timeframes and with few resources, searching for sustainable and scalable business models.

M. Unterkalmsteiner, P. Abrahamsson, Xiaofeng Wang et al. · 157 citations · ⚡17
#machine learning Review Open access Oct 2016

“Failures” to be celebrated: an analysis of major pivots of software startups

This study conducts a case survey study based on the secondary data of the major pivots happened in 49 software startups, and demonstrates that customer need pivot is the most common among all pivot types.

Sohaib Shahid Bajwa, Xiaofeng Wang, Anh Nguyen-Duc et al. · 127 citations · ⚡15
#computer vision Review Open access May 2015

A survey study on major technical barriers affecting the decision to adopt cloud services

The comparison of adopter and non-adopter sample reveals three potential adoption inhibitor, security, data privacy, and portability, which underlines the importance of the technical and security perspectives for research investigating the adoption of technology.

Nattakarn Phaphoom, Xiaofeng Wang, S. Samuel et al. · 111 citations · ⚡8
#computer vision Open access Feb 2018

Lean Internal Startups for Software Product Innovation in Large Companies: Enablers and Inhibitors

This study investigates how Lean internal startup facilitates software product innovation in large companies and identifies its enablers and inhibitors, and shows the potential of the method-in-action framework to investigate the Lean startup approach in non-startup context.

Henry Edison, Nina M. Smørsgård, Xiaofeng Wang et al. · 78 citations · ⚡6

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.