S&P 500 inches toward new high

Stocks gain as investors remain optimistic about the economy and corporate earnings.