EMA Smoothing & Recommendation Hysteresis
PulseGrid v2.0 applies Exponential Moving Average (EMA) smoothing to raw PG scores and recommendation hysteresis to signal transitions, addressing two critical failure modes: signal noise and recommendation churn.
The Problem: Signal Churn
Without smoothing, the PG-MIM engine can oscillate between adjacent signals (e.g., SELL to HOLD to SELL) on consecutive days when the raw score hovers near a threshold boundary. This creates false signals and reduces user confidence.
EMA Smoothing
The EMA smoothing function applies a weighted average that gives more importance to recent scores while dampening short-term noise:
> EMA(t) = alpha Score(t) + (1 - alpha) EMA(t-1)
Where:
- alpha = 2 / (halfLife + 1)
- halfLife = 5 (configurable, default 5 data points)
The half-life of 5 means that a score from 5 periods ago carries approximately half the weight of the current score. This preserves trend direction while filtering out single-day spikes.
Recommendation Hysteresis
Hysteresis prevents oscillation by requiring a score to cross a threshold by a margin before changing the recommendation:
| Transition | Standard Threshold | With Hysteresis (margin = 3) |
|---|---|---|
| HOLD to BUY | Score > 15 | Score > 18 |
| BUY to HOLD | Score < 15 | Score < 12 |
| HOLD to SELL | Score < -15 | Score < -18 |
| SELL to HOLD | Score > -15 | Score > -12 |
The hysteresis margin creates a "dead zone" around each threshold. Once a recommendation is established, the score must move further in the opposite direction to reverse it. This reduces false signal transitions by 15-25% based on backtesting.
Implementation
- Replay mode: EMA smoothing is applied to the entire score series after computation
- Live scoring: The previous smoothed score is stored and used as the EMA seed for the next cycle
- Hysteresis: Applied after smoothing, using the previous recommendation as context
Signal Stability Metric
The validation metrics now include a Signal Stability percentage, measuring how often the recommendation remained unchanged between consecutive data points. Higher stability (>70%) indicates the smoothing and hysteresis are working effectively.
Limitations
- EMA smoothing introduces a lag of approximately halfLife/2 periods in detecting true regime changes
- The fixed hysteresis margin may be too aggressive for highly volatile instruments and too conservative for stable ones
- In rapidly changing markets, smoothing may delay important signal transitions