alpheast.strategy.common.rsi_strategy module¶
- class alpheast.strategy.common.rsi_strategy.RSIStrategy(symbol, rsi_period=14, oversold_threshold=Decimal('30'), overbought_threshold=Decimal('70'), **kwargs)[source]¶
Bases:
BaseStrategyA Relative Strength Index (RSI) trading strategy.
Generates BUY/SELL signals based on RSI crossing oversold/overbought thresholds.
- Parameters:
symbol (
str) – The financial instrument symbol this strategy will trade.rsi_period (
int) – The period over which to calculate the RSI. (e.g., 14 for typical RSI)oversold_threshold (
Decimal) – The RSI value below which an asset is considered oversold (e.g., 30).overbought_threshold (
Decimal) – The RSI value above which an asset is considered overbought (e.g., 70).kwargs (
Any) – Arbitrary keyword arguments passed to the base strategy.
- on_market_event(event)[source]¶
Handles incoming market events to update RSI and generate trading signals.
- Parameters:
event (
MarketEvent) – The MarketEvent containing new market data.