In case you didn't notice, Elan (NYSE: ELN) is back. The biotech darling fell from investors' graces in 2008 after new cases of progressive multifocal leukoencephalopathy, a potentially deadly brain infection, cropped up in patients taking its multiple sclerosis drug Tysabri.

But shares doubled in 2011, and while they still haven't reached 2008 levels, the trajectory is impressive. The reasons for the meteoritic rise are twofold.

First, Elan has gotten its financial house in order. A couple of years ago, the company sold off half of its interest in its Alzheimer's disease drug bapineuzumab to Johnson & Johnson (NYSE: JNJ). The company only owned half the drug to begin with -- Pfizer (NYSE: PFE) owns the other half --leaving just a quarter interest in the drug, minimizing the potential returns. However, it still brought in enough to pay down a substantial portion of the company's debts.

Elan was able to secure more cash through the sale of Elan Drug Technology to Alkermes (Nasdaq: ALKS) this year. The biotech had previously tried to sell the unit that helps companies make extended-release versions of their drugs, but couldn't find a buyer. Spinning out the unit as a separate company was put on the table as an option, but a sale was really the best choice since it provided a quick infusion of cash.

As important as getting its financial situation in order, Elan and marketing partner Biogen Idec (Nasdaq: BIIB) have demonstrated that progressive multifocal leukoencephalopathy isn't a sales-killing side effect. Sales are up 28% year over year during the first nine months of the year.

And Elan and Biogen are working on a test to detect the virus that causes PML. Patients that don’t have the virus aren't as susceptible to acquiring PML after taking Tysabri. The risk-stratification strategy could reaccelerate sales of the drug.

Increased sales and getting its financial situation in order have allowed Elan to register positive earnings last quarter. And maybe that's the ultimate reason for the stock price gain this year. Despite some biotechs' attempts, you can't keep losing money indefinitely.

If you're looking for something a little less dependent on binary events for next year, check out the Fool's new free report, where Fool analysts report their top pick for 2012. Just click here to grab your free copy.