RollingWindowsEstimator#

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

Bases: object

Class for estimating parameters of rolling windows.

classmethod estimate_rolling_window_size(container: 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: 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