Skip to content
All library documents

MACD Histogram Reversal and Moving Average Filters for Stock Selection

Article SuperMind

Summary

This Chinese stock selection post proposes combining a positive MACD reading with three consecutive down days and a 2021 time filter. Its explanation frames the setup as pairing a longer-term upward indication with recent weakness, but the supplied code does not directly implement that exact description. Instead, the code scans stocks using a one-year daily price window, checks that the latest MACD histogram is positive while the two prior readings are negative, and requires the 20-day average to exceed the 60-day average by a stated margin.

The example excludes paused, special-treatment, and limit-locked shares, then allocates portfolio value equally across selected stocks and removes holdings no longer selected. The post flags MACD lag and sample-period bias, and suggests broader time coverage and other inputs. It reports no backtest results. Its narrative, code conditions, and fixed 2021 reference do not align cleanly, so the intended signal and historical universe require clarification before evaluation; survivorship and execution effects are also unaddressed.

Key ideas

  • The narrative proposes stocks with MACD above its zero line, three consecutive down sessions, and a 2021 time condition.
  • The supplied code instead checks a positive latest MACD histogram after two negative readings.
  • The code adds a filter requiring the 20-day moving average to exceed the 60-day average by a margin.
  • The example excludes paused, special-treatment, and limit-locked stocks and equal-weights selected holdings.
  • The post notes indicator lag and sample-period bias but provides no strategy performance results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.