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 that the market was essentially leaving for dead in March, like Bank of America (NYSE:BAC), Motorola (NYSE:MOT), and Genworth Financial (NYSE:GNW), have been handsomely rewarded. At their lowest points, Genworth Financial traded for less than $1, while Bank of America and Motorola traded for less than $3. And though each of them has rallied, largely on the belief that the worst is behind us, that doesn't mean they're 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 banking your profits.

Whatcha gonna do with all that stuff?
The small-cap-tracking Russell 2000 index has returned more than 75% since March 9, but has been buoyed by lower-quality companies. Indeed, companies that had negative profits in 2008 surged early; they look quite expensive today.

 Metric

Negative net income (2008)

Positive net income (2008)

Number of companies

718

1,258

Average returns, March 9 - May 9

127.9%

63.2%

Average returns, May 9 - Sept. 18

44.2%

20.4%

Price-to-book

5.2 times

2.5 times

Data provided by Capital IQ (a division of Standard & Poor's) as of Sept. 21, 2009.

As you can see, higher-quality companies have not only started catching up with lower-quality companies over the past few months, but are still much cheaper as a group. 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 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. Activist hedge fund Pershing Capital Management, Borders' largest shareholder, in February agreed to extend the terms of an already juicy loan agreement through April 15.

At first, the market remained unimpressed, sending Borders' shares as low as $0.39 per share on March 6. Then, on March 30, with the market showing signs of 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 more than 400%, to $3.25 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 just to remain 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 represent only 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 and Sony (NYSE:SNE), as well as bricks-and-mortar competitors like Barnes & Noble, Wal-Mart (NYSE:WMT), and Costco Wholesale (NASDAQ:COST).

Even Google (NASDAQ:GOOG) is in the game, having digitally scanned more than 7 million books, which it could bring to market depending on the court's approval of a pending settlement with the Authors Guild. In any case, 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 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, that aid 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 could be 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 businesses 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 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 Holdings, the provider of home security systems (recently rebranded "Broadview Security") to more than 1.3 million customers. The recent spinoff from Brink's 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 had a great summer. He has no financial interest in any stock mentioned. Costco and Amazon are Motley Fool Stock Advisor selections. Google is a Rule Breakers recommendation. Costco and Wal-Mart are Inside Value recommendations. The Fool owns shares of Brink's Home Security Holdings and Costco and has one wicked disclosure policy.