Indicator guide
MACD Backtesting Guide
MACD is a trend and momentum indicator based on differences between exponential moving averages. A valid backtest converts its readings into explicit, time-aware rules and evaluates them after costs without assuming profitability.
How MACD is commonly used
Researchers use MACD for line crossovers, zero-line filters, and histogram changes. The indicator should be calculated only from information available at each simulated decision time.
Parameters to define
State the fast, slow, and signal periods. Parameter choices affect signal frequency and lag, so compare a limited, predefined range rather than selecting one value after reviewing the full history.
How to evaluate a test
Review net return, maximum drawdown, volatility, trade count, win/loss size, exposure, and behavior across subperiods. Compare with a simple benchmark and test unseen data.
Research checklist
- fast, slow, and signal periods
- Signal timing and execution price
- Fees, spread, and slippage
- Out-of-sample stability
Questions and answers
How do I backtest MACD?
Define the MACD calculation and signal rules, prevent future data from entering each decision, apply realistic execution costs, and validate on a separate period.