By Caroline Valetkevitch
NEW YORK (Reuters) - The S&P 500 closed at a record on Thursday and ended in positive territory for the year after Federal Reserve Chair Janet Yellen said harsh weather seems to be to behind recent U.S. economic softness.
That gave some relief to investors who supported the view that heavy snowstorms and unusually cold weather - and not worsening fundamentals - were to blame for weak U.S. employment, retail sales and other data.
The advance lifted the S&P 500 above its 2013 year-end closing level of 1,848.36, which has served as resistance in recent sessions.
"The market was worried. She could have excluded weather and perhaps talked more about the soft patch," said Quincy Krosby, market strategist at Prudential Financial, which is based in Newark, New Jersey.
"I think she gave the market some comfort that she thought it was probably mostly due to weather-related issues."
Testifying before the Senate Banking Committee, Yellen also said the Fed would watch carefully to make sure weather was indeed behind the recent weakness. But she said it would take a "significant change" to the economy's prospects for the central bank to put plans to reduce its bond-buying program on hold.
Some retailers scored sharp gains for a third session, with the shares of J.C. Penney Co Inc
Mylan Inc
The Dow Jones industrial average <.DJI> rose 74.24 points or 0.46 percent, to end at 16,272.65. The S&P 500 <.SPX> gained 9.13 points or 0.49 percent, to finish at 1,854.29, surpassing its previous record closing high set on January 15.
The Nasdaq Composite <.IXIC> added 26.869 points or 0.63 percent, to close at 4,318.933.
For the year, the S&P 500 index is now up 0.3 percent.
After the bell, Gap Inc
During the regular session, J.C. Penney shares surged 25.3 percent to $7.47, a day after the U.S. department store chain forecast more improvement in its comparable sales and gross profit margin this fiscal year.
The S&P retail index <.SPXRT> has climbed 4.2 percent for the week so far, including its slim gain of 0.1 percent on Thursday.
Among other retailers, Best Buy Co Inc
Sears Holding Corp
The day's economic data added to the positive tone, with orders for long-lasting U.S. manufactured goods excluding transportation, or durable goods excluding transportation, and a gauge of business spending unexpectedly rising in January.
About 6.5 billion shares changed hands on U.S. exchanges, below the 7 billion average so far this month, according to data from BATS Global Markets.
Advancers beat decliners on the New York Stock Exchange by a ratio of 2 to 1. On the Nasdaq, 17 stocks rose for every nine that fell.
(Editing by Jan Paschal)