Investors came into Tuesday's trading session hoping to get some relief from the short-term declines that the stock market has suffered lately. Unfortunately, early gains proved short-lived, and several major market benchmarks moved back into negative territory amid ongoing concerns about the future of the U.S. economy. As of 1 p.m. ET, the Dow Jones Industrial Average (^DJI 0.56%) was down 277 points to 31,968. The S&P 500 (^GSPC -0.88%) dropped 19 points to 3,973, although the Nasdaq Composite (^IXIC -2.05%) managed to inch higher by 10 points to 11,634.

Even as markets sank, though, a couple of stocks posted extremely strong gains. Both Appian (APPN -0.89%) and Biohaven Pharmaceutical (BHVN -7.52%) moved sharply higher early Tuesday afternoon, and what spurred the boost was different from the run-of-the-mill reasons you typically see for stocks moving higher. Read on to see the details below.

Courtroom as seen from jury box.

Image source: Getty Images.

Appian gets a big win

Shares of Appian jumped 28% on Tuesday afternoon. The low-code software specialist has seen its stock take a big hit along with most of its peers in the software-as-a-service sector. However, some good news on the litigation front helped to cushion the blow for shareholders.

Appian had sued Pegasystems (PEGA -1.35%) in 2020 for damages related to alleged trade secret misappropriation. The lawsuit alleged that Pegasystems hired an employee of a government contractor with access to Appian's proprietary information and presented evidence that Pegasystems received trade secret information. As a result, Appian alleged, Pegasystems managed to improve its competitive position against it.

A jury in the Virginia state court case ruled in favor of Appian, awarding nearly $2.04 billion in damages and confirming that Pegasystems' behavior was willful and malicious. Pegasystems' shares plunged 24% following the announcement.

At this point, Pegasystems has the right to appeal the jury verdict, and it's likely that there will either be further litigation at the appellate level or that the two parties will reach a settlement for an amount less than the jury verdict granted. Nevertheless, the decision is a definite positive for Appian, and it confirms the value of the company's innovative platform.

Biohaven has a target on its back

Meanwhile, shares of Biohaven Pharmaceutical jumped more than 70%. The midsize drug company  got a buyout bid from an industry giant that will put a lot of cash in the pockets of shareholders.

Pfizer (PFE 2.40%) made a bid for Biohaven, offering a total of $11.6 billion in cash for the company. Under the terms of the deal, Pfizer will pay Biohaven shareholders $148.50 per share. In addition, current investors will also receive half a share of a new publicly traded entity that will keep Biohaven's developmental stage pipeline assets that aren't related to calcitonin gene-related peptides.

Biohaven hit the big time with its Nurtec migraine treatment, which has become the most prescribed treatment in its class in the U.S. market. Pfizer had previously worked with Biohaven to help commercialize Nurtec and another treatment outside the U.S., with a partnership that had involved Pfizer taking a 2.6% stake in Biohaven at an even higher valuation of $173 per share.

Many drugmakers have turned to acquisitions to further their growth, and Pfizer expects it will be able to pay for the deal with cash it has on hand. The move is good news for Biohaven, and it could trigger a lot more bargain hunting among potential acquirers, not just in healthcare but across the market.