The S&P 500 was trading flat on Tuesday, handing back some gains from a strong rally in the previous session, as investors digested a mixed set of quarterly results from retailers including Home Depot and Walmart.