At the carnival on Wall Street, the most popular ride is the roller coaster run by two partners named Greed and Fear. Greed takes the riders up, and Fear brings them down.

For most of 1985, Greed was at the throttle, and the riders loved it. They went higher than ever before. But last week, Fear took over, and the riders gasped as the plunge began with a historic 39-point one-day drop in the Dow Jones industrial average.

Once the riders caught their breath, they concluded that, aside from a bad scare, not much had really changed in the stock market, and that, on fundamentals, the outlook for 1986 was still generally upbeat.

"Nothing has really changed," said Charles Comer, market analyst for Oppenheimer & Co. and president of the New York Society of Securities Analysts. "There is no reason to be any more or less bearish."

Considering how far the market rose during 1985, a correction was to be expected, market participants said. It developed quickly Wednesday when new employment figures suggested the economy was strengthening, which created worries about inflation and caused bond prices to fall. That was followed by a drop in stock prices and triggered financial institutions' computer-run "sell programs" that drove the market down across a broad front.

Even so, the observers said, the long-term market trend is up. Compared with 1985, they believe 1986 will be a year of more modest gains.

On Wall Street, last year's upward ride took the Dow on a breathless 335-point profit run. The Dow's ability to race through the 1,300, 1,400 and 1,500 levels was all the more unexpected because 1984 had been a down year in the market, causing 1985 to open in a mood of nervousness and deep caution.

"People were not only concerned about a recession, they expected it," Comer said. "I don't think they expect it now."

Today, while the market has been shaken by its sudden losses and the echoes of Wall Street's 1929 crash, long-term optimism appears to be very much alive in the investment community.

Most of the factors that energized the market in 1985 are still in place and likely to remain there through at least the first half of 1986, said economists, analysts and market strategists. Among the developments that helped propel the market to new heights were these:

Interest rates declined sharply. Inflation continued at a moderate 3.5 percent pace, aided by a drop in oil prices. The successful multinational effort to reduce the strength of the U.S. dollar against foreign currencies is helping American corporations find new markets overseas and reduce foreign competition at home. Adoption of the Gramm-Rudman-Hollings budget measure demonstrated a federal determination to reduce budget deficits.

"The real key to 1986 will still be the trend in interest rates," said Robert J. Farrell, chief market analyst for Merrill Lynch. "The lower rates go, the more pressure there is on investors in cash or short term notes to seek alternative higher returns." Many investors will find their higher returns in stocks, he added.

Farrell said he looked for a move in the Dow to the 1,600 to 1,700 level during the first half of the year. One of the reasons the market is likely to do well in the spring, he said, is because a flood of money from newly opened Individual Retirement Accounts (IRA) will pour into stocks in March and April. Beyond that, Farrell said he forsees "a long consolidation of gains."

John D. Connolly, cochairman of the investment policy at Dean Witter, said he foresees a move to 1,800 in the Dow by year's end. "I think it will be a year dominated by growth stocks," he said. If interest rates remain at their present level, a company whose earnings are growing at 10 percent a year will look good to investors, he noted.

Connolly said that, in the short term, he expected the correction to take the Dow to a range of 1,450 to 1,490. Treasury bills, he said, would move up to 7.30 percent to 7.35 percent, and 30-year Treasury bonds up to to 9.50 to 9.75 percent. The Federal Reserve System, he said, probably will take a wait-and-see attitude on whether it was necessary to ease credit further.

The major worry at the moment, Connolly said, is whether the Gramm-Rudman-Hollings legislation will lose a pending test of its constitutionality and thereby damage the psychological progress that had been made against federal budget deficits.

The result of the court test, Connolly said, "will have a huge impact on what we do as an investment firm."

Other market experts sketched out these views of the future:

Greg A. Smith, research director at Prudential-Bache, attributed most of the downward movement in the market last week to "program" traders, rather than any change in fundamentals. After the smoke clears, he said, short-term interest rates will be generally "flat," while long-term rates would be "down modestly."

Last week's move in bond rates from 9.25 percent to 9.50 percent eventually would be seen as "a little wiggle" against the long-range drop from 11 percent, he said. Smith looks for the Dow to reach 1,700 to 1,800 this year.

"We think the year as a whole will be good," Smith said. "We believe the stock market will outperform bonds and cash and perform better than investment alternatives in real assets by a fairly wide margin. Beyond that, our crystal ball fades considerably."

Stanley B. Shopkorn, managing director at Salomon Brothers, said he expects "equities will stay strong in the first part of the year" because they offer superior returns compared to other investments. "I see no reason to be bearish," he said. But he added, "I'm not as bullish as I was."

John H. Laporte, research director for T. Rowe Price Associates in Baltimore, said, "We think 1986 will be a reasonable year and a positive year, but it is not going to be barnburner."

"The bull market seems secure," said Norman G. Fosback, editor of Market Logic and other newsletters in Fort Lauderdale, Fla.

He said he expects the Dow to hit 1,900 by the end of the year. Fosback, who also tracks trading by corporate insiders, said insiders continue to buy their own stock, a sign he considers highly bullish.

Oppenheimer's Comer, noting he was "fairly optimistic," said: "We will go higher early in the year and will retrace our ground later. We could wind up back where we started."

Peter Lynch, portfolio manager of the giant Fidelity Magellan Fund in Boston, expressed reservations about 1986. While the market is up about 30 percent, he said, corporate profits have been flat. "I don't know how long markets can go up without earnings," he said.

Reflecting on 1985, Lynch said, Wall Street had been expecting both inflation and interest rates to rise. When they did not go up, it was "a big, positive surprise" that gave the market new momentum.

But, he asked, "Where is the positive surprise now? To have a 25 percent move in the market, profits would have to be up, interest rates down, inflation lower. Everything would have to work right."

Institutional investor Robert Torray of Torray Clark & Co., whose firm manages $2.3 billion in pension funds and other monies, said he forsees "enormous difficulties" ahead for the market because of potential problems associated with the U.S. trade deficit, federal deficits, farm loans and foreign loans.

The easing of monetary policy and lower interest rates, he said, had temporarily obscured these other problems. "I think it would be unwise to be buying stocks now," he said.

Torray, who believes in buying out-of-favor stocks, has invested in issues in the energy field, particulary in depressed offshore drilling companies, in the belief that those stocks will turn up eventually.

Michael Burke, editor of Investors Intelligence, said his most recent poll of 135 investment advisers, showed 61.1 percent were bullish, 25.6 percent bearish and 13.2 percent expected a market correction. This, he said, is the highest number of bulls recorded since last February. When the group is heavily optimistic or pessimistic, he said, the opposite generally happens. Burke thinks 1986 will be down year, with the Dow dropping below 1,300.

The 1985 investment year was characterized by:

*A climate in which interest rates continued to fall, with the prime rate dropping from 10.75 to 9.5 and the rate of inflation running at about 3.5 percent.

*A rally in the bond market, where prices move in the opposite direction of interest rates, which helped fuel the rally in the stock market. A 30-year Treasury bond currently yields about 9.25 percent compared with about 11.5 percent a year ago.

*A huge move of funds by individual investors from money market funds and certificates of deposit, yielding only about 7 percent to 9 percent, to bond and income funds, especially government income funds, municipal bonds funds and Ginnie Mae (Government National Mortgage Association) funds, some of which yield 11 percent to 12 percent. These funds swelled by $60.1 billion during 1985.

*A frenzy of mergers and acquisitions, topped by General Electric's $6.28 billion buyout of RCA Corp. "Merger mania" bid up the shares of takeover companies and took an estimated $175 billions of dollars worth of shares of stock out of circulation, leading some analysts to forsee higher prices for shares still available.

*Net selling by individual investors, who took 70 to 75 cents out of the market for every dollar they invested, according to figures compiled by Dean Witter.

The stock market thus continued to be heavily dominated by institutional investors, those who manage multi-million dollar retirement and other corporate or private funds.

For Wall Street, 1985 was a year of superlatives, a year for big numbers and new records. They included:

*The Dow Jones industrial average of 30 blue chip stocks began 1985 at 1,211.57 and ended the year at 1,546.67, which was a gain of 335.10 points or 27.7 percent. It represented the largest number of points gained in a single year and the second largest percentage gain. The Dow had gone up 38.2 percent in 1975. The 1985 closing mark of 1,546.67 was nearly double the tally of Aug. 12, 1982, when the Dow closed at a two-year low of 776.92, just before the start of a historic rally.

*The 1985 gains were reflected in other key tallies of market activity. The Standard & Poor's 500 closed the year at 211.28, up 26.33 percent. The New York Stock Exchange composite closed at 121.58, up 26.15 percent. The American Stock Exchange closed at 246.13, up 20.5 percent. The Value Line composite of 1,660 stocks finished at 214.89, up 20.7 percent. The National Association of Securities Dealers composite closed at 324.93, up 31.36 percent. The Wilshire 5,000 Equity Index finished 1985 at 2,164.69, for a gain of 27.19 percent, representing a gain of $462 billion.

*Trading on the New York and American Stock Exchanges, as well as the over-the-counter market operated by the National Association of Securities Dealers, set new records for the year. The NYSE traded about 27.5 billion shares, 19.2 percent more than 1984. AMEX trading set a new record at more than 2 billion shares. NASD tallied more than 20 billion shares, 30 percent higher than 1983, the previous record year.

*The market's 1985 run-up came late in the year, starting Sept. 20. After 1984 ended with a 47.07 point or 3.7 percent loss, a January-February spurt boosted prices and brought the Dow close to 1,300. It took until May 20 for the Dow to close above 1,300. After a dull August and September, the Dow moved to 1,403.44 on Nov. 6, and then on Dec. 11, only 24 trading days later, it closed at 1,511.70, the first finish aboved 1,500.

*Blue chip stocks were in the forefront of the stock market advance. International Business Machines gained $32.38; Atlantic Richfield $19.63; Beatrice Cos. $18; General Electric, $16.13; and Chrysler, $14.63. Many of the blue chip companies have international operations. Because a falling U.S. dollar benefits these firms in overseas and domestic markets, it engendered hopes for higher corporate profits, helping their share prices.

Interest-sensitive stocks, such as savings and loans, scored well as falling rates narrowed the spreads between what the thrifts earn on loans and what they pay for funds.