U.S. stocks closed sharply higher on Thursday as the tech-heavy Nasdaq Composite led all three benchmarks to their highest levels in six weeks. Strong earnings from S&P 500 companies — particularly heavy-hitting tech stocks like Netflix Inc. NFLX, +3.44% and Tesla Inc. TSLA, +9.78% — have helped to bolster sentiment, prompting wary investors to jump back into the market en masse, market strategists said. The Dow Jones Industrial Average DJIA, +0.51% gained 162.06 points, or 0.5%, to 32,036.90. The Nasdaq Composite COMP, +1.36% closed 161.96 points, or 1.4%, higher at 12,059.61. The S&P 500 SPX, +0.99% climbed 39.05 points, or 1%, to 3,998.95. For the Nasdaq, Thursday marked the first time since late May that the index advanced by 1% or more for three consecutive sessions.