ALAN GREENSPAN, the new chairman of the Federal Reserve Board, took a necessary first step Friday when the board raised interest rates half a percentage point. For nearly a month since he took office, there had been much speculation (of both sorts) in the financial markets whether he would dare to tighten up. A presidential election campaign is getting under way, and high interest is not popular. But the dollar's exchange rate was falling, and fears of inflation were rising. That's why the Federal Reserve acted. The next question is whether an increase of half a point is enough to hold the dollar steady.

It's certainly not going to be enough if President Reagan can't end the deadlock with Congress over the budget for the fiscal year that begins in three weeks. Under present policy, the Congressional Budget Office has persuasively warned, the federal budget deficit is about to start upward again. A bigger budget deficit is a force for more consumption, drawing more imports into the American market and increasing the other deficit -- the one in the foreign trade accounts. There's a direct relationship between the two deficits. They have soared upward together over the past five years, and they are going to have to come down together.

If they come down, Mr. Greenspan can relax. The pressure will be off. But if they stay high, the dollar will continue to be in danger. The Federal Reserve Board's job is to preserve it from those twin threats -- inflation at home and a falling exchange rate abroad, each of which aggravates the other. Even after Friday's increase in rates, Mr. Greenspan has no margin for error. The consumption boom has brought unemployment down much faster than most people expected at the beginning of the year. It's now 6 percent of the labor force, and it probably can't go much lower without beginning to generate wage inflation.

If the whole job of restraining inflation is left to Mr. Greenspan, interest rates will have to go a good deal higher. They are his only weapon. He will have to let them go high enough to chill consumption by Americans, and to persuade foreigners to keep investing here. That certainly would risk a recession.

Both Mr. Reagan and the congressional leadership need to keep that in mind as they come back to town and return to their unfinished budget. They share the responsibility to work out a rational compromise, but the greater part of that responsibility is Mr. Reagan's. He is, after all, the president. If he fails, and budget policy is left to the automatic pilot, Mr. Greenspan's decision on Friday suggests the direction he is likely to take