US stocks end higher amid gains in financial shares