def _adjust_start(rel_start, stride):
    """If relative start position `rel_start` is negative, then adjust it to the first non-negative index that lies a
    round-multiple of `stride` ahead of `rel_start`
    """
    if rel_start >= 0:
        start_idx = rel_start
    else:
        # if `start` lies before the start time of `series` -> check if there is a valid start point in
        # `series` that is a round-multiple of `stride` ahead of `start`
        start_idx = (
            rel_start
            + (abs(rel_start) // stride + int(abs(rel_start) % stride > 0)) * stride
        )
    return start_idx
If relative start position `rel_start` is negative, then adjust it to the first non-negative index that lies a
    round-multiple of `stride` ahead of `rel_start`
    
darts/utils/historical_forecasts/utils.py