Stocks waffled but held much of their gains after President Donald Trump delivered an inaugural speech.