'Given a dt, returns the previous close.
Parameters
dt: pd.Timestamp
The dt for which to get the previous close.
Returns
pd.Timestamp
The UTC timestamp of the previous close.'

def previous_close(self, dt):

    idx = previous_divider_idx(self.market_closes_nanos, dt.value)
    return pd.Timestamp(self.market_closes_nanos[idx], tz='UTC')
