The stock, dollar and bond markets exploded yesterday in an enthusiastic and relieved response to the Carter administration's comprehensive new program to boost the dollar.

The Dow industrial average scored its largest one-day gain ever, 35-34 points, to close at 827.79. The broader New York Stock Exchange composite index also had a record move of 2.12 points to close at 53.79.

The previous record advance on the Dow of 32.93 points occurred on Aug. 16, 1971, the day after President Nixon imposed his wage-price freeze.

Big Board volume yesterday was 50.6 million shares, up from 42.7 million shares the day before when the Dow slumped 19.40 points, continuing its 100-point, 2 1/2-week slide.

Treasury Secretary W. Michael Blumenthal, in a statement, said "we are pleased that the foreign exchange markets, the bond markets and the stock markets have reacted positively and recognize we mean business."

The dollar responded vigorously and immediately to the program of a one-point boost in the discount rate, increased freign currency market intervention lines and larger gold sales.

The U.S. currency scored gains of 7 to 8 percent against the West German mark, Japanese yen and Swiss franc over the record low levels that prevailed two days ago. Most of this advance took place yesterday.

The dollar closed in New York at 1.88 mark, 189 yen and 1.60 Swiss francs compared with rates earlier this week of 1.72 marks, 175 yen and 1.4 Swiss francs.

"The rates just shot up without any business even being done, as all those people with short positions scrambled to come in," one bank foreign exchange specialist said. "It's a moment of truth for the dollar because we've seen a significant change on the part of President Carter and his administration."

The sentiment in the market, however, was that yesterday's dollar recovery will not last very long unless the Federal Reserve Board demonstrates that it is indeed ready to intervene forcefully with the $30 billion in swap lins at its disposal, and unless figures in coming months show some improvement in the fundamental inflation and trade situation for the U.S.

Gold, which has been advancing smartly on the dollar's weakness, took a beating yesterday. The afternoon gold fixing in London set the price at $227.50 an ounce, down from $238.65 in the morning and $242.60 the previous afternoon, for a one-day decline of $15.10.

The bond markets, meanwhile, staged a strong rally yesterday in spite of the higher interest rates implied in the new program. Some long-term bonds government's new 9.25 percent three-year note that was auitioned on Tuesday to yield 9.36 percent went up a full point in price yesterday, and its yield dropped to just over 9 percent.

The Treasury, however, had to postpone its auction of $4.25 billion in new debt securities set for yesterday because of the turbulent market situation. The 10-year notes will be auctioned on today and the 30-year bonds tomorrow.

The Fed, meanwhile, appeared to tighten credit another notch in the money markets, raising the federal funds rate to what was believed to be 9.5 percent. It was under 9 percent last week.

And the prime interest rate was raised to 10.5 percent by many banks. Edward Palmer, chairman of the executive committee at Citibank, said he could "foresee bank rates in the 12 percent range in a period of months."

The stock market also shrugged off higher interest rates which are usually its nemesis, and concentrated instead on the implications the new program has for cooling off the economy and inflation. Analysis talked openly about a recession in the wings.

"You're going to insure a recession, rising unemployment and declining for market research at Bache Halsey Stuart Shields. "In return for that, you've rescued the dollar."

"The trade-off, the administration is saying, is well starve the economy in order to slow inflation brated this act of statesmanship."

There was speculation about how long the celebration will last as the full impact of the interest rate increases become apparent.

"It's an open question whether or not this action taken by the administration is what the market, in the long term, really wants," said Bernard Fortgoing, a vice president with Smith Barney, Harris Upham. "My attitude is that it is not inflation and the weak dollar that drives the market down, but the cures for both of them, which are controls and tight money."

Most analysts, however, expected the market's rebound from the sharp losses of recent weeks to continue for at least a few more days.

"The market had gotten very, very oversold so it was ripe for some kind of rebound," Richard McCabe, a vice president with Merrill Lynch who specializes in technical research. McCabe said he expected "some near-term bounce" and "some follow-through on the upside," but he also predicted a pull-back by the second half of November.

The advance on the NYSE was extremely broad, with about 1,500 issues gaining and only some 235 lower.

Pan Am led the most-active list with a gain of 1 to 7 3/4. Blue Chips studded the trading lists, with General Motors gaining 3 to 62, RCA, Corp. 3 1/4 to 27 1/3, Boeing 5 1/2 to 64, Eastman Kodak 4 1/2 to 60 3/4 and Exron 1 3/4 to 40 3/4.

The American Stock Exchange index was up 6.67 points to 143.42. Some 710 issues gained, with about 105 lower. Hartz Mountain was the standout performer with a jump of 3 5/8 to 12 3/4. The Stern Family, which owns 73 percent of the company's stock, indicated it would move to acquire the remaining 27 percent at $14 a share in a cash merger with another company they own.