def lag distance
      distance.is_a?(Integer) && distance < 0 and
        raise IndexError, "Distance #{distance} cannot be negative"

      _shift(-distance)
    end
def lag distance
      distance.is_a?(Integer) && distance < 0 and
        raise IndexError, "Distance #{distance} cannot be negative"

      _shift(-distance)
    end
Shift all dates in the index to the past. The dates are shifted by the same
 amount as that specified in the offset.

 @param [Integer, Daru::DateOffset, Daru::Offsets::*] distance Integer or
   Daru::DateOffset. Distance by which each date should be shifted. Passing
   an offset object to #lag will offset each data point by the offset value.
   Passing a positive integer will offset each data point by the same offset
   that it was created with.
 @return [DateTimeIndex] A new lagged DateTimeIndex object.