(Reuters) - Union Pacific Corp UNP.N on Thursday reported a quarterly profit that beat Wall Street estimates, as the U.S. railroad operator cut costs and raised rates to overcome disruptions from record floods in the Midwest and ongoing U.S.-China trade tensions.

Slideshow ( 2 images )

Union Pacific’s better-than-expected results landed amid worries that cooling global growth and President Donald Trump’s trade war are driving a “freight recession” in the U.S. transportation industry that is seen as a bellwether for the domestic economy.

East Coast railroad operator CSX Corp CSX.O rattled the sector on Tuesday when it revised its 2019 revenue forecast to call for a slight drop - rather than a slight gain - following trade-related weakness in its intermodal and metals units.

The transportation industry’s freight volumes have been down for seven straight months, according to the Cass Freight Index, which tracks shippers ranging from retailers and automakers to chemical companies.

Union Pacific and CSX each moved 4% fewer carloads in the latest quarter, when drops in coal and other energy-related shipments fueled volume declines.

Rather than dialing down expectations, Union Pacific said it would use workforce reductions and other cost-saving measures to stay ahead of the volume shortfall, sending shares in the Omaha, Nebraska-based railroad up 4.5% to $172 in midday trading.

“The overall (U.S.) economy still feels like it’s doing O.K.,” said Chief Executive Lance Fritz, who added that Union Pacific customers expect the back-to-school and winter holiday shipping season to normalize after last year’s import stockpiling to avoid new tariffs on Chinese goods.

Nevertheless, volume for the second half of 2019 is expected to fall about 2% from the year earlier.

While that would be an improvement from the first half, it “will not be enough to produce year-over-year volume growth,” Union Pacific Chief Financial Officer Robert Knight said on a conference call.

“It’s difficult to predict what’s going to happen with that,” which means that railroads are under even more pressure to improve efficiency, Edward Jones analyst Jeff Windau said.

Union Pacific’s sweeping business overhaul helped mitigate risk in the latest quarter by reducing operating ratio to a company best of 59.6%. Executives said that closely watched metric - which measures operating expenses as a percentage of revenue - would continue to improve in the second half.

Net income at Union Pacific, which serves the Western two-thirds of the country, rose 4% to $1.57 billion, or $2.22 per share, in the second quarter. Analysts had expected a profit of $2.14 per share in the quarter, according to IBES data from Refinitiv.

The railroad - which also has been closing yards and revamping train schedules - cut operating expenses 7% during the quarter.

Total operating revenue fell 1% to $5.6 billion.

China’s retaliatory tariffs hit Union Pacific’s agriculture business the hardest, contributing to a 7% drop in grain carloads during the latest quarter.

Falling last-minute “spot” truck rates and weather-related service issues sent the railroad’s domestic intermodal business down 11%.