AdaptiveRsi
Relative Strength Index with a dynamically adaptive look-back period.
Dynamically adjusts its look-back period based on current market volatility and cycle length. In calm, trending markets the period lengthens for smoother signals; in volatile or choppy regimes it shortens for faster reaction. Useful when a fixed-period RSI produces too many whipsaws or lags behind regime changes.
See Also
Methods
| description | Short explanation of what the strategy does. |
| evaluate | Evaluate the strategy and return orders. |
| required_indicators | Indicators that must be computed up-front for this strategy. |
Short explanation of what the strategy does.
| Returns |
str
The description.
|
Evaluate the strategy and return orders.
| Parameters |
data : dict[str, numpy.ndarray | pandas.DataFrame | polars.DataFrame]
Keys are the experiment's symbols and values are the historical
OHLCV data available up to the current bar. For example,
portfolio : backtide.backtest.Portfoliodata["AAPL"]["close"] selects AAPL's visible close-price history.
Current portfolio holdings (cash, positions and open orders). For
example,
state : backtide.backtest.Stateportfolio.positions.get("AAPL", 0.0) returns the current
signed quantity, while portfolio.orders contains pending orders.
Current simulation state. For example, use
indicators : dict[str, dict[str, numpy.ndarray | pandas.DataFrame | polars.DataFrame]] | Nonestate.is_warmup to
suppress orders during warmup and state.datetime to read the
current bar's timezone-aware timestamp.
The first keys are the indicator names. The second keys are the
experiment's symbols. The values are the pre-computed indicator
histories available up to the current bar. For example,
indicators["SMA_20"]["AAPL"] selects AAPL's visible 20-bar SMA
history. None is permitted when no indicators were selected.
|
| Returns |
list[Order]
Orders to place this tick.
|
Indicators that must be computed up-front for this strategy.
Returns a list of indicator instances, already parameterized with this strategy's current settings, that the engine will auto-include before the backtest starts.
| Returns |
list[BaseIndicator]
The required indicator instances.
|