AP Markets Writer
NEW YORK (AP) -- Materials and energy companies led the stock market higher Tuesday, sending the Dow Jones industrial average to its second all-time high in a week.
The Dow closed at 14,673.46, a gain of 59.98 points, or 0.4 percent. The Standard & Poor's 500 index also rose 0.4 percent, closing less than two points below its own all-time high set April 2.
The prices of metals like copper, gold and silver have rebounded this week after slumping for the first three months of the year on waning demand. Oil is also rising following a sharp decline last week.
"You're seeing some pretty decent action in the overall market, with today's leadership coming from the basic materials sector," said Robert Pavlik, chief market strategist at Banyan Partners. "It's an area of the market that does represent some value because it's underperformed."
The rise in basic materials such as precious metals was caused by a weakening of the dollar against other currencies, HSBC analyst Howard Wen said. Commodities are typically priced in dollars and a decline in the currency allows overseas buyers to purchase materials at lower prices.
Materials companies were the biggest gainers of the 10 industry groups in the S&P 500, rising 1.1 percent. Energy companies posted the second best return, increasing 0.8 percent. Those two groups have been among the weakest in the market this year.
On Tuesday the S&P 500 rose 5.54 points to 1,568.61. The index closed at a record high of 1,570.25 on April 2. The Nasdaq composite gained 15.61 points, or 0.5 percent, to 3,237.86.
The gains suggested that the Dow and S&P 500 may be poised to break out of a trading pattern they've followed for the last three weeks.
Stocks have mostly moved sideways since the middle of March. The Dow has alternated between small gains and losses after starting the year on a tear. Signs of slowing growth and concerns about the outlook for Europe had checked investors' confidence.
As companies report results this week, investors will be looking to see whether they are feeling any impact from government spending cuts that kicked in recently, said Jim Russell, investment director at U.S. Bank. They will also want to know what effect there will might from the ongoing debt crisis in Europe.
"The market is looking for companies to fill in those blanks," said Russell.
Alcoa, traditionally the first company in the Dow to report results, was flat at $8.39 after the company posted its earnings late Monday. Online auto retailer CarMax, home goods retailer Bed Bath & Beyond and the banks Wells Fargo and JPMorgan Chase report later this week.
On Tuesday, Cliff's Natural Resources, an iron ore mining company, rose $1.66, or 8.8 percent, to $20.45. The company's stock is still down 47 percent this year. Freeport-McMoRan Copper & Gold, another mining company, was up $1.34, or 4.1 percent, at $33.76.
First Solar soared after the solar panel maker issued a better-than-expected forecast for its 2013 results and solid predictions for the following two years, helped by continued growth in shipments. The stock price rose $12.31, or 46 percent, to $39.35.
Small company stocks lagged the market. The Russell 2000 index two points, or 0.2 percent, to 929.34. The index has slumped this month after rising 12 percent in the first quarter and performing better than both the Dow and S&P 500.
While stocks are struggling to extend their gains from the start of the year, bonds have rallied.
The yield on the 10-year Treasury note was unchanged at 1.75 percent Tuesday. However, the benchmark rate has fallen from a high of 2.06 percent reached March 11 as demand for low-risk assets increases.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.