Stocks fell hard on Thursday, with the Dow, Nasdaq, and S&P 500 all ending down for the day. And yet, even on a day like this, investors in one company are smiling -- and enjoying the sight of a stock ticker glowing green: CPA.

That's the ticker for Copa Holdings (NYSE:CPA), the holding company for Panama-based Copa Airlines, and it's up nearly 20% on the back of better-than-expected Q1 2019 earnings announced yesterday -- and an upgrade announced today.

Here's what you need to know.

Silhouette of an airplane with sun setting and clouds in the background

Image source: Getty Images.

Copa Holdings reports...

Copa Holdings' Q4 earnings report released back in February was not great. Sales declined 3% year over year, and the company lost money -- $3.67 per share -- as it was forced to lower prices to attract passengers, even as fuel costs soared. And you might think that the story with Copa's latest results would be similar.

Copa released its Q1 2019 earnings report last night, you see. And as happened last quarter, Q1 2019 saw a decline in revenue -- down 6% to $672 million, with revenue per available seat mile (RASM) falling 7.7% year over year.

Profits declined, too, down about a third to $2.11 per diluted share. But here we see two important caveats: First, Copa's profits were positive this time, as opposed to negative last quarter. And second, the $2.11 per share that Copa earned, although less than it earned in the year-ago quarter, was still much more than the $1.54 per share that analysts had expected. (Speaking of which, the $672 million in revenue Copa booked was also higher than Wall Street's estimated $659 million.)

Helping Copa to achieve these results, passenger traffic appeared to perk back up, growing 2.3% year over year, while fuel costs fell 3.5%, and total costs per available seat mile (CASM) declined 3.2%, helping to offset the drop in RASM.

Responding to the news, megabanker Citigroup came out with an upgrade for Copa Holdings, hiking the shares from neutral to buy with a $95 price target -- a factor that may have added to investors' enthusiasm over the earnings beat.

... and Copa comments on Boeing's 737

Perhaps as important are comments Copa released yesterday, regarding the status of Boeing aircraft in its fleet. I suspect that by now you're pretty familiar with this story, but just to briefly recap:

In October last year, and then again in March this year, two Boeing 737 MAX 8 airliners crashed shortly after takeoff, possibly due to complications involving the MCAS anti-stall system that they were equipped with. Designed to prevent stalls, MCAS appears to have malfunctioned and instead caused the planes to crash, resulting in worldwide groundings of both this airplane and its larger twin, the 737 MAX 9.

Being forbidden to fly the 737 while Boeing works on a fix for the problem did a real number on heavy users of MAX-family jets, such as American Airlines, for example, last quarter. Copa Airlines, where Boeing MAX 9 aircraft make up 6% of a fleet of 105 aircraft, was not unaffected. However, in contrast to other airlines that don't plan to return their MAX aircraft to flight schedules before August, Copa announced Wednesday that it will resume MAX 9 flights in July -- a bit of a surprise, which may now cause analysts to revise upward their earnings estimates for the company.

What it might mean to investors

In that regard, at last report, analysts on average were predicting continued declines in profits at Copa Holdings -- expected to fall 21% to $0.93 per share in Q2. Copa's announcement regarding the MAX's early return to service won't come soon enough to affect Q2 earnings (although the return to passenger growth might).

It could, however, cause Copa to raise guidance the next time earnings are released. Tune in again three months from now to find out.