def check_future_gain(data, lookahead, threshold=0):
    """For each day, check 'lookahead' number of days in the future. If that
    day's open is 'threshold' % higher than the simulated current-time quote,
    give True; otherwise False (or NA if there is no data that far ahead).
    """
    gain = (data['adjOpen'].shift(-lookahead) - data['quote'])/data['quote']
    check = gain > threshold
    return check[~gain.isna()].astype('Int64')