def _get_calibration_hfc_start(
    series: Sequence[TimeSeries],
    horizon: int,
    output_chunk_shift: int,
    cal_length: Optional[int],
    cal_stride: int,
    start: Optional[Union[pd.Timestamp, int, Literal["end"]]],
    start_format: Literal["position", "value"],
) -> tuple[Optional[Union[int, pd.Timestamp]], Literal["position", "value"]]:
    """Find the calibration start point (CSP) (for historical forecasts on calibration set).

    - If `start=None`, the CSP is also `None` (all possible hfcs).
    - If `start="end"` (when calling `predict()`), returns the CSP as a positional index relative to the end of the
      series (<0).
    - Otherwise (when calling `historical_forecasts()`), the CSP is the start value (`start_format="value"`) or start
      position (`start_format="position"`) adjusted by the positions computed for the case above.

    If this function is called from `historical_forecasts`, the sanity checks guarantee the following:

    - `start` cannot be a `float`
    - when `start_format='value'`, all `series` have the same frequency
    """
    if start is None:
        return start, start_format

    cal_start_format: Literal["position", "value"]
    horizon_ocs = horizon + output_chunk_shift
    if cal_length is not None:
        # we only need `cal_length` forecasts with stride `cal_stride` before the `predict()` start point;
        # the last valid calibration forecast must start at least `horizon_ocs` before `predict()` start
        add_steps = math.ceil(horizon_ocs / cal_stride) - 1
        start_idx_rel = -cal_stride * (cal_length + add_steps)
        cal_start_format = "position"
    elif cal_stride > 1:
        # we need all forecasts with stride `cal_stride` before the `predict()` start point
        max_len_series = max(len(series_) for series_ in series)
        start_idx_rel = -cal_stride * math.ceil(max_len_series / cal_stride)
        cal_start_format = "position"
    else:
        # we need all possible forecasts with `cal_stride=1`
        start_idx_rel, cal_start_format = None, "value"

    if start == "end":
        # `predict()` is relative to the end
        return start_idx_rel, cal_start_format

    # `historical_forecasts()` is relative to `start`
    start_is_position = isinstance(start, (int, np.int64)) and (
        start_format == "position" or series[0]._has_datetime_index
    )
    cal_start_format = start_format
    if start_idx_rel is None:
        cal_start = start_idx_rel
    elif start_is_position:
        cal_start = start + start_idx_rel
        # if start switches sign, it would be relative to the end;
        # correct it to be positive (relative to beginning)
        if cal_start < 0 <= start:
            cal_start += math.ceil(abs(cal_start) / cal_stride) * cal_stride
    else:
        cal_start = start + start_idx_rel * series[0].freq
    return cal_start, cal_start_format
Find the calibration start point (CSP) (for historical forecasts on calibration set).

    - If `start=None`, the CSP is also `None` (all possible hfcs).
    - If `start="end"` (when calling `predict()`), returns the CSP as a positional index relative to the end of the
      series (<0).
    - Otherwise (when calling `historical_forecasts()`), the CSP is the start value (`start_format="value"`) or start
      position (`start_format="position"`) adjusted by the positions computed for the case above.

    If this function is called from `historical_forecasts`, the sanity checks guarantee the following:

    - `start` cannot be a `float`
    - when `start_format='value'`, all `series` have the same frequency
    
darts/models/forecasting/conformal_models.py