def get_price_history(data, date, starting_point, sid, benchmark):
    """
    Create a DataFrame containing the data for the necessary sids within that time frame
    """
    history_index = data.index.searchsorted(date)
    history_index_start = max([history_index - starting_point, 0])
    return data.iloc[history_index_start:history_index][[sid, benchmark]]
