def as_currency(amount, pos=None):
    """Returns a string that is 'amount' formatted as a currency.  Negative values
    are formatted with parens surrounding them.
    """
    if amount >= 0:
        return '${:,.0f}'.format(amount)
    else:
        return '(${:,.0f})'.format(-amount)