Stocks rise on Wall Street, heading for three-day rally