An encouraging report on the U.S. trade deficit has helped catapult the dollar to recent highs against several key foreign currencies. The Commerce Department reported Friday that the United States posted a $10.9 billion trade deficit in May, the second smallest shortfall in almost three years. The news helped the dollar make its best showing since October against the British pound. The pound finished at $1.6605 in late New York trading, far cheaper than Thursday's $1.6875. The dollar's surge lifted bond prices, pushing interest rates lower. The yield on the Treasury's closely watched 30-year bond slipped to 9.14 percent from 9.17 percent late Thursday. The favorable trade news also sparked a moderate gain in stock prices on Wall Street. The Dow Jones average of 30 industrials rose 15.83 points to 2,129.45, finishing the week with a net gain of 23.30. In another key economic report, the Labor Department said wholesale prices rose a moderate 0.4 percent in June _ but analysts saw cause for worry in the steep, drought-induced climb in raw food prices. The hot, dry weather searing much of the nation sent prices of unprocessed grain and poultry soaring by more than 20 percent last month, pushing raw food prices 4.2 percent higher than in May. It was the biggest jump since October 1985. Grain futures closed mixed while soybeans posted strong gains on the Chicago Board of Trade amid conflicting weather forecasts for the drought-stricken Farm Belt. In other economic developments Friday: _The Federal Reserve reported that U.S. industrial production, boosted by heavy demand for electricity during the summer heat wave, climbed 0.4 percent in June, the ninth consecutive month without a decline. _The Commerce Department said business inventories climbed in May for the 17th consecutive month. Sales also rose strongly, easing economists' worries that too many goods are accumulating on shelves and back lots. The Reagan administration and private economists were in agreement that the May trade report offered conclusive proof that the government's efforts to deal with one of the country's biggest economic problems, a seemingly intractable trade deficit, were beginning to show results. The May deficit was actually $627 million higher than a revised April imbalance of $10.3 billion. But the April figure was the smallest imbalance since a $9.9 billion deficit in August 1985 and the May deficit was the second smallest imbalance since that time. Commerce Secretary C. William Verity noted that for the first five months of this year, U.S. exports have surged by 31 percent compared with the same period in 1987, reflecting the boom conditions in the nation's manufacturing brought on by the weaker dollar. ``The merchandise trade figures for May are consistent with the trend toward a lower trade deficit,'' Verity said. ``The improvement in the trade balance in the first five months has been widespread geographically.'' The administration launched an effort three years ago with major U.S. allies to devalue the dollar as a way of making American goods more competitive on overseas markets.