get_common_start_and_end

qf_lib.common.utils.dateutils.common_start_and_end.get_common_start_and_end(*containers: TimeIndexedContainer) Tuple[datetime, datetime][source]

Finds the first and last valid dates (with a value different than NaN) for each column and then returns the latest of starting dates and the soonest ending date.

If one of containers is dataframe then it is split into separate columns first.

Parameters:

containers – list of containers for which the common beginning and ending should be found

Returns:

(common_start, common_end) - (soonest date on which data for all series is already available, latest date on which data for all series is still available)

Return type:

Tuple[datetime, datetime]