alpheast.strategy.common.bollinger_bands_strategy module¶
- class alpheast.strategy.common.bollinger_bands_strategy.BollingerBandsStrategy(symbol, bb_period=20, num_std_dev=Decimal('2'), **kwargs)[source]¶
Bases:
BaseStrategyA Bollinger Bands trading strategy.
Generates BUY signals when the close price crosses below the lower band and SELL signals when it crosses above the upper band
- Parameters:
symbol (
str) – The financial instrument symbol this strategy will trade.bb_period (
int) – The period over which to calculate the Simple Moving Average (SMA) for the middle band. (e.g., 20)num_std_dev (
Decimal) – The number of standard deviations for the upper and lower bands. (e.g., 2)kwargs (
Any) – Arbitrary keyword arguments passed to the base strategy.