The stock market rallied enthusiastically for the second session in a row yesterday. Analysts said it was responding to declining interest rates and an emerging consensus on the future of the economy.

The Dow Jones industrial average jumped 14.27 points to 866.82 on the heels of a 19.6-point gain last Friday. The price of an average share climbed 60 cents on the New York Stock Exchange and went up 39 cents on the American Stock Exchange.

Trading was heavy; volume on the NYSE climbed from Friday's 59.5 million shares to 65.6 million shares. Composite volume was 76.72 million shares.

The continuing decline in the prime rate, which yesterday fell to 17 1/2 percent, spurred stock buying, several analysts said. Recognition that the economy is solidly in the grips of a recession also has helped the market by removing uncertainties that make investment planing difficult, some suggested.

But even the most optimistic Wall Street observers said the two-day spurt in stock prices and volume was not the beginning of a stock market recovery.

"This is a rally in a bear market," said Larry Wachtel of the brokerage house of Bache, Halsey Stuart Shields Inc. "There will be no bull market until we get a sense of how deep the recession will be."

Newton Zinder of E. F. Hutton predicted "further near-term strength is likely, but don't get carried away. The elements of a major new advance are not in place."

Another forecast of a "strong near-term rally" came from Charles C. Reilly, senior vice president of Arnhold & Bleichroeder.

"We're seeing a continuation of an interest-rate move," Reilly told Dow Jones News Service. "A lot of people had been waiting to see some confirmation by the Fed" that rates are coming down, and they got the confirmation last Friday.

The prime rate has slipped three points from its last peak in recent weeks, and the Federal Reserve Board on Friday cut its discount rate to 13 percent from 14 percent. That action produced another plunge in the prime yesterday as several big banks lowered their published prime rate to 17 1/2 percent from 18 percent.

Further cuts in the prime to at least 17 percent are expected by many analysts and that liklihood--as much as yesterday's half-point drop--is believed to be benefiting the stock market.

The decline in interest rates has helped the bond market directly and indirectly spread that good will into stocks.

It is the recession that is causing interest rates to fall, and the wide-spread acknowledgement of the recession is also helping the stock market, said Donald Trott, institutional research manager for A. G. Becker.

A consensus on the economy--even a consensus that the economy is in a recession--will have a positive impact on the market, added Trott.

But Wachtel of Bache said it will be some time early next year before it is clear how serious the recession will be and what impact it will have on stock prices.

Trott said some of the orders to buy stocks are coming from institutions that are preparing for a year-end influx of money from pension funds, which traditionally make their investments at this time of the year.

The 34-point jump in the widely watched Dow Jones industrial average in the last two days of stock trading in part reflects specific adjustments in the Dow rather than behavior of the market as a whole.

Zinder noted that the DJI climbed only 0.3 percent during all of October, while the more broadly based Standard and Poor's 500-stock average was up 4.9 percent during the month, and the NYSE composite average gained 5.4 percent.

In a sense, the DJI is catching up with the rest of the market, Zinder explained. One of the stocks included in the Dow Jones average is General Motors, which yesterday closed at $38, up 1 5/8 for the day. Despite unexpectedly heavy losses for the latest quarter, GM yesterday decided to continue paying its regular dividend.