Language

This page is an English translation of the Hungarian content. Charts, videos, code and downloadable source documents retain their original language. Original Hungarian text →

DOES IT WORK, OR JUST SOUND GOOD? / 01

EMA95 or EMA200? Gold (GLD) moving-average backtests and sensitivity to costs

Without costs, EMA95 returned more in the 2017–2025 GLD experiment. With a modelled cost of 0,10% on each purchase and sale, EMA200 moved narrowly ahead. Even this single assumption changes the ranking.

The study's key lesson

In this single experiment, no EMA wins independently of the cost assumption. In the validation period, buy-and-hold delivered a higher return and a smaller maximum drawdown than either EMA variant.

The sample is the USD-denominated daily exchange closing price of the US gold fund GLD. According to the issuer, the fund aims to track gold prices less the fund's expenses. This is one examinable example of gold exposure; the results are not the same as those of a broker's GOLD CFD or an hourly strategy. [1]

Validation period: 2017–2025

All three models start with 10 000 USD in cash. Figures are after the modelled trading costs and before tax. The baseline assumes no return on cash.

EMA958,45%annualized model return
EMA2008,53%annualized model return
Buy and hold15,24%annualized model return
GLD, January 3, 2017 – December 31, 2025; 0,10% cost on every purchase and sale
ModelTotal returnAnnualized returnMaximum drawdownClosed tradesMarket exposure
EMA95107,40%8,45%-30,37%5968,8%
EMA200108,71%8,53%-33,11%4274,9%
Buy and hold258,03%15,24%-22,00%1100,0%

Closed trades also include the costly closing of any position still open at the period's end. Market exposure shows the proportion of examined daily return intervals during which the model was invested.

GLD model calculation for 2017–2025: the net equity curves of EMA95 and EMA200 run close together; buy and hold reaches a higher ending value. Drawdowns from the peak are shown below.
Our own calculation with verified accounting. Click for the high-resolution chart. Historical model returns are not expected or guaranteed returns.

The difference between the two EMAs' annualized returns in the base case is only 0,08 percentage points is the difference. EMA95 produced a smaller maximum drawdown, while EMA200 opened fewer trades. A single small return difference alone does not establish a statistical or future advantage.

What exactly do EMA95 and EMA200 mean?

The exponential moving average gives greater weight to recent prices. The formula used: EMA[t] = α × záró[t] + (1 − α) × EMA[t−1], where α = 2 / (N + 1). In EMA95 the new close has a weight of approximately 2,083%, and in EMA200 0,995%. The shorter average therefore adapts faster; this does not imply better trading results. [2]

The period here daily candles means. A 95-hour EMA and a 95-day EMA answer different questions.

The predefined trading rule

  1. If the completed day's price is above the relevant EMA, the target position is full exposure to the gold fund. Otherwise, cash.
  2. The signal at the next trading day's closing price we execute it. The strategy does not retrospectively receive the rise that had already occurred on the signal day.
  3. Only the EMA period differs between the two versions. No leverage, short selling or other indicator filter. Fractional quantities are allowed.
  4. In the base case, each purchase and each sale costs 0,10% of the current transaction value. For example, a 10 000 USD transaction costs 10 USD per side. This is an assumption, not a broker's fee quote.
  5. Each separately evaluated period starts in cash, and all open positions are closed at the final daily close, with the same costs. If a previously established buy condition is already valid at the start of the period, a purchase may also occur at the first close.

Signal execution is deliberately one daily close later. Execution at the next open or intraday could produce different results. This test examines simple long-position/cash trend following; shifted channels constitute a separate strategy.

How much do costs matter?

We recalculated the same signals with five different costs applying to every purchase and sale. The values below are annualised returns for the 2017–2025 period.

Unchanged signals, different execution costs
Cost per sideEMA95EMA200Buy and hold
0 bp = 0,00%9,88%9,55%15,27%
5 bp = 0,05%9,17%9,04%15,25%
10 bp = 0,10%8,45%8,53%15,24%
25 bp = 0,25%6,33%7,01%15,20%
50 bp = 0,50%2,89%4,53%15,14%

At 0 and 5 basis points, EMA95 has the higher annualized return; at 10, 25 and 50 basis points, EMA200 does. The variant that trades more often suffers more from costs. Actual spreads, commissions, and slippage vary by product and period.

The cash assumption matters too

EMA95 spends more time waiting in cash. We therefore also examined two constant, assumed cash returns. These are not historical interest-rate series, but sensitivity tests. Trading costs here are 0,10% per side throughout.

Annualized model return, 2017–2025
Assumed annual cash returnEMA95EMA200
0%8,45%8,53%
2%9,11%9,07%
4%9,77%9,60%

The ranking is also sensitive to the cash-return assumption. Defining the investment product and the cash return actually available in the account is part of the model.

Does the same hold in other periods?

The earlier 2009–2016 segment is shown separately. The periods of 95 and 200 came from the proposed question; we did not retrospectively search for a better period in the earlier segment either.

Earlier period: 2009–2016, with baseline costs
ModelTotal returnAnnualized returnMaximum drawdownClosed tradesMarket exposure
EMA95-1,36%-0,17%-46,15%5555,1%
EMA20049,00%5,12%-30,24%2555,7%
Buy and hold26,86%3,02%-45,56%1100,0%

We also divided the validation period into three predefined parts. Each part starts and ends in cash separately, so the partial returns cannot simply be added together.

Annualised model returns in three subperiods, 0,10% cost per side
PeriodEMA95EMA200Buy and hold
2017–20192,09%3,67%8,92%
2020–2022-2,94%-5,91%5,57%
2023–202527,94%30,24%32,33%

What makes such a comparison fairer?

We recalculated the portfolio using two separate accounting methods: a holdings/cash ledger and daily return factors. The results agreed. We checked that the system does not profit from price movements before the signal is known, and that with the same signals, higher costs do not improve the closing capital.

An EMA calculated from prior data is available for the signals. From the dataset beginning in 2004, we used more than 1000 trading days of warm-up before each of the two main evaluation periods. We did not fill holidays with invented prices. The sample contains 5312 numeric daily closes between 18 November 2004 and 31 December 2025.

Using a separate period helps reveal overfitting, but historical outcomes are already known. This a retrospective check, not a test run in a genuinely unknown future. The literature also warns of biases arising from the researcher's prior experience. [3]

Limits of the conclusion

  • Daily data for a single gold fund do not imply results for another market, an hourly chart or a different trading rule.
  • The GLD price already reflects the effect of the fund's own operating expenses; we have not deducted them again. Forint/currency conversion, taxes, minimum charges and broker-specific CFD financing are not included in the model.
  • The execution fee is a constant estimate. Actual spreads and slippage may differ in a crisis.
  • We did not perform a statistical significance test or confirmation across multiple markets. We therefore do not call the small return difference a proven advantage.

The practical lesson: Alongside the EMA period, execution, costs, cash management and the market period are decisive. Choosing the 95 or 200 line is worth examining as part of a complete, verifiable trading rule.

Sources and verifiable calculation

  1. SPDR Gold Shares, issuer product page and Historical Archive. Downloaded: October 19, 2026; column used: Closing Price; observations from 2026 are not part of the test.
  2. MetaQuotes: Moving Average, explanation of exponential smoothing.
  3. Joseph Simonian: Investment Model Validation — A Guide for Practitioners, CFA Institute Research Foundation, 2024, Backtesting.

The charts and results tables are our own model calculations. We do not republish the issuer's original price dataset. Exact reproduction requires the same source version, identified by a checksum in the protocol.

Take the analysis further

How is this calculated?

What does it show?

Data, changes and classifications of the indicators above. The rules below explain how this view operates.

Formula and rule

score=correct answers; progress=100×unique completed lessons/total lessons

Inputs and notation

The self-check score counts correct answers, with equal weight per question. An unanswered question is not correct. Progress is the number of distinct lessons marked complete divided by the total for that path. Completion is self-reported, not an exam result.

Data and original source

The series, definitions and source dates shown on individual cards, charts and the original source list apply.

Detailed explanation and sources on this page

Horizon, observation date and refresh

The observation date and period shown on the card and chart apply. Retrieval time is not the observation date. Releases follow the source frequency and update at the next successful check.

Units

Field and result labels specify units. Percentage inputs use a scale of one hundred; /100 converts them to a fraction. A percentage-point difference × 100 gives basis points. Monetary amounts use the same currency and scale.

Fixed illustrative example

Illustrative numerical example; not current market data.

Example: 3 correct answers / 5 questions = 60%; 6 completed lessons / 24 lessons = 25%.

Interpretation and limitations

Observed data and editorial interpretation must be read separately. A classification follows the stated conditions; it does not by itself establish causality or future price direction. Further limitations in the original methodology also apply.

Missing and revised data

Zero can be an observed value; missing, delayed and failed sources are separate states. Different observation dates are not combined without a label. Incomplete evidence cannot yield a complete classification. Revisions may appear at the next live check; they do not change a historical article snapshot.

Full calculation index →
How is this calculated?

What does it show?

Data, changes and classifications of the indicators above. The rules below explain how this view operates.

Formula and rule

α=2/(N+1); EMA(t)=α×close(t)+(1−α)×EMA(t−1); totalReturn=100×(Vend/Vstart−1); CAGR=100×((Vend/Vstart)^(1/years)−1); drawdown(t)=100×(V(t)/max(V(0)…V(t))−1)

Inputs and notation

A historical GLD study, not a live filter. The protocol and original cutoff remain unchanged. EMA starts at the first available close with more than 1000 warm-up bars before each window. N is 95 or 200; the prior day’s close versus average produces a signal executed at the next close after accounting for that day’s return. Start is 10000 USD cash with liquidation on the final day. Base one-way cost is 10 bp; original tables show other cost and cash-yield assumptions. Maximum drawdown is the minimum drawdown; exposure is the share of close-to-close intervals held. Cash yield is an assumption, not historical rate data. This is not a genuinely preregistered untouched sample.

Data and original source

The series, definitions and source dates shown on individual cards, charts and the original source list apply.

Detailed explanation and sources on this page

Horizon, observation date and refresh

The horizon, cutoff and parameters on the original page apply. This description or historical example does not automatically update with later market data. An external chart’s own observation date is read separately.

Units

Field and result labels specify units. Percentage inputs use a scale of one hundred; /100 converts them to a fraction. A percentage-point difference × 100 gives basis points. Monetary amounts use the same currency and scale.

Fixed illustrative example

Illustrative numerical example; not current market data.

N=95 ⇒ α=2/96; EMAprev=100; close=104 ⇒ EMA≈100.0833; 100→90 ⇒ drawdown=−10%

Interpretation and limitations

Observed data and editorial interpretation must be read separately. A classification follows the stated conditions; it does not by itself establish causality or future price direction. Further limitations in the original methodology also apply.

Missing and revised data

Zero can be an observed value; missing, delayed and failed sources are separate states. Different observation dates are not combined without a label. Incomplete evidence cannot yield a complete classification. Revisions may appear at the next live check; they do not change a historical article snapshot.

Full calculation index →