Copa Holdings (CPA 2.14%), operator of Latin American airline Copa Airlines, saw its stock crater in 2015 and 2016 as passenger demand fell due to deteriorating economic conditions in its key markets. But as the company's load factor -- a measure which incorporates elements of both supply and demand -- has improved dramatically, so has its stock price, which is now trading just below its two-year highs.

CPA Chart

CPA data by YCharts.

One of the most closely watched airline industry metrics, load factor measures the percentage of seats that are filled with paying passengers. It's calculated by dividing an airline's passenger traffic (aka revenue passenger miles -- the number of paying passengers flown one mile) by its capacity (aka available seat miles, or ASMs -- the number of available airline seats flown one mile, whether occupied or not). Here's a look at Copa's load factor over the past three years, as well as a few clues about what we can expect for the remainder of 2017.

Copa Holdings' load factor from Q1 2014 through Q1 2017

Data source: Copa Holdings. Chart by author.

Its strongest load factors since 2010

In general, higher load factors are an indicator of higher profitability, as an airline's fixed costs get spread across a larger number of passengers. Prior to the demand weakness Copa began experiencing in 2014, the airline was regularly posting load factors in the mid- to high-70% range. The company was able to mostly maintain those levels during the tough years of 2015 and 2016 by smartly diverting capacity away from low-demand routes to higher-demand routes.

However, now that the airline is seeing demand strengthen again throughout Latin America, Copa's load factor has risen above 80% for the three most recent quarters, and has also shown year-over-year improvement for five consecutive quarters.

Copa's May traffic results continued this trend. While traffic increased 11.8% year over year, the airline increased its capacity by just 6.3%, resulting in an 81.6% load factor -- 4 percentage points higher than last year. And on a year-to-date basis, Copa's traffic is up 11.5% so far in 2017, while the airline managed to increase capacity by just 5.1%, resulting in an 81.9% load factor -- 4.7 percentage points higher than the same period last year.

Judging solely by this metric, Copa is firing on all cylinders right now. The 84.2% load factor achieved in Q3 2016 was an all-time record for the company. And prior to that, you'd have to go all the way back to the first quarter of 2010 to find the last time Copa's load factor hit the 80% threshold.

Can Copa keep this up?

Copa's most recent guidance is for a full-year 2017 load factor of 81%. While that implies slightly lower load factors for the remainder of this year, it still represents a 0.6 percentage point increase over last year.

On its first-quarter earnings call, Copa said demand had continued to improve into Q2, and the company expects that trend to hold throughout 2017. With passenger demand growing steadily again, the other part of the load factor equation is Copa's capacity, which it continues to manage quite judiciously. Having lived through the extremely tough operating environment of the past couple years, Copa plans to stay prudent when it comes to expansion. CEO Pedro Heilbron said:

So the increasing capacity that we have guided to, it's all utilization, and it has less low-season cancellations. So it's not that we were adding that much flying during the high season versus what we had projected at the beginning of the year. We're just canceling less during the low season, and that's obviously a reflection of stronger demand patterns. We are planning to remain cautious this year. Even though Latin America has recuperated quite a bit, we're not going to go crazy with capacity, and we don't want to kind of overturn that improvement by just putting out too many ASMs out there.

The airline plans capacity growth of just 7% for 2017, well below the levels of passenger growth it is seeing this year. Copa's restraint in opening new routes should allow the airline to continue its path back to stronger operating margins, which it currently estimates will come in between 15% and 17% in 2017 -- a big improvement over last year's 12.4% operating margin.

With economies in its key markets continuing to show signs of strength, demand is finally returning in a big way for Copa. And with the airline having proven itself quite adept at keeping its planes filled, the company's load factor looks as if it will remain at these lofty levels at least through the end of the year. That's great news for investors who have stuck with the company through some difficult times and are now reaping the rewards.