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.
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.
| Model | Total return | Annualized return | Maximum drawdown | Closed trades | Market exposure |
|---|---|---|---|---|---|
| EMA95 | 107,40% | 8,45% | -30,37% | 59 | 68,8% |
| EMA200 | 108,71% | 8,53% | -33,11% | 42 | 74,9% |
| Buy and hold | 258,03% | 15,24% | -22,00% | 1 | 100,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.

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
- If the completed day's price is above the relevant EMA, the target position is full exposure to the gold fund. Otherwise, cash.
- 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.
- Only the EMA period differs between the two versions. No leverage, short selling or other indicator filter. Fractional quantities are allowed.
- 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.
- 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.
| Cost per side | EMA95 | EMA200 | Buy 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.
| Assumed annual cash return | EMA95 | EMA200 |
|---|---|---|
| 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.
| Model | Total return | Annualized return | Maximum drawdown | Closed trades | Market exposure |
|---|---|---|---|---|---|
| EMA95 | -1,36% | -0,17% | -46,15% | 55 | 55,1% |
| EMA200 | 49,00% | 5,12% | -30,24% | 25 | 55,7% |
| Buy and hold | 26,86% | 3,02% | -45,56% | 1 | 100,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.
| Period | EMA95 | EMA200 | Buy and hold |
|---|---|---|---|
| 2017–2019 | 2,09% | 3,67% | 8,92% |
| 2020–2022 | -2,94% | -5,91% | 5,57% |
| 2023–2025 | 27,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
- 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.
- MetaQuotes: Moving Average, explanation of exponential smoothing.
- 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.