New York – U.S. equities recouped $1 trillion of share value that was erased in the past seven weeks, as Federal Reserve Chairman Ben Bernanke pledged to preserve stimulus and stocks rallied on signs of economic expansion.

Thursday's 1.4 percent gain wiped out losses for the Standard & Poor's 500 index that had swelled to as much as 5.8 percent in the month after Bernanke raised the prospect of slowing bond purchases. Stocks rose in 10 of the past 12 days. Target Corp. and 131 other companies are trading at 52-week highs, almost three times the average at four S&P 500 peaks between 1990 and 2007, data compiled by Bloomberg show.

Investors who had been putting aside concern U.S. policymakers will reduce stimulus kept buying this week after Bernanke said "highly accommodative monetary policy for the foreseeable future is what's needed." While bears say the rally won't survive earnings reports that analysts estimate will be among the weakest in four years, bulls say an expanding economy ensures that future profits will rise and lift stocks.

"The realization is sinking in that the only way there is going to be a Fed tapering by the middle of next year is if there is consistent economic improvement," Michael James, a Los Angeles-based managing director of equity trading at Wedbush Securities Inc., said in a July 8 phone interview. "If there isn't, the Fed support is going to remain there. If there is a strengthening in the economy, the Fed will pull back. That is a net positive for stocks, not a net negative."

The S&P 500 advanced 1 percent on June 25 after durable-goods orders and home sales rose more than forecast and consumer confidence increased. That gain extended to the biggest three-day rally since January as unemployment claims declined and consumer spending rebounded. The index rose 1 percent after a July 5 report showed the U.S. added 195,000 jobs in June, more than the median forecast in a survey of 83 economists.

Stocks posted small gains on Friday. The S&P 500 rose 5.17 points, or 0.3 percent, to 1,680.19. The Dow closed up 3.38 points, just 0.02 percent, at 15,464.30. The Nasdaq composite edged up 21.78 points, or 0.6 percent, to 3,600.08. The Nasdaq is still well short of its record high of 5,048, set in March 2000.

"It's a little weird at this juncture to see that good news is good news," said Mark Luschini, chief investment strategist at Janney Montgomery Scott in Philadelphia. "If you take the Fed at face value, meaning the economy is expected to accelerate, and then you see data points that largely vindicate that, why should markets be spooked?"

Stocks tumbled 0.8 percent on May 22, when Bernanke said the Fed could "step down" the pace of its $85 billion monthly bond purchases in the next few meetings if the labor market continues to improve. They plunged 3.9 percent in the biggest two-day loss since November 2011 after the Federal Open Market Committee said June 19 that risks to the outlook for the economy and the labor market have diminished.

Gains in equities have come as bond yields jumped. While the rate on the benchmark 10-year Treasury note retreated for the last four days, it had climbed to 2.75 percent this week, the highest level since August 2011, Bloomberg data show.

Investors pulled money from stock and bond mutual funds as rates rose. Fixed-income managers lost $66.6 billion the last five weeks to withdrawals, while funds that invest in U.S. equities saw about $8.4 billion in outflows, according to the Investment Company Institute. Investors have pulled almost $400 billion from share funds and deposited more than $1 trillion with bonds since 2009.

"During the last four years, as the world worried and capital sought refuge in government bonds, high-yield bonds, real estate, timber, gold, art and any number of exotic and plain vanilla hedge funds, the economy went about healing," said Howard Ward, the chief investment officer at Rye, N.Y.-based Gamco Investors Inc. "You have to be in stocks."

The Associated Press contributed to this report.