By Rodrigo Campos

NEW YORK (Reuters) - A broad rally lifted the S&P 500 and Dow industrials to record highs on Tuesday, with a sharp rebound in crude prices boosting energy shares, while the Nasdaq turned positive for the year.

Cyclical sectors like technology, materials and energy posted the largest gains on the S&P, backed by the view that the U.S. economy, despite a slow start to the year, is on solid footing.

Cyclicals are seen taking the lead in stocks for the rest of the year after utilities, telecoms and consumer staples led the way in the first half.

"We believe earnings in the U.S. and GDP growth bottomed in the first quarter. If that is the case, stocks should continue on at least another 5-percent gain from here this year," said Paul Zemsky, chief investment officer, Multi-Asset Strategies and Solutions at Voya Investment Management in New York.

Earnings of S&P 500 companies are estimated to have fallen 5 percent in the second quarter, matching the drop in the first three months of the year, but a typical number of profit beats would leave the first quarter as the bottom of the earnings contraction.

Alcoa cemented those hopes for better earnings as its profit and sales both beat market expectations. The stock closed up 5.4 percent at $10.69, the highest in over two months.

The Dow Jones industrial average rose 120.74 points, or 0.66 percent, to 18,347.67; the S&P 500 gained 14.98 points, or 0.7 percent, to 2,152.14 and the Nasdaq Composite added 34.18 points, or 0.69 percent, to 5,022.82.

The S&P added to the record high set Monday and the Dow also set a new closing high. The Nasdaq closed at its highest since late December.

Energy was the best performing sector in the S&P Tuesday with a 2.25-percent advance on the back of nearly 5-percent gains in crude futures prices.

Behind the broad stocks' rally is also the expectation that central banks in most developed economies will continue to keep interest rates at rock bottom levels - if not negative - for the foreseeable future.

In the latest such development, a gloomy inflation assessment from the Japanese government was seen as adding pressure on the Bank of Japan to expand stimulus this month as it struggles to fend off deflationary risks.

"Policy is caught up if not ahead of economic reality," said Voya's Zemsky.

Among the 10 major S&P sectors, the traditionally defensive utilities, telecoms and consumer staples fell. The three indexes have posted double-digit percentage gains so far this year.

United Continental jumped 8.8 percent after saying its quarterly passenger unit revenue would drop less than expected. The outlook also boosted other airlines and an industry index rose 4.6 percent.

Hard-disk drive maker Seagate jumped 21.8 percent to $29.35 on strong preliminary results. Rival Western Digital rose 4.8 percent to 51.84.

Advancing issues outnumbered declining ones on the NYSE by a 2.38-to-1 ratio; on Nasdaq, a 2.59-to-1 ratio favored advancers.

The S&P 500 posted 72 new 52-week highs and one new low; the Nasdaq Composite recorded 176 new highs and 12 new lows.

About 7.6 billion shares changed hands in U.S. exchanges, below the 7.81 billion daily average over the past 20 sessions.

(Reporting by Rodrigo Campos, additional reporting by Caroline Valetkevitch; Editing by Nick Zieminski)