Everyone knows that the ax hangs over federal spending. But the president's program to be announced this week will also include plans to cut back another important, though much less well known, government role: that of the nation's No. 1 borrower and lender.

Last year more than a third of the money raised in U.S. credit markets went through federal government hands. Some of this was to finance the almost $60 billion budget deficit. But a good proportion went to fund programs which do not show up in the budget total, and which are therefore not subject to the same control as budget outlays.

The president's economic advisers think this federal presence is too large, that the government drives up interest rates and crowds out private borrowers and that it allocates credit to various groups less wisely that would the free market.

But preferential treatment is what these programs are supposed to provide. They benefit such diverse groups as farmers, home buyers, parents of students, and utility companies or electricity users in rural areas.

Through the Farmers Home Administration, the Tennessee Valley Authority, Rural Electrification Administration and a host of other programs run by federal agencies from Housing and Urban Development to the Agriculture Department, people can borrow money at concessional terms from federal agencies rather than going direclty to the markets.

As well as lending to particular groups, federal agencies give loan guarantees. These give indirect assistance to favored causes by putting the full weight of the U.S. Treasury behind the borrower.

In many ways these programs are analogous to direct spending. They make it possible for some people to raise money which would otherwise cost them more, or simply be unavailable. They thus channel resources into selected areas picked by the government, and, to some extend, away from other areas.

Last year $81 billion was lent by the government, an amount equal to 23 percent of all the funds advanced in U.S. credit markets. In the first half of the 1970s the proportion hovered about 14 percent.

Office of Management and Budget Director David A. Stockman, in his "economic Dunkirk" memorandum after the November election, characterized federal borrowing and lending as "running rampant." He blamed an explosion of federal, and federally backed, credit demands for spiraling interest rates and volatile financial markets.

But although the credit budget, as well as the spending budget, has grown rapidly over recent years this description of federal market participation is misleading.

The major reason for a sharp increase in the federal share in credit markets last year was not so much that the government suddenly stepped up demand for funds, but that private credit demands shrank, rather than growing substantially as usual.

The credit crunch triggered last spring by the Federal Reserve Board's tight money policies deterred private borrowers as it was supposed to. Meanwhile, the public sector kept on borrowing to fund both spending and loan programs. Since federal spending goes up and receipts drop automatically with recession, the budget deficit swelled once the economy slowed last summer. The inevitable, but not terribly significant result: the federal share in the credit markets rose.

Even so, it did not exceed the previous record share, 39 percent in 1976. The pattern of federal participation in credit markets is typically uneven and volatile. In 1971 just over a quarter of all funds raised under federal auspices.

After drifting down gradually for three years, the federal share suddenly plummeted in 1974 to 12.6 percent. In that year the federal government borrowed only $3 billion directly from the public through the sale of Treasury securities in the markets; the budget deficit was less that $5 billion.

But the deep recession of the mid-1970s, after the first explosion of oil prices, sent the deficit, and thus the federal share of credit markets, soaring again.

Just as the ordinary budget tends to go up in times of recession, so does the credit budget. This term covers all the loans and loan guarantees made by the federal government and federal agencies. Last year, for example, mortgages backed by the Federal Housing Administration accounted for about one-fifth of the new mortgage market, double their usual share.

Members of the Reagan administration have charged that the existence of federal credit programs creates unwanted distortions in financial markets, and thus in the allocation of credit in the economy. Stockman, in testimony before the Senate Appropriations Committee last month, said, "explosive federal credit demands have had a debilitating effect on investment and economic growth."

He went on: "Hundreds of billions of dollars of scarce productive resources have been removed from the private sector to be used by the considerably less efficient and less productive government sector." Of course, the government sector does not keep the money for itself; in the case of the credit budget it lends it to private individuals or organizations.

It is, naturally, true that if the federal government tries to make it easier for some to borrow than others, and it is successful in doing so, then it changes the allocation of credit resources. In its tax, spending and regulatory policies government also influences who gets how much.

But government borrowing and lending is unlikely to alter the overall supply of credit, a budget economist who specializes in this area believes. Nor is it likely to have much of an effect, and then only in the long term, on productivity or inflation. The impact that it does have will come if the government's choice of where to encourage funds to go is worse than that of the markets.

Stockman has reserved special criticism for a somewhat mysterious entity, employing only a handful of people, called the Federal Financing Bank. this was set up in 1974 as a financing agent for various federal agencies, which at that time raised money individually in private markets for some of their lending activities.

Rather than floating their own bonds, the TVA or the Rural Electrification Administration can borrow from the FBB funds which have been raised by the Treasury.

This is cheaper for two reasons. Interest rates on Treasury securities are below those of less well known,, more specialized bonds, such a TVA's, even if the latter are backed by the government. And the individual agencies no longer need to hire specialized financial staffs to issue their debt.

As the FFB was intended to be just a neutral financing agent, it was set up as an "off-budget" government-owned corporation. Its transactions were not intended to affect federal outlays, whether for loans or spending. They were just supposed to reduce the costs of already approved activities.

It is, however, possible for federal agencies to route borrowings through the FFB so that they do not show up in the unified budget totals, even though federal outlays are incurred.

As well as buying agency debt, the FFB refinances some loans made by agencies, and pays out on others that are guaranteed. For example, if the Farmers Home Administration makes a loan for a rural project which is to be paid off over 10 years, it can then sell it to the FFB and get immediate cash.

The sale to the FFB counts as increasing the agency income, just as if it had sold the loan to the public. It thus reduces the net outlays recorded by the agency, while raising those of the FFB. If the agency is on-budget, then the cost of the loan is switched off-budget.

Loan guarantees do not show up as on-budget costs, unless the borrower defaults and the agency which made the guarantee has to pay up. But if they are financed by the FFB then they do involve federal funds with an initial outlay financed via the FFB by the Treasury, followed by subsequent repayments.

Hence Stockman's label of the bank as a "gigantic fiscal laundry." He warned the new administration would "restructure [its] activities very severely. . . . It has no capital, no resources of its own" and it adds to the credit absorption of the federal government, he said.

But attacking the FFB is in large part like shooting the messenger bearing bad news, some economists believe. If federal agencies are going to borrow money it makes sense to coordinate, and cut the costs, of this borrowing, they say. If the government wants to encourage some borrowers, then why not help them to borrow as cheaply as possible, through the Treasury? t

And to the extent that federal agencies make concessional loans, or back particular borrowers with a federal guarnatee, it is this which has an effect on credit allocation and not the operations of the FFB.

There is nevertheless a serious question of congressional control, or lack of control, over credit programs. It is generally easier to win approval for a loan or loan guarantee program than for a spending program, largely because there is much less budget scrutiney. It obviously does not cost the federal government as much to make a loan as it does to give an equal cash grant, but it is possible that a smaller grant will be just as effective in some cases as loan assistance.

The Congressional Budget Office and the Carter administration looked at various ways of rationalizing the credit budget. The new treasury secretary has said he sees no reason for preserving the on-, off-budget distinction, and if all demands on federal funds were considered together there may be a rationalization of the use of loan programs.

Housing has been the overwhelming beneficiary of existing credit programs. Utilities and agriculture have also had a lot of help, with much less going to industry, CBO experts say. Congress, of course, chose this bias in the first place by supporting mortgage insurance, TVA, the Farmers Home Administration and so on. But it might choose to change it, or at least to make some loans on less generous terms, if the programs came under regular scrutiny.

But even if this happens there is no simple rule about good credit and bad credit. There is a spectrm in America today between public and private credit, rather than a dichotomy. Penn Central went bust, and the Treasury picked up the tab. Chrysler, and presumably other very large private sector companies, are to some extent guaranteed by the government, in fact if not in theory. And free market advocates in the White House or not, Congress is unlikely to give up "interfering" in credit allocation.