Skip to main content

relative_rotation

Calculate the Relative Strength Ratio and Relative Strength Momentum for a group of symbols against a benchmark.

Parameters

data: ForwardRef('Data') | ForwardRef('DataFrame') | ForwardRef('Series') | ForwardRef('ndarray') | dict | list
benchmark: str
study: Literal['price', 'volume', 'volatility']
Default: price
long_period: int | None
Default: 252
short_period: int | None
Default: 21
window: int | None
Default: 21
trading_periods: int | None
Default: 252
chart_params: dict[str, Any] | None
chart: bool
Default: False


Returns

results: RelativeRotationData

Serializable results.

provider: str

Provider name.

warnings: Optional[list[Warning_]]

list of warnings.

chart: Optional[Chart]

Chart object.

extra: dict[str, Any]

Extra info.


Data

symbols: list[str]
The symbols that are being compared against the benchmark.

benchmark: str
The benchmark symbol, as entered by the user.

study: Literal['price', 'volume', 'volatility']
The data point for the study, as entered by the user.

long_period: int
The length of the long period for momentum calculation, as entered by the user.

short_period: int
The length of the short period for momentum calculation, as entered by the user.

window: int
The length of window for the standard deviation calculation, as entered by the user.

trading_periods: int
The number of trading periods per year, for the standard deviation calculation, as entered by the user.

start_date: str
The start date of the data after adjusting the length of the data for the calculations.

end_date: str
The end date of the data.

symbols_data: list[Data]
The data representing the selected 'study' for each symbol.

benchmark_data: list[Data]
The data representing the selected 'study' for the benchmark.

rs_ratios: list[Data]
The normalized relative strength ratios data.

rs_momentum: list[Data]
The normalized relative strength momentum data.