Hawaiian Holdings (NASDAQ:HA) shares had a poor 2017, losing 30% of their value during the year. This came despite the fact that the company achieved record adjusted earnings per share of $5.64 last year.

This stock market wipeout was sparked by investor concerns that rising competition -- primarily from United Continental (NASDAQ:UAL) and Southwest Airlines (NYSE:LUV) -- would lead to sharp margin erosion for Hawaiian. However, the company's fourth-quarter results provided more evidence that investors are overestimating the threat from United and Southwest.

Unit revenue is still marching higher

Three months ago, Hawaiian Holdings projected that revenue per available seat mile (RASM) would probably be in a range of down 1% to up 2% during the fourth quarter. However, the company raised its revenue guidance twice during the quarter.

Ultimately, Hawaiian reported that RASM rose 3.3% year over year in the fourth quarter, driven by strong trends in international markets and rising non-ticket revenue. Notably, competitive capacity grew 5% on mainland-Hawaii routes, but unit revenue was still up solidly in those markets.

A Hawaiian Airlines plane flying over the ocean, with mountains in the background

Hawaiian Holdings' unit revenue is growing despite rising competition. Image source: Hawaiian Airlines.

Looking ahead to the first quarter, the competitive capacity headwinds are becoming much more severe. (United Airlines added a slew of additional flights to Hawaii starting on December 20.) Hawaiian Airlines is set to face competitive capacity growth of about 14% this quarter. Even with this significant headwind, management expects unit revenue to continue rising. The company's first-quarter RASM forecast calls for 1% growth at the midpoint.

Costs surged last quarter -- but the outlook is impressive

Despite posting a 3.3% RASM increase last quarter, Hawaiian Holdings' adjusted EPS declined to $1.10 from $1.28 a year earlier. The company's economic fuel cost increased by $0.33/gallon compared to the prior year, while adjusted non-fuel unit costs surged 6.9% year over year.

The increase in fuel costs stems from the recent upward move in oil prices. Meanwhile, non-fuel unit costs were under pressure throughout 2017 due to a big one-time increase in pilot wages, as well as the impact of removing seats from Hawaiian's A330 fleet in order to install lie-flat first-class seats. Additionally, Hawaiian accelerated some spending from 2018 into 2017 to take advantage of the recent reduction in the corporate tax rate.

Looking ahead, the cost outlook is much more favorable. While labor costs are still rising, the increases will be much more manageable in 2018. Furthermore, the headwind from the A330 seating project will diminish as the year progresses.

As a result, while adjusted non-fuel unit costs will probably rise 3.5% to 6.5% in the first quarter, Hawaiian's full-year guidance implies that non-fuel unit costs would be roughly flat for the rest of 2018. This forecast represents a big improvement relative to the guidance Hawaiian Holdings had provided just last month.

This stock is massively undervalued

As of Monday, Wall Street analysts expected Hawaiian's EPS to crash in the first quarter, falling to $0.57 from $1.04 a year earlier. But while the company's unit cost increases will significantly outpace any unit revenue gains this quarter, its guidance implies that it will beat the analyst estimates by a comfortable margin.

Unit revenue pressure is likely to remain elevated on mainland-Hawaii routes during the second quarter. That said, Hawaiian's RASM momentum on international routes and favorable conditions in the interisland market should keep unit revenue stable. In the second half of 2018, unit revenue trends on mainland routes may start to improve, particularly because Southwest Airlines is unlikely to launch its Hawaii service until the very end of the year, at the earliest.

Additionally, while fuel cost pressure may continue throughout 2018, non-fuel unit costs won't be a headwind after the first quarter. This means any pre-tax margin declines are likely to be modest. The benefit of tax reform -- which will slash Hawaiian's tax rate by more than 10 percentage points -- will then allow the company to return to EPS growth (mainly in the back half of the year).

With Hawaiian Holdings on track for further EPS growth this year despite an uptick in oil prices and higher competition, the stock looks like a bargain at less than seven times earnings. Indeed, the carrier's resilience in the face of United's expansion during 2018 should give long-term investors confidence that Southwest's 2019 Hawaii expansion won't hurt much, either. As a result, Hawaiian Holdings stock remains one of my largest investments.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.