NEW YORK (TheStreet) -- Stocks had closing highs in sight by the final hour of trading Thursday as Wall Street was feeling optimistic as the dollar weakened, Treasury yields stabilized and tech and materials stocks rallied.

The S&P 500 was up 1% to 2,119, above a record closing level of 2,117 on April 24. The Nasdaq climbed 1.3%. The Dow Jones Industrial Average added 1%, situating it around 40 points off its intraday high. 

High-momentum tech stocks including Apple (AAPL), Microsoft (MSFT) and Amazon (AMZN) rose, while the Technology SPDR ETF (XLK) added 1.5%.

Materials stocks gained as crude oil stabilized around $60 a barrel. BHP Billiton (BHP), Rio Tinto (RIO), and Vale SA (VALE) were each higher. The Materials Select Sector SPDR ETF (XLB) gained 1%.

The U.S. dollar fell 0.24% against the euro, 0.1% against the British pound, and 0.33% against the Swiss franc. The greenback hit 11-year highs earlier this year which proved troublesome for many multinationals' top-lines during the first quarter.

U.S. Treasury yields stabilized on Thursday, falling back from five-month highs seen earlier this week. The yield on the 10-year Treasury fell to 2.24%.

"We have dollar weakness today. That continues to hold the key," Peter Cardillo, chief market economist at Rockwell Global Capital, told CNBC. "There is complacency in the bond market and that's helping to ease that fear of yields climbing."

Weekly jobless claims remained at a 15-year low, indicative of a tightening labor market. The number of people applying for unemployment benefits in the week ended May 9 fell 1,000 to 264,000. Economists had expected claims to rise to 275,000.

The four-week moving average fell to 272,000, its lowest level since April 2000, said Cheng Chen, TD Securities' U.S. strategist.

"It suggests that claims remain on a broadly improving trajectory, and we expect the positive tone for labor market momentum over the coming months to be sustained," he said.

U.S. producer prices fell for the seventh time in nine months in April, down 0.4%, as lower gas and food costs continued to cause headwinds for the economy. Economists had expected no change after a 0.2% increase in March.

Trading in Avon Products (AVP) resumed following a bizarre hoax in which the company received a bid from PTG Capital Partners nearly triple Wednesday's closing price. Avon said it cannot confirm the offer nor whether PTG even exists.

JPMorgan (JPM) shares were on watch after announcing it will purchase the mortgage servicing rights for 266,000 high-quality Fannie Mae (FNMA) loans. The loans, worth an estimated $45 billion, will be purchased from a subsidiary of Ocwen Financial (OCN). Click here for more.

Cisco (CSCO) shares slipped 1% despite a quarterly earnings beat. The tech giant reported earnings of 54 cents a share, just edging out estimates of 53 cents. Revenue rose 5.1% to $12.1 billion, slightly better than estimates of $12.07 billion. Click here for more.

Shake Shack (SHAK) reported its first quarterly results since going public. The burger chain earned 4 cents a share, better than an estimated loss of 3 cents, while revenue jumped 56.3% from a year earlier.

J.C. Penney (JCP) was lower despite reporting a loss of 55 cents a share, far narrower than estimates of a loss of 77 cents. Revenue climbed 2% to $2.857 billion. Click here for more.

Kohl's (KSS) fell more than 12% after sales missed estimates. The retail chain reported revenue of $4.12 billion, up 1.2% from a year earlier, though revenue fell short of estimates by $70 million. Comparable-store sales rose 1.4% in its fiscal first quarter.

More from Markets

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%