Nearly two weeks after the start of the fighting in the Persian Gulf, Wall Street's financial markets have sustained an optimistic view of the progress and potential outcome of the war.

By the beginning of the past week the early euphoria among investors over initial military successes against Iraq and tumbling oil prices had faded.But the stock market has since held its ground, helped by further positive news from the fighting and some encouragement about the domestic economy from the Federal Reserve Board.

Although they by no means represent an absolute cross section of the American population, the markets serve as a sort of continuous gauge of public confidence or concern about how the war is going.

A good many analysts also watch them for any signals they might register about the prospective effects of the conflict on workers, consumers and business planners.

If oil prices had soared once the fighting began, many observers say the ripple effects could have driven the economy deeper into the recession that began in the second half of last year. For now at least, such fears have been allayed.

"The markets have historically fallen in response to an outbreak of hostilities," says Norman Fosback in the current edition of the newsletter Investor's Digest. "Investors abhor uncertainty, and few situations generate more uncertainties than war.

"In the present case, however, uncertainty had already been building for five months.

"The coalition's startling early successes actually removed uncertainty by drastically reducing the probability of unfavorable economic consequences - namely the risk that oil fields, pipelines and refineries in the Mideast might be destroyed."

More recently, stock traders have been encouraged by indications from Alan Greenspan, chairman of the Fed, that the central bank stands ready to relax its credit policy further if circumstances warrant.

In congressional testimony last week, Greenspan also suggested that the recession might run its course by around midyear. But many private analysts question whether better times are likely so soon.

"The main cause of the recession is the heavy debt burden," says Sung Won Sohn, chief economist at Norwest Corp. in Minneapolis.

"The combination of deleveraging by individuals and businesses, as well as credit caution by financial institutions, foretells a relatively long and painful recession. Unfortunately, there is no quick, easy or painless solution to the debt problem. It will take time."