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: list[openbb_core.provider.abstract.data.Data]

The data to be used for the relative rotation calculations.

Optional: False


benchmark: str

The symbol to be used as the benchmark.

Optional: False


study: Literal['price', 'volume', 'volatility']

The data point for the calculations. If 'price', the closing price will be used.

Default: price

Optional: True


long_period: int

The length of the long period for momentum calculation, by default 252.

Default: 252

Optional: True


short_period: int

The length of the short period for momentum calculation, by default 21.

Default: 21

Optional: True


window: int

The length of window for the standard deviation calculation, by default 21.

Default: 21

Optional: True


trading_periods: int

The number of trading periods per year, for the standard deviation calculation, by default 252.

Default: 252

Optional: True


chart_params: dict[str, Any]

Additional parameters to pass when chart=True and the openbb-charting extension is installed.

Optional: True


Returns

results: list[RelativeRotationData]

Serializable results.


provider: None

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.