def corr_shift(x, y, x_shift=0, y_shift=0):
    """compute the correlation with shift

    Args:
        x (series): first series
        y (series): second series
        x_shift (int, optional): shift of first series. Defaults to 0.
        y_shift (int, optional): shift of second series. Defaults to 0.

    Returns:
        float: correlation
    """
    return x.shift(x_shift).corr(y.shift(y_shift))