Skip to content

TripleRsiRotation


class backtide.strategies.TripleRsiRotation(short_period=5, medium_period=14, long_period=28, top_k=5, rebalance_interval=20)

Multi-timeframe Relative Strength Index portfolio rotation strategy.

Ranks assets by a composite score derived from long-term, medium-term, and short-term RSI values and periodically rotates the portfolio into the highest-scoring positions. The triple-time-frame approach helps distinguish strong multi-horizon momentum from single-period flukes. Useful for momentum rotation with multi-horizon confirmation.

Parameters

short_period : int, default=5

Short-term RSI period.

medium_period : int, default=14
Medium-term RSI period.

long_period : int, default=28
Long-term RSI period.

top_k : int, default=5
Number of top-ranked assets to hold.

rebalance_interval : int, default=20
Number of bars between rebalancing.

Attributes

name : str

Human-readable strategy name.

is_multi_asset : bool
Whether this is a multi-asset strategy.


See Also

MultiBollingerRotation

Multi-asset Bollinger Bands breakout rotation strategy.

RocRotation

Multi-asset portfolio rotation ranked by Rate of Change.

RsrsRotation

Multi-asset portfolio rotation ranked by Resistance Support Relative Strength.


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.


method description()

Short explanation of what the strategy does.

Returns

str

The description.



method evaluate(data, portfolio, state, indicators=None)

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, data["AAPL"]["close"] selects AAPL's visible close-price history.

portfolio : backtide.backtest.Portfolio
Current portfolio holdings (cash, positions and open orders). For example, portfolio.positions.get("AAPL", 0.0) returns the current signed quantity, while portfolio.orders contains pending orders.

state : backtide.backtest.State
Current simulation state. For example, use state.is_warmup to suppress orders during warmup and state.datetime to read the current bar's timezone-aware timestamp.

indicators : dict[str, dict[str, numpy.ndarray | pandas.DataFrame | polars.DataFrame]] | None
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.



method required_indicators()

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.