Boeing Co. shares reached an all-time high as the 787 Dreamliner emerged from a decade of losses to help the company post rising profit and weather a turbulent market for wide-body jetliners. The world’s largest planemaker is counting on the marquee carbon-fiber jet and higher output of its single-aisle 737, a workhorse with discount airlines, to bolster results this year. Boeing forecast higher cash and earnings on Wednesday, while predicting a sales decline as it makes fewer 777 wide-body aircraft. Investors, focused on Boeing’s potential cash bounty, responded favorably. The stock was the top performer among the 30 members of the Dow Jones Industrial Average as the index climbed past 20,000 for the first time. The shares rose 3.3 percent to $165.79 at 10:20 a.m. in New York. The quarter’s results also were a relief compared with last year, when the company caught investors off-guard with a forecast of fewer 737 deliveries. “We think this release is pretty boring—and boring is good,” Robert Stallard, an analyst with Vertical Research Partners, said in a report to clients. Boeing has pledged to return all of its cash flow to investors, repurchasing shares and bolstering its dividend as a near-record order backlog shelters the manufacturer from market shocks. The Chicago-based company is counting on improving Dreamliner profitability, resurgent defense spending and a new family of 737 narrow-body jets to counteract rising trade tensions with China and a glut of older twin-aisle planes. Boeing’s record share price also reflects a stock buyback binge last year, as the company repurchased 7 percent of its shares, said George Ferguson, an analyst with Bloomberg Intelligence. While the manufacturer generated $10.5 billion in cash from operations, it spent $7 billion on stock, $4.6 billion on research, $2.8 billion on dividends and $2.6 billion on property, plants and equipment. “They can’t keep spending this way and not continue to dwindle cash balances,” Ferguson said. Revenue Forecast Still, revenue will fall to a range of $90.5 billion to $92.5 billion this year, Boeing said, as the company slows production of the 777 this month and in the third quarter because of an order shortfall. Analysts had expected annual sales of $93 billion. While the cuts will mean fewer deliveries of one of Boeing’s main profit drivers, total shipments will rise as Boeing cranks up production of the 737, its main source of profit. Boeing expects to deliver between 760 and 765 commercial airplanes, an increase from last year’s 748. Operating cash flow will be about $10.8 billion, up from the $10.5 billion generated in 2016. Earnings adjusted for pension expenses will probably be $9.10 to $9.30 a share this year, compared with the $9.24 predicted by analysts. To keep its cash machine humming, Boeing is counting on a smooth debut for the upgraded 737 Max while it speeds output by 12 percent at its narrow-body factory in Renton, Washington, to a record 47 jets a month. Dreamliner Benefit Boeing also benefited as deferred production costs for the 787 Dreamliner fell $215 million to $27.3 billion, according to the company’s website. The planemaker reached the crossover point last year where unit costs for the cutting-edge jetliner finally fell below its sales price. Since then, the balance of deferred costs has started to shrink with each 787 that rolls out of Boeing’s factories. The jetliner is the first built of spun carbon-fiber composites rather than aluminum and entered commercial service in 2011, more than three years late. Earnings Beat Fourth-quarter earnings adjusted for pension expenses were $2.47 a share, despite an $312 million accounting loss for an aerial tanker program, the company said. That was 15 cents more than analyst had expected. Revenue fell 1.2 percent to $23.3 billion, compared with analysts’ projection of $23.1 billion. Free cash flow was $2.23 billion, while analysts had expected $2.02 billion. Boeing’s commercial airplane business posted an operating profit of $1.47 billion, more than double its result from a year earlier. Results were weighed down by a $243 million pretax accounting charge for the KC-46 aerial tanker, which is based on a commercial 767 jetliner frame and was knocked off schedule by technical and design issues. The airplane division’s operating margin rose to 9.1 percent from 3.5 percent, but fell short of the double-digit margin goal set by Boeing Chief Executive Officer Dennis Muilenburg. The result would have been closer to 11 percent, according to Bloomberg Intelligence’s Ferguson, if not for the accounting cost as Boeing retrofits the first tankers built for delivery to the U.S. Air Force this year. Boeing’s defense business earned $809 million from operations, compared with $963 million a year earlier, as it absorbed $69 million of the tanker-related charge. The division’s operating margin declined to 11.8 percent from 12.4 percent. “It’s not surprising,” Ken Herbert, an analyst with Canaccord Genuity, said of the latest in a series of tanker charges. “We knew it was going to be a difficult program.”