The year had been shaping up as a good one for the discounters, with 99 Cents Only (NYSE:NDN), Dollar Tree (NASDAQ:DLTR), and Family Dollar (NYSE:FDO) rising 20% or more so far this year heading into the summer. And while the dog days of August took their toll and Dollar Tree's rivals began barking, turning those gains into year-to-date losses, the company continued to sprout growth and now boasts a 37% return year to date.

So with management announcing a big $500 million share buyback, it stands to reason that investors ought to ask themselves: Is Dollar Tree a good buy now?

A buyback program is often seen as a vote of confidence by management: Our shares are cheap now because they're going to be more expensive in the future. Each week, I scout out some of the biggest announcements and highlight companies that investors seem to endorse.

Share buybacks can be good, but they aren't always. When used to mask the effects of stock options, for example, the buyback merely serves to hide the dilution the generous granting of options causes. Another tactic often used by companies, and lately by Dollar Tree, is the accelerated share repurchase. So investors need to be wary.

Under an accelerated repurchase program, a company immediately buys back its shares from an investment bank, which borrows the shares it sells to the company. The institution then buys shares in the open market over time to close its borrowings. The company is able to retire those shares immediately, reducing its share count at a faster rate than if it's dragged out over the entire length of the buyback program, which may, in fact, get cancelled if business conditions change for the worst. The minimum and maximum amounts are set by a "collar."

Dollar Tree has recently entered accelerated repurchase programs with Goldman Sachs (NYSE:GS) and Merrill Lynch (NYSE:MER) to repurchase $150 million and $100 million, respectively.

The problem with such buybacks is that they can be deceptive. By retiring shares right away, a company gets an immediate earnings-per-share boost, but because the investment bank that sold the shares to the company is buying them back over time, the company ends up paying the investment bank the difference if the share price rises. A buyback program could end up costing more than if it had been conducted on the open market.

Dollar Tree has used a combination of accelerated share repurchases and open-market buys to complete most of its existing buyback program. The new share repurchase plan just announced will also include both forms of buybacks.

It just goes to show that when it comes to stock buybacks, they're not all created equally, and you might not always be getting shares for pennies on the dollar if you join in.

Related Foolishness:

Buying dollar bills at a discount is how Motley Fool Inside Value has been beating the market. You can get a 30-day trial subscription for even less -- no cost and risk-free!

Fool contributor Rich Duprey does not have a financial position in any of the stocks mentioned in this article. You can see his holdings here. The Motley Fool has a disclosure policy.