Stock prices had a rough ride again yesterday, the day after the Dow Jones Industrial Average sustained a 39-point loss -- the worst in its history.

With waves of multimillion-dollar computerized selling programs rolling through the market for a second day, the Dow was off by 22 points at noontime. As prices shifted and the selling programs eased, the market struggled back up and ended the day with the Dow off 8.38 points, closing at 1,518.23.

New York Stock Exchange volume was heavy at 176 million shares, slightly under the feverish pace set Wednesday when 180 million shares changed hands in the fifth-heaviest trading day ever.

Declining stocks outpaced advancers by a 5-to-1 margin on the NYSE. Wall Street strategists said they remained bullish for the long term, but predicted continuing volatility in the market for the short term.

"Remember, the trend is your friend and it's a bull market," trumpeted Larry Wachtel, a market strategist at Prudential-Bache.

Wachtel said he expected the market would open on the firm side today and then run into selling once again. The shakeout, he added, "would increase the humility level in the street and take away the arrogance level" and set the stage for a return to bullishness.

Wachtel said rumors that Arab nations might withdraw their investments from the United States -- in sympathy with Libya -- caused some of the day's selling.

January's bizarre "stock shock" changed the face of the investment landscape in only three days. The Dow went to a record high of 1,565.71 on Tuesday, then down 39.10 points to 1,526.61 on Wednesday, and down 8.38 to 1,518.23, for a two-day decline of 47.48 points -- a 3 percent loss.

The "program" selling, which is a major factor in the market's volatility is part of a sophisticated strategy used by many financial institutions to take advantage of the spread between the price of a futures contract of the Standard & Poor's 500 index and the prices of the stocks that make up that index.

In one instance, the investor buys a group of the stocks called "a basket" that are in the index and then sells, or "shorts," a number of futures contracts on the index that are the equivalent of his basket.

If stock prices rise, the value of the futures will drop, or vice versa. The investor makes his money on the difference between the stocks and the futures. Programmed trades usually involve several hundred stock issues that are simultaneously bought or sold when triggered by prescribed price movements in the futures and stocks.

The sell programs were triggered Wednesday after stock prices began to fall. The rates on bonds shot up, and prices fell, after news of an improving employment picture. Bond prices fell again yesterday as a 30-year Treasury bond finished down 1 3/8 points.

Beyond the Dow, other market averages yesterday fell sharply as the sell-off broadened. The Standard & Poor's 500-stock composite index fell 1.86 to 206.11. The American Stock Exchange index fell 2.94 to 244.32. The Nasdaq composite index closed at 323.01, down 5.08.