U.S. stocks posted solid gains on Tuesday, led by energy companies. The Dow Jones industrial average rose 165.12 points, or 0.94 percent, to 17,721.53. The Standard & Poor's 500 index climbed 19.73 points, or 0.97 percent, to 2,061.72. The Nasdaq composite index increased 38.69 points, or 0.8 percent, to 4,872.09.