NEW YORK, DEC. 31 -- The Dow Jones industrial average inched up 4 points today as buy-on-close orders, reflecting last-minute 1990 portfolio adjustments, erased a small afternoon loss.

Trading was thin as gainers edged losers on the New York Stock Exchange.

Although the federal bond market was buoyant throughout a shortened New Year's Eve session, bond gains -- the 30-year Treasury bond was up 18/32 as stocks opened and up 23/32 in late trading -- were largely attributed to follow-through buying after last week's gloomy economic data. Those data were topped off Friday by a fifth straight monthly decline in the government's index of leading indicators.

Stocks therefore received little support from bonds and languished in narrow trading all day. The Dow posted a session low of 2618, down 11 points, at midday, and closed at its high, 2633.66 points, up 4.45.

Only a few stocks moved on news in a largely featureless market. Northrop Corp., for example, skidded 9 percent on bearish weekend news tied to its "Stealth" bomber project, but trading was light and narrow in other aerospace companies, as it was in the bulk of the market.

At the close, NYSE advancing issues, which trailed for most of the day, finally outpaced declining issues by an almost 2-to-1 ratio, thanks to a spurt of buying at the close of trading. NYSE volume proved light at 114 million shares, expanding only slightly from 111 million on Friday despite the closing burst of trading. More than 10 million shares appeared to change hands in the last minutes.

Among Dow components at the close, all moves were fractional with the sole exception of Merck, which managed a 1 1/4 advance to 89 7/8.

Among active stocks, changes were modest as well. Citicorp eased 1/8 to 12 5/8, Occidental Petroleum dipped 3/8 to 18 3/8, Unisys edged down 1/8 to 2 1/2 and Ford lost 1/8 to 26 5/8.

Among stocks in the news, Northrop fell 1 7/8 to 17 3/8, a 9 percent loss, on market fears that reports that the Air Force had decided to freeze Stealth bomber construction may be a first step in dismantling what some analysts regard as a fatally flawed, insupportably expensive military program.

Among other stocks in the news, USG Corp. eased 3/16 to 13/16 after a trading delay and a company announcement that, as part of an ongoing restructuring, USG will exchange some debt and sell its DAP specialty-chemical subsidiary. The company has opted for an out-of-court restructuring instead of bankruptcy.

Telecommunications giant GTE Corp. traded uneventfully, up 1/8 at 29 1/4. The stock was apparently unaffected by news that the Federal Communications Commission will allow four competitors into what has previously been GTE Airfone's private preserve of air-to-ground phone service.

Among industry groups, few stocks were highlighted prominently. Among computers, NCR gained 3/4 to 90 3/4. In semiconductors, Texas Instruments slipped 1 to 38. Among airlines, UAL Corp. dipped 3 1/8 to 119 7/8, but other moves were fractional. Among entertainment companies, Disney slid 5/8 to 101 1/2, trimming a full-point midday loss. Banks and financial-service stocks generally traded narrowly but with a downside bias. Mellon lost 1 to 23 3/4 but Bankers Trust rose 7/8 to 43 3/8 among the money centers.

The Dow transports eased 0.93 to 910.61 while the utilities slipped 0.32 to 209.76.

Among broad stock indexes, the Standard and Poor's 500 was up 1.51 at 330.23, the NYSE Composite up 0.84 at 180.49, the Value Line up 2.04 at 241.52, the Amex Market Value up 3.46 at 308.11 and the Nasdaq Composite up 2.64 at 373.84.