These are exciting but also dangerous - times for stock market investors.

They're exciting because for the last two months, stocks have been on an incredible roll. Since early January, the Dow Jones industrial average has risen about 500 points, or about 20 percent, and is within a whisker of its all-time high.The Hambrecht & Quist growth index, which tracks the stock price performance of 100 high-tech companies with annual revenue of less than $200 million, is up about 45 percent this year. Last week, it reached its highest level since the index was started in 1978.

But these times are dangerous because people tend to become most interested in stocks when their prices are rising rapidly. As a result, we often end up buying high and selling low - just the opposite of what we should be doing to make money.

Extreme examples of this inclination range from the Tulip Mania of the 1630s, when tulip bulbs sold for the equivalent of tens of thousands of dollars each, to the runup in silver prices to about $50 an ounce in the early 1980s. (Silver now sells for about $4 an ounce.)

Experienced investment advisers say they see the same tendency in the public's approach to the stock market. Many more people are interested in buying stocks at current levels, for example, than they were in January, when prices were much lower.

Stock market bulls say there's good reason for this change in attitude. Investors should be more positive about stocks now that the war is over and that the end of the recession seems near.

The bulls have a point, particularly regarding the war. Once it was clear that Iraq couldn't damage Saudi oil fields and that we had air supremacy, two dark economic clouds disappeared.

But it's far from certain that the recession is about to end or that the recovery will be strong. We also don't know what the government will do about several major problems, including bailing out the S&Ls, strengthening our banking system and handling the deficit.

Most economists, stockbrokers and financial analysts have proved time and again they cannot consistently predict what's going to happen to the economy, to company earnings or to stock prices.

So instead of getting swept up in the euphoria of the day - "There is a new stock market out there," one enthusiastic brokerage manager told me last week - investors should take a bird's-eye view of their financial situation and plan for the long run.

One of the most important parts of that plan is diversification. You should diversify into various types of assets - such as cash, real estate, stocks and bonds. And, when you can, you should diversify when you invest in each type.

This often isn't possible in real estate. Most people's main real estate investment is their home, which they purchase at one time.

But stocks and bonds can easily be purchased at regular intervals. So if you decide to establish a stock investment program, spend two years investing in equities quarterly, says John Markese, director of research for the American Association of Individual Investors.

Investing periodically over such a long period will allow you to average out the wide swings the market invariably takes.