Boeing Co.  (BA - Get Report) , enjoying a year when everything has seemed to work out, caught another break last week: It sold two unclaimed aircraft to the Air Force.

The two 747-8s are sitting in the Mojave Desert in Victorville, Calif., at a facility that stores retired or otherwise unused aircraft. Boeing originally sold them to Transaero. But the Russian airline never claimed them. It stopped flying in 2015.

Boeing has searched for a buyer, while President Trump has sought an inexpensive way to replace the existing Air Force One presidential aircraft. These interests came together Friday, when the Air Force said it had reached agreement to buy the two planes from Boeing.

Some of the press coverage focused on an ironic coincidence: Trump's advocacy led to a deal involving Russia. But in fact, Russia has nothing to do with it. The airplanes were never delivered and never left the United States.

As for Boeing, this is a minor but still propitious event in 2017, a year that may one day be viewed as the company's best.

In 2013, Boeing shares hit $100 for the first time. In 2016, Boeing celebrated its 100th birthday. In June, shares hit $200 for the first time.

Boeing shares traded up 1.06% to $240.23 Monday and have risen 54% year to date. The next-best stock in the Dow Jones Industrial Average, Apple Inc. (AAPL - Get Report) , is up 36% and the Dow itself is up 12%.

It is worth noting that Boeing is the biggest U.S. exporter, accounting for 4% of all exported manufacturing goods.

Moreover, Boeing diplomacy seems to have turned the president into an ally.

In February 2016, Trump blasted Boeing for its plans to build a manufacturing plant in China, saying the company intended "to make all their planes in China." In December, Trump tweeted that costs for Boeing's planned Air Force One replacement were "out of control." He said the program should be cancelled.

By February, after two meetings with CEO Dennis Muilenberg, Trump was visiting Boeing's plant in North Charleston, S.C., for the rollout of Boeing's newest aircraft, the 787-10.

More of What's Trending on TheStreet:

As for the Air Force One deal, the price hasn't been disclosed.

"This deal is focused on providing a great value for the Air Force and the best price for the taxpayer," Boeing spokeswoman Caroline Hutcheson said Friday.

Aerospace consultant aerospace consultant Addison Schonland said, "Boeing can claim it saved the Air Force money because it can charge a lower price. But really this deal saves {Boeing} from having two white tails sitting in the desert wasting away."

While the list price for a 747-8 is around $380 million, nobody pays list for Airbus and Boeing airplanes and bigger buyers like the U.S. Air Force tend to get significant markdowns.

Aerospace consultant Scott Hamilton said, "At worst, Transaero's price was probably no more than $200 million each and maybe less." He said Boeing probably spent less than $150 million each to build the planes, and that it has taken a couple of billion dollars in write-offs on the 747 program.

"Transaero presumably did pay at least some {slight} progress payments toward the airplanes, {although} for all we know, the airline may have been in default on progress payments," Hamilton said.

At the same time, the cost of reconfiguring the aircraft for use as the presidential airplane will be high, obviously in the tens of millions of dollars or higher.

Still, Boeing, the Air Force and Trump can all claim victory.

And Russia can remain on the distant sidelines.

More of What's Trending on TheStreet:

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.