Overview

This page describes the discrete wavelet transform (DWT) as applied to causal denoising of FX and crypto price series within the eXpeed Research Lab framework. The wavelet transform decomposes a return series into approximation and detail coefficients across multiple resolution scales, separating slow-moving trend structure from high-frequency noise.

Mathematical Formulation

A rolling window of log returns is decomposed using the Daubechies 4 (db4) wavelet, the standard basis for financial time series denoising. Detail coefficients below a threshold are suppressed via soft-thresholding, and the series is reconstructed from the remaining coefficients. The threshold is not fixed but derived from the data itself using the universal threshold of Donoho and Johnstone: lambda = sigma_hat * sqrt(2 * ln(n)), where sigma_hat is estimated from the finest-scale detail coefficients via the median absolute deviation (MAD) estimator, sigma_hat = median(|d|) / 0.6745. This makes the threshold adapt automatically to the current volatility regime rather than being fit to a historical window.

Application to FX and Crypto Time Series

The denoised series is used as a basis line for cross detection against reference indicators (for example EMA200), and as a multi-timeframe reference: a coarser-timeframe wavelet line (e.g. M15) can be displayed on a finer chart (e.g. M5) as a stable structural reference that filters out lower-timeframe noise. Session-dependent tuning is relevant, since London/New York overlap sessions carry materially higher volatility and noise than the Asia session.

Implementation Notes

Two implementation details matter for causal validity. First, the decomposition boundary mode must be causal (symmetric extension) rather than periodic; periodic boundary handling pulls the right edge of the reconstructed series toward values from far in the past, producing a visibly distorted endpoint. Second, the rolling window length trades off responsiveness against stability — shorter windows react faster but increase whipsaw in range-bound conditions, and this trade-off should be validated per instrument and session rather than assumed.

Limitations

Wavelet denoising is a smoothing technique, not a predictive model. In range-bound markets, even a causally correct implementation can produce frequent crossing signals against a reference line (whipsaw). Excess complexity layered on top of the wavelet stage (multiple branching decision rules, unconstrained parameters) increases the risk of overfitting to the historical window used for calibration, independent of the wavelet transform itself being correctly implemented.

Related

Math Models · Kalman Filter · ARIMA · GARCH · Methodology