trader.strategies.bollinger_revert module¶
Mean reversion on Bollinger bands: buy the lower band, exit at the mean.
- class trader.strategies.bollinger_revert.BollingerRevertStrategy(id, period=20, num_std=2)[source]¶
Bases:
objectBuy below the lower band; sell once price recovers to the middle band.
Exiting at the middle rather than the upper band is deliberate: this is a reversion-to-the-mean trade, and the mean is the target.
- Parameters:
id (str)
period (int)
num_std (int)
- id: str¶
- period: int¶
- num_std: int¶
- backtestable: ClassVar[bool] = True¶