RollingWindowsEstimator

class qf_lib.common.utils.factorization.data_models.rolling_window_estimation.RollingWindowsEstimator[source]

Bases: object

Class for estimating parameters of rolling windows.

Methods:

estimate_rolling_window_size(container)

Estimates the size of the rolling window based on the number of samples.

estimate_rolling_window_step(container)

Estimates the step of the rolling window based on the number of samples.

classmethod estimate_rolling_window_size(container: Union[QFDataFrame, QFSeries]) int[source]

Estimates the size of the rolling window based on the number of samples.

Parameters:

container – container with data analysed using rolling window

Returns:

the calculated size of the rolling window

Return type:

window_size

classmethod estimate_rolling_window_step(container: Union[QFDataFrame, QFSeries]) int[source]

Estimates the step of the rolling window based on the number of samples.

Parameters:

container – container with data analysed using rolling window

Returns:

the calculated step (shift) of the rolling window

Return type:

window_step