Delta Air Lines (DAL -0.13%) is feeling a lot more optimistic about the future than it was three months ago, and investors are rallying in.

Shares of Delta are up 13% as of 11 a.m. ET after the company reported better-than-expected earnings and reinstated guidance for the year.

A Delta jet on the tarmac.

Image source: Delta Air Lines.

Greater clarity, strong forecast

It is not an easy time to be an airline executive. Higher interest rates and uncertainty about the consumer caused Delta to withdraw full-year guidance in April, raising questions about the all-important summer vacation season.

Three months later, Delta is feeling much stronger about the quarters to come. The company earned $2.10 per share in its second quarter on revenue of $16.6 billion, easily topping expectations. And it reinstated guidance, projecting a full-year adjusted profit of $5.25 to $6.25 per share.

Wall Street had expected a profit of $5.35 per share for the year.

"As we look to the second half of our centennial year, we remain focused on executing our strategic priorities and managing the levers within our control to deliver strong earnings and cash flow," CEO Ed Bastian said in a statement. "Reflecting our confidence in the business, we are restoring financial guidance."

Is Delta stock a buy?

Delta is also forecasting full-year free cash flow of $3 billion to $4 billion, reflecting the overall strength of the operation.

Airlines are notoriously cyclical stocks, heavily influenced by the health of the overall economy. When times are tough, households tend to avoid spending on travel in favor of making sure the bills are paid. But Delta's booking trends indicate strength into the fall.

Even with Thursday's rally, Delta shares are still down slightly for the year. Given the outlook, this airline stock can continue to gain altitude from here.