The Dow Jones Industrials (^DJI 0.44%) closed the week on a high note, rising 123 points Friday, and regaining most of the ground the Dow lost on Thursday. Investors decided that they had overreacted to news that a commercial airliner was shot down over Ukraine, and even though geopolitical risk remains in the forefront, favorable earnings and encouraging economic conditions continue to buoy the stock market higher. Moreover, Merck (MRK -0.09%) and Johnson & Johnson (JNJ 0.01%) both had good gains today, as investors look to the pharmaceutical sector as a potential growth industry despite its reputation as a solid income-producing business.

Source: Johnson & Johnson.

Johnson & Johnson's gains of nearly 1.5% led the Dow higher. Johnson & Johnson has a wide range of businesses, including its consumer over-the-counter products and its medical device unit; but pharmaceuticals have been its largest source of growth in recent years, and is now the largest segment under J&J's corporate umbrella. Even as Johnson & Johnson has to worry about the loss of patent protection on some of its older treatments, newer drugs, like psoriasis-fighter Stelara and anti-coagulant Xarelto, have picked up the slack with extraordinary sales growth recently.

Source: Merck.

Merck also rose, picking up 1.25%. Unlike Johnson & Johnson, Merck has been more active in focusing on pharmaceuticals, selling its consumer unit to Bayer for $14 billion, and contemplating other strategic moves to target greater growth in its pharma segment. With ample cash on hand, Merck can look at making acquisitions of its own, potentially boosting its pipeline prospects without the uncertainty of developing new drugs from scratch.

Yet, the overarching factor that's likely behind gains in Johnson & Johnson and Merck is rival Abbvie and news today of its acquisition of Shire. A rash of proposed deals in the pharmaceutical space have centered on the desirability for U.S. companies of finding large acquisition targets overseas in areas with more favorable corporate taxation. Finding a target large enough to make a successful tax inversion possible would be a big challenge for Merck or Johnson & Johnson, and the potential political fallout could be devastating to the Dow components. Nevertheless, with billions in taxes at stake, you can expect the trend toward tax-inversion transactions to continue.

Pharmaceutical companies, both within the Dow Jones Industrials and outside the Dow, are finally starting to grow again after dealing in some cases with devastating patent-cliff issues. As long as big pharma stocks don't overpay for acquisitions in an environment in which Fed Chair Janet Yellen specifically called out biotech stocks as having stretched valuations, the prospects for Merck, Johnson & Johnson, and other major pharma companies continue to look favorable.