US stocks closed slightly higher

US stocks closed slightly higher after trading within a narrow range Tuesday after Federal Reserve Chairwoman Janet Yellen cautioned that the UK leaving the European Union posed a risk while new polls showed support for the "stay" camp growing.

    The S&P 500 SPX, +0.27% rose 5.65 points, or 0.3%, to close at 2,088.90. The Dow Jones Industrial Average DJIA, +0.14% advanced 24.86 points, or 0.1%, to close at 17,829.73. 

    Meanwhile, the Nasdaq Composite Index COMP, +0.14% declined 6.55 points, or 0.1%, to finish at 4,843.76.