The "dash to trash" market we've had this year is coming to an end, so don't be the last one out the door -- or the last one in.

Enterprising investors who took a chance on stocks the market was essentially leaving for dead in March, like Ford Motor (NYSE:F), Citigroup (NYSE:C), and Fifth Third Bancorp (NASDAQ:FITB), have been handsomely rewarded. At their lowest points, these companies traded for around $1, and though each of them has rallied largely on the belief that the worst is behind us, it does not mean they are ideal places for new money going forward.

In fact, lower-quality companies are the last place you want to be putting money right now; if you own one, now's the time to consider selling and bank your profits.

Whatcha gonna do with all that stuff?
Based on Standard & Poor's data that ranks domestic equities on earnings and dividend quality, it's apparent that the lower-quality stocks that have carried much of this rally are not only pricey but are also running out of steam.

Consider:

 

Grade "C" Stocks

Grade "A" Stocks

Returns, Jan. 1 through April 30

30%

(5.7%)

Returns, May 31 through July 27

9%

7.0%

Price-to-earnings ratio

50.6

16.0

Source: S&P data, as reported in The New York Times on Aug. 1, 2009.

The small-cap-tracking Russell 2000 index has returned more than 60% since March 9, but has been similarly buoyed by lower-quality companies. Indeed, it has been companies that had negative profits in 2008 that surged early and look quite expensive today.

 

Negative net income (2008)

Positive net income (2008)

Number of companies

732

1,277

Average returns, March 9 through May 9

128.9%

67.8%

Average returns, May 9 through Aug. 4

25.9%

12.9%

Price-to-book

3.6 times

2.5 times

Data provided by Capital IQ, a division of Standard & Poor's, as of Aug. 4, 2009.

As you can see from both tables, higher-quality companies have been closing the performance gap in the past few weeks. I'll give you one quality name to consider buying in a moment, but first here's more on that stock to sell today that I promised in the article's title.

Reading is fundamental-ly changing
Earlier this winter, Borders Group (NYSE:BGP) CEO Ron Marshall must have felt like Custer at Little Big Horn, surrounded on all sides by increasing competition, emerging technology, heavy debt, and a seismic shift in consumer behavior. Marshall was thrust into his current role in January, replacing outgoing CEO George Jones following an unacceptable 11.7% drop in holiday sales for the already struggling bookseller.

Unlike Custer, though, Marshall had some reinforcements -- in the form of activist hedge fund Pershing Capital Management, Borders' largest shareholder, which in February agreed to extend the terms of an already juicy loan agreement through April 15.

At first, the market remained unimpressed and sent Borders' shares as low as $0.39 per share on March 6. Then, on March 30, with the market showing signs of some improvement, Pershing agreed to a full-year extension of the previous agreement, but this time on even better terms -- that is, for Pershing, not Borders.

Since that new agreement was forged, Borders shares have surged 543% to almost $4.00 per share behind a more forgiving market, some massive inventory reductions, debt repayments, and cost-cutting. Needless to say, Pershing's made out pretty good on the new deal so far, but Borders isn't out of the woods yet.

While Borders has been trying to just stay a going concern, the bookselling business has changed dramatically, moving away from the bricks-and-mortar storefront and into the digital world. Right now, e-books only represent a fraction of total book sales, but are expected to move from $323 million in 2008 sales to $9 billion by 2013, according to the research firm In-Stat.

And competition in this burgeoning market is coming from some pretty big fish, namely e-book reading equipment offered by Amazon.com (NASDAQ:AMZN) and Sony, as well as its traditional competitor, Barnes & Noble, which is now offering a library of e-books for use on the Apple (NASDAQ:AAPL) iPhone and Research In Motion's (NASDAQ:RIMM) BlackBerry smartphone. With its still-frail financial health, it's unclear that Borders will be able to sustainably compete with these more efficient larger businesses.

The bottom line for investors remains whether Borders will be able to pay back Pershing's extended loan by next April. Pershing will likely continue to throw Borders a lifeline as long as the turnaround remains on track, but if this holiday season's sales are anything like last year's, it isn't a foregone conclusion. And without Pershing's support, Borders is in real trouble.

For my money, overreliance on an activist hedge fund is not a risk I'm willing to take. If you've enjoyed significant gains in Borders over the past few months, it is the one stock to sell today.

Foolish bottom line
This recent stock market rally has been largely fueled by lower-quality companies, especially in the small-cap arena. Borders is just one example of this phenomenon.  As investors once again turn their attention to quality companies, it pays to find those that are:

  • Small.
  • Underfollowed.
  • Financially strong.
  • Well-managed.
  • Dominant in their market niche.

That's why co-advisors Seth Jayson and Andy Cross use these very criteria to pick out stocks for Motley Fool Hidden Gems members. After all, it stands to reason that the best stocks of the next 10 years will also possess these traits.

One stock the team feels fits the profile is Brink's Home Security, provider of home security systems to more than 1.3 million customers. The recent spinoff from The Brink's Company has a strong balance sheet, positive free cash flow, and a high level of recurring revenue.

To learn more about the Hidden Gems portfolio, a free 30-day trial is yours. Simply click here to get started.

Already subscribe to Hidden Gems? Log in at the top of this page.

Fool analyst Todd Wenning hopes you're enjoying your summer. He has no financial interest in any stock mentioned. Apple and Amazon are Stock Advisor selections. The Fool owns shares of Brink's Home Security and has one wicked disclosure policy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.