def getlastmatched(strike_to_match, strikes, endix, epsilon=.01):
    """
    Return the index of the last item in a sorted list of
    strikes that matches strike_to_match. Search descending from endix
    in the list of strikes.
    A match is defined as a strike differing from strike_to_match
    by less than epsilon.
    Return -1 if no match is found.
    """
    while endix >= 0:
        if abs(strike_to_match - strikes[endix]) < epsilon:
            return endix
        if strikes[endix] < strike_to_match:
            return -1
        endix -= 1
    return -1