The year's worst week of turmoil in the financial markets went out like a lamb yesterday -- comparatively, that is -- as the stock market closed off slightly, the dollar edged upward and gold prices dipped some.

In contrast to the wild fluctuations earlier in the week, the Dow Jones industrial average ended the day at 838.99, down 5.63 points. There were 36.6 million shares traded, well below Thursday's 47.53-million volume.

The international markets also were calmer again yesterday. The dollar edged upward in Frankfurt to 1.79 marks, from 1.78 Thursday. And the price of gold fell 50 cents in London, closing at $396.50.

The relative stability capped a week that began in marketwide panic in the wake of the Federal Reserve Board's stiff new credit-tightening moves last weekend but then eased after officials moved to stem the tide.

Nevertheless, over the full five days, the Dow plunged a cumulative 58.62 points, racking up its second sharpest setback in history. Trading for the week hit an all-time high of 257 million shares.

The figures came as, separately, the Commerce Department reported that retail sales rebounded sharply in August and September, while inventory-building eased some during August.

Overall retail sales levels climbed 2.2 percent in September, the agency announced. And the department revised its estimate of sales volume in August to show a 3.1 percent rise from a relatively flat-period shown in preliminary data.

In both cases, the ebullience was largely the result of increases in auto sales stemming from stepped up efforts by manufacturers to spur sales by offering rebates. The move was begun by the ailing Chrysler Corp.

Inventories rose in August by 0.8 percent to a seasonally adjusted $417.19 billion following a rise of 1.9 percent in july. The easing was welcome. Some analysts have been concerned inventories may be too high.

Meanwhile, the Federal Housing Administration raised its maximum interest rates on property improvement loans and mobile home loans. The FHA did not alter its rates for single-family home mortage loans, but analysts expect an increase soon.

The maximum FHA rate for property improvement loans will rise to 13 percent, from the present 12 percent, effective on Monday, while the rate for mobile home loans will climb to 13.5 percent, from 12.5 percent now.

The FHA also is raising its rates for combination mobile home and lot loans, boosting it to 12 percent, from 11.5 percent now. The FHA rate for single-family home loans was raised to 10.5 percent in late September.

In a related development, John Heimann, the U.S. comptroller of the currency, reiterated a plea to the nation's banks to exercise "prudence and restraint" in the wake of last weekend's Fed actions.

Heimann told an investors' conference in New York, "we are going into some uncharted seas" and "in a period of economic uncertainty banks need to act with prudence and restraint."

Heimann also echoed views expressed Thursday by Federal Reserve Board member Henry C. Wallich that a credit crunch "seems to me very unlikely" despite the past week's rise in interest rates.

Wallich and Fed Chairman Paul A. Volcker have sought to reassure the markets that the Fed intends only to cool down speculative fever, not to stem credit flows entirely. Volcker also has said he does not expect a serious crunch.

About a third of the September rise in retail sales levels stemmed from the rebound in auto sales. With autos excluded, overall retail sales rose 1.9 percent over the month, following a 2 percent in August.

Total retail sales were up 12 percent from a year earlier. All major retail categories showed increases over the 12-month period. Because of the past year's rise in oil prices, the sales volume at gasoline stations rose 28 percent.