Climbing quietly but steadily amid deep skepticism, the stock market is approaching the record levels it reached two months before the historic crash in October 1987. While the trauma of Black Monday still troubles investors, stock prices have been rising on a combination of economic, business and market factors that are favorable both to stocks and to bonds. So long as the nation is able to avoid a severe recession, many analysts predict, the markets will continue to profit from the trend toward lower interest rates, the wave of corporate buyouts, the return of institutional and foreign investors and a modest revival of interest by individual investors. After rising more than 300 points in less than four months, the 30-stock Dow Jones industrial average is flirting with its all-time record of 2722.42, set on Aug. 25, 1987. When trading bells sounded Friday afternoon, the Dow stood at 2,607.36, only 4.2 percent below its historic peak. Several of the broader stock averages already have challenged or exceeded their 1987 record highs. In the strange way that markets operate, the rising prices have begun to feed on themselves as reluctant investors, especially at the institutional level, have become convinced they can't afford to stay out. "What the market is really seeing is the capitulation of the bears," said John D. Connolly, senior vice president at Dean Witter Reynolds. The bears have concluded, he added, "that sitting in cash and waiting for Armageddon is a loser." The return of the Dow is taking place in a climate that is vastly different from the one that prevailed in the summer of 1987. Gone from today's market is the speculative frenzy that characterized the final days of the five-year bull market, which began in August 1982 and peaked in August 1987. That sense of euphoria was once captured by a headline in Barron's, the financial magazine, that proclaimed: "Holy Cow! Is This Bull For Real?" Nobody is writing those kinds of headlines today but many analysts are talking about skepticism. "This is the most unloved bull market in history," observed veteran market watcher Larry Wachtel, chief market analyst at Prudential-Bache Securities. "Even with the new highs, nobody believes it is happening." Credit for the rising market is linked to several factors -- all very different from two years ago. One of the most dramatic market changes has been in the perceived value of stocks -- a view that entwines stock prices and company profits. Experts agree that prior to the market crash, stocks were wildly overvalued, with the Standard & Poor's 500 stocks selling, as a group, at almost 20 times their per-share earnings. At the moment, the S&P 500 is selling for a far more modest 13 times earnings. While this makes stocks a better buy, experts offer one caveat: Should the slowing economy cause corporate profits to fall sharply, stocks could once again become overvalued. The market climate is different in other ways, too. In mid-1987, the economy was overheating, interest rates were rising, the value of the dollar abroad was falling and the trade and budget deficits were growing. Today, in a slowing economy, interest rates are coming down and the dollar is stable-to-stronger, while the trade deficit has improved markedly. However, the budget deficit has yet to drop significantly. The changing scenario also has made equities far more attractive in relation to bonds. At the height of the bull market, stocks in the S&P 500 were yielding dividends equal to 2.6 percent of share price, while bonds were yielding 9 percent and moving up. Today, stocks are yielding 3.3 percent while bonds are yielding about 8 percent and, some analysts believe, are going into the 7 percent area. The new market climate has been marked, too, by the rise of small stocks. On Wall Street, where today's dog may be tomorrow's darling, smaller stocks are popular again. The Nasdaq over-the-counter market, where many smaller stocks trade, rose 15 percent last year while the Dow climbed only 11.8 percent. So far this year, with the Dow up 20 percent, the Nasdaq stocks are keeping pace at 18 percent. One curiosity about the return of the Dow average is that the prices of the 30 individual stocks that make up the average are very different than they were two years ago. Indeed, only 10 of the 30 Dow stocks are higher than they were when the market peaked in 1987, while 20 stocks are lower in price. The differences result from a combination of factors, including shifts in the strength and weakness of various economic sectors and the changing fortunes of individual companies. Among the blue-chip stocks that have shined since Aug. 25, 1987, is the Boeing Co., which is up from $35.38 to $52.50. Boeing has drawn a flood of orders for new commercial aircraft to replace the aging planes that are operating on many routes. One of the big losers has been International Business Machines Corp., which stood at $172 when prices peaked two years ago. IBM stock closed Friday at $114, its share price reflecting a tightening market in the computer industry. Consumer-oriented stocks, which tend to be havens for investors in uncertain times, generally have been on the plus side of the Dow list. They include Coca-Cola Co., McDonald's Corp., Merck & Co., Philip Morris Cos. and Procter & Gamble Co. Industrial stocks, on the other hand, are likely to suffer more in economic downturns and find themselves on the losers list. They include Allied-Signal Inc., E.I. DuPont de Nemours and Co., General Electric Co., Goodyear Tire & Rubber Co., United Technologies Corp. and Westinghouse Electric Corp. The selling panic of Black Monday, Oct. 19, 1987, which took the Dow down 508 points in one day, sent tremors throughout the securities industry. Wall Street firms suffered major trading losses. Investment banking and retail business slumped badly as investors at all levels ran from equities to cash or from equities to fixed-income products. During the months that followed, the securities business slipped into a recession as major Wall Street brokerage houses laid off more than 16,000 workers and consolidated many of their operations. Weak or unprofitable brokerages were sold or merged into stronger firms -- a trend that has continued. Just last week, in the latest round of mergers, Prudential-Bache Securities bought the retail offices of 104-year-old Thomson McKinnon Securities. Meanwhile, on the New York Stock Exchange, trading volume has begun to rise. In 1987, the year of the crash, average daily volume was 188.9 million shares. That fell to 161.5 million in 1988. For the first six months of this year, the daily average moved up to 168.3 million. Much of the pickup has come from institutional investors, such as pension funds and insurance companies. According to the Securities Industry Association, these institutions have averaged net purchases of 3.4 million shares a day this year, an 11-fold increase over the 1988 average of 300,000 shares a day. Mutual funds, too, are seeing signs of a pickup. Net sales of mutual funds rose to $1.9 billion in May, compared with May 1988, when there was a net outflow of $900 million, according to the Investment Company Institute. Retail investors also are returning to the market, the SIA said. Individual investors bought and sold an average of 78.4 million shares a day on the NYSE, a one-third increase over the 58.9 million shares traded in 1988. But at the retail level, the overall condition is still fairly grim, according to Michael Roberts, a broker at Prudential-Bache in Bethesda. Roberts often talks to clients about the value of including equities in their portfolios. "People accept the idea intellectually," he said, "but viscerally they are very, very scared." The operations of the stock and futures markets also have changed to some degree. The crash precipitated widespread demands that the federal government "do something" to protect investors and prevent similar debacles in the future. A series of reports on the causes of the crash poured from federal, congressional and industry study groups. But Congress took little action, much to the satisfaction of the securities industry. The stock exchanges and futures markets were determined, however, to show they could respond to a crisis and made a series of procedural changes to address problems exposed by the crash. At the NYSE, the list of changes fills six pages. Most notable is the NYSE effort to head off another meltdown in the market by working with the Chicago Mercantile Exchange, home of the S&P 500 stock index futures contract. This is the contract used by program traders to profit from the differences between the prices of stocks and the prices of futures contracts. Under a so-called "circuit breaker" plan, stock trading at the NYSE would be halted for an hour if the Dow falls 250 points, and for another two hours if the Dow falls another 150 points during the same day. Trading halts also would occur at the Merc when the S&P futures contract declines sharply. How well the arrangement will work and what the impact will be will not be known, of course, until it is used. Program trading, often blamed for creating a high degree of market volatility prior to the crash, eased off as major Wall Street firms stopped trading for their own accounts or quit the business. Yet program trading remains an important part of NYSE trading. As of June, program trading accounted for 12.3 percent of the NYSE's trading volume, up from 9.2 percent in May. But the controversial nature of program trading remains: Dean Witter decided last week to halt all program trading.