Generic drug companies, which have nipped at the heels and profit margins of Big Pharma companies for years, are starting to post some Big Pharma-like numbers.

Very ugly numbers.

Shares of most of the big generic companies are down this year, and we're not talking about a few percentage points. Declines of 20%, 30% or 40% are closer to the rule rather than the exception, according to a review by

TheStreet.com

of stock prices through Nov. 15. In fact, 15 of 17 companies' shares are down.

Companies swept up in this share-price misery include

Ivax

( IVX) (down 21%),

Andrx

( ADRX) (down 26%),

Mylan Laboratories

(MYL) - Get Report

(down 32%) and

Watson Pharmaceuticals

(WPI)

(down 38%).

Meanwhile, the oft-downtrodden Amex Pharmaceutical Index of 15 Big Pharma stocks is off 8% for the year, the Amex Biotechnology Index of 17 stocks is up 7.8% and the

S&P 500

is up 6%.

And if you think this year is bad, next year could be worse. One reason is that there aren't as many Big Pharma drugs losing patent protection, said Albert Rauch, a pharmaceutical industry analyst at A.G. Edwards.

Only $5 billion in brand-name drug revenue is up for patent-expiration grabs next year. "This is the first major decrease in patent expirations for branded drugs since 1998," Rauch wrote in a recent report to clients. "Since 2002, over $10 billion in branded drugs have expired each year. Therefore, we expect the performance of the generic drug group to be weak."

After the recent quarterly earnings season, many generic companies are looking weak to investors and analysts. Among companies with market capitalizations over $750 million, six produced quarterly earnings that fell below the Wall Street consensus forecast, three matched the consensus and seven exceeded the average estimates.

Even beating the Wall Street consensus wasn't an automatic indicator of success. For example,

Par Pharmaceuticals

( PRX) exceeded the average Wall Street estimate this quarter, but its stock is down 41% for the year.

Taro Pharmaceutical Industries

(TARO) - Get Report

was another consensus beater, but its stock has been beaten down 54%.

Despite the brutal performance, however, analysts say there's still money to be made in generic drug investing -- but investors must be selective and careful.

"We don't think the sky is falling," said Manoj Garg of American Technology Research. "The issues in the latest quarter are driven by pricing and a function of competition."

Like other analysts who follow the industry, Garg said the generic drug sector is essentially a commodity business. The key to corporate survival is a broad product line, an adaptable pricing policy, a pipeline of new products and an aggressive legal team to file patent challenges.

Despite various recent setbacks by high-profile companies, Garg said the generic industry can remain fundamentally strong in the U.S., given the aging population, the political climate in which legislators react to constituents' drug-price complaints and the continued pressure by managed care companies for cost containment.

Garg said

Teva Pharmaceutical Industries

(TEVA) - Get Report

, the world's largest generic drug company, is perhaps the best equipped to thrive even in a difficult economic environment. He noted that Teva introduced six products during the third quarter and 24 in the last year. He has a buy rating on Teva; he doesn't own shares, and his firm doesn't have an investment banking relationship.

Analysts polled by Thomson First Call have 14 buy ratings on Teva along with six hold ratings and two sell recommendations. But Teva isn't invincible, even though it beat the Thomson First Call consensus for the third quarter. Three months ago, it had 18 buy recommendations, four hold ratings and one sell rating. Its stock is down 4.5% for the year.

Seeking the Right Prescription

"Generic drug companies" is a misnomer; many analysts prefer to call them specialty pharmaceutical companies, because they do more than make copies of Big Pharma drugs that have lost patent protection.

Many make and sell proprietary products. Teva, for example, produces Copaxone for treating multiple sclerosis. Other companies use their technology to add value to existing drugs, such as turning a three-times-a-day pill into a once-a-day drug and getting some marketing exclusivity for their efforts.

Getting involved in brand-name drugs is risky and expensive for specialty drugmakers that lack the financial resources of Big Pharma companies, said Richard Watson, a pharmaceutical industry analyst at William Blair & Co. "It has to be done in a measured, focused way. You can't just throw money at the wall and see if it sticks," he said. "If you're not focused, it can be crippling financially and cause you to lose focus on generics."

Analysts say there is no precise mixture of generic, brand-name and reformulated drugs that will guarantee success for these companies. The formula for success, pardon the pun, is much more generic.

"Some companies manage their business in a forward-looking way, while some companies react to the marketplace," Watson said. "Some do a better job of managing wholesaler inventories and do a better job of managing pricing. Some have a diversified portfolio; some don't."

Teva is a good example of a forward-looking company, said Watson, who has a buy rating on the company. Ivax is an example of a reactive company, said Watson, who recently cut his rating on Ivax to market perform from outperform and issued a report entitled "Unpredictability Rears Its Ugly Head Again." (He doesn't own shares in either company; his firm doesn't have an investment banking relationship.)

Ivax's below-consensus performance for the third quarter caused a herd of analysts to downgrade the stock. Ivax now has two buy ratings, eight neutral recommendations and one sell rating, according to Thomson First Call. Three months ago, seven analysts said to buy the stock, four had hold ratings and one advocated selling it.

Another company losing Wall Street enthusiasm is Andrx, whose quarterly earnings per share fell well below consensus estimates and whose stock is down 26% for the year. Three months ago, the company enjoyed 10 hold recommendations, four neutral ratings and one sell recommendation, according to Thomson First Call. Now, there are four buys, nine holds and one sell.

"The company continues to indicate that there are problems with its manufacturing plants, which may postpone further approvals for extended release products until issues are solved," said Rauch of A.G. Edwards, in a recent report to clients.

He kept his hold rating, but he noted that Andrx has been riddled with production-related write-offs, underutilization and inefficiencies in manufacturing, pricing pressures for generic drugs and problems in penetrating markets with some brand-name drugs. (He doesn't own shares; his firm is a market maker.)

A Changing Environment

Like their Big Pharma brethren, generic drugmakers are affected by company-specific problems as well as industrywide issues. Andrx has its manufacturing difficulties; Ivax has been erratic; Mylan is occupied by a threatened proxy fight from investor Carl C. Icahn, who doesn't want Mylan to buy

King Pharmaceuticals

( KG).

Analysts also say the industry is being affected by across-the-board trends, such as more cutthroat pricing and the growth of brand-name companies' generic units. For example,

Pfizer's

(PFE) - Get Report

generic unit is making a copy of its epilepsy drug Neurontin while Pfizer spends time in court fighting generic companies' challenges to its patents. And

Forest Laboratories

(FRX)

recently announced that it would sell a low-price version of its antidepressant Celexa to blunt the impact of several generic competitors.

As the industry evolves, analysts expect the field to be divided into the "haves," like Teva, and the "have-nots" that can't match the product portfolios or management skills of the successful players. As a result, analysts expect more mergers and acquisitions.

"The pace of consolidation in the generic industry could pick up in the coming years, as it will be difficult for small- and medium-sized players with limited product offerings to gain significant share with the dozen or so large buyers that dominate the market," said Gregory B. Gilbert of Merrill Lynch in a recent report to clients. "While consolidation could in theory reduce competition in the industry, leading to a better pricing environment, we believe this may take several years to play out."