def _select_long_short_ports(df, portvar, top_minus_bot=True):
    """
    Finds the appropriate portfolio number and returns (long number, short number)
    """
    #Get numbered value of highest and lowest portfolio
    top = max(df[portvar])
    bot = min(df[portvar])

    if top_minus_bot:
        return top, bot
    else:
        return bot, top