Stocks end with small gains

dow final
Click the chart for more stock market data.

Stocks ended slightly higher Wednesday afternoon. But they mostly erased earlier gains sparked by a batch of solid earnings reports and strong housing data.

After coming in close sight of another record high, the S&P 500 rose less than a point for the day. The Dow and the Nasdaq rose just a handful of points each.

Meanwhile, shares of some retailers moved significantly.

Barnes & Noble (BKS) shares jumped 4% after the troubled bookstore chain swung to a quarterly profit thanks to cost-cutting measures. The company also announced plans to introduce a new color Nook in early fiscal 2015.

But traders on StockTwits were not convinced that the Barnes & Noble shares will continue to rise.

"$BKS Revenues down significantly in all business units," said greglaw. "No position, but I can't see reasons for optimism...Bearish."

Shares for Abercrombie & Fitch (ANF) rose 11% after the teen clothing retailer announced a decline in revenue and profit that still managed to beat expectations

Tesla (TSLA) shares continued to zoom higher, hitting an all-time high of $265 Wednesday. Shares have kicked into overdrive since the electric car maker reported much stronger-than-expected earnings and strong sales guidance last week.

Investors have remained optimistic amid anticipation that CEO Elon Musk will soon officially announce plans to open a massive new lithium battery factory, dubbed the "Gigafactory."

But some traders think the stock has run too far too fast.

"Wait, so let me get this right? $TSLA is up 33% in a week since Musk hinted at Giga-factory? And People still think it goes higher?" asked SkepticalBull. "#STUPID."

"$TSLA People still factoring news?" asked AKEB. "This stock price is beyond news, just plain ridiculous."

Is the worst over for Target?
Is the worst over for Target?

Target (TGT) shares rose 7% even after the company blamed a data breach for a quarterly drop in revenue and profit.

"Did Elon Musk just joined the board of $TGT or something?" joked JFinDallas. "Keeps going and going...Bullish."

Anheuser-Busch InBev (BUD) shares gained ground after the brewer, which makes Budweiser and Stella Artois, reported better-than-expected fourth quarter results and outlined plans to boost sales during the upcoming FIFA World Cup in Brazil.

On the downside, BlackBerry (BBRY) shares pulled back after a 16% jump during the past two days. BlackBerry has lost a lot of ground in the competitive smartphone market over the past few years, but shares have rallied in 2014 as investors focus on its turnaround potential. The stock is up 40% so far this year, making it the biggest gainer in CNNMoney's Tech 30 Index.

Credit Suisse (CS) shares slipped after a Senate report released Tuesday outlined how the Swiss bank helped clients hide billions from the IRS. The bank's executives will appear before the Senate Wednesday.

Shares of First Solar (FSLR) fell 9% after reporting earnings that missed expectations.

Sturm Ruger (RGR) shares tumbled even after the gun company delivered strong gains in sales and profit due to the launch of new products. Shares of rival gun maker Smith & Wesson (SWHC) were also lower.

After the closing bell, J.C. Penney (JCP) shares rose as the retailer reported a narrower-than-expected loss for the fourth quarter. The company also said it expects same-store sales will rise between 3% and 5% during the current quarter.

Shares of Chinese search engine Baidu (BIDU) soared in extended trading after the company posted solid earnings and sales.

Related: Fear & Greed Index shows greed is back

In economic news, data on January sales of new homes came in stronger than expected, easing concerns of a slowdown in the housing market. Sales jumped almost 10% in January to the highest level since July 2008.

European markets finished the day with small losses. The FTSE 100 in London was declining by roughly 0.5%.

Asian markets ended with mixed results -- the main indexes in Australia and Japan moved slightly lower while other markets posted gains.

Related: CNNMoney's Tech 30

The yuan has been dropping in recent days, shaking confidence in the typically robust Chinese currency.

The price of Bitcoin continued to slide following the shutdown Monday of Mt. Gox, which used to be the dominant exchange for the digital currency.

CNNMoney Sponsors