U.S. stocks rise on earnings optimism, dollar gains

The S&P 500 stock index hit a four-month high on Tuesday, boosted by higher oil prices and expectations for strong earnings, while the U.S. dollar rose against the safe-haven Japanese yen as investors bought riskier assets.