Several major banks today raised the interest they charge brokers for overnight loans to 20 1/2% percent, only a day or two after they had lowered their so-called broker loan rate.

Often an increase in the broker loan rate is a prelude to increases in other interest rates, such as the prime lending rate, but analysts said today's increases at Citibank, Morgan Guaranty and Chemical should not be considered a harbinger of increases in other bank lending rates.

William Sullivan, vice president of the Bank of New York, said today's increases reflect a sudden sharp increase in the so-called federal funds rate, the interest banks charge each other for overnight loans of excess reserves and an interest rate the Federal Reserve Board can control, as well as heavy year-end borrowing on the part of brokerage firms.

But the increase in rates has been confined almost totally to the federal funds market, while other short-term interest rates have fallen substantially in the last two weeks, reflecting in large part a decline in demand for funds on the part of corporations due to the increasingly sluggish economy.

"I think the next change in the prime rate will be a decline," said one major New York banker. The prime lending rate is the interest banks charge their best corporate customers for a short-term loan. Most major banks post a prime lending rate of 21 1/2 percent, although several, including Chemical and Chase Manhattan have a 20 1/2 percent prime rate, and American National in Chicago lowered its prime rate to 20 percent Monday.

Analysts said that open-market interest rates, with the exception of the federal funds rate, have not risen in recent days and are sharply below the peaks they reached two weeks ago.

For example, according to Bank of New York's Sullivan, the interest on 90-day certificates of deposit, one of the main sources of bank funding, closed at 17.05 percent today, down slightly from Monday's close and well below the 21.15 percent banks had to pay on Dec. 12.

He said the federal funds rate has risen sharply in the last day and a half because of the Federal Reserve has reduced the funds available in the banking system after an excess of bank reserves built up last week. The decline in bank reserves is occurring at the same time demand for overnight credit is increasing because banks need federal funds to lend to their brokerage firm clients. Brokers usually borrow heavily near the end of the year as both the firms themselves and their clients make last-minute adjustments in their portfolios for tax and other reasons.

While banks fund their loans to businesses and corporations by issuing securities such as 90-day certificates of deposit, they traditionally come up with funds for brokers by borrowing money for a day in the federal funds market. That is because brokers generally borrow overnight the money they need to finance their inventories of securities as well as the securities their customers carry on credit. "A broker might borrow $300 million today and tomorrow might only need $200 million," Sullican said. "A bank wouldn't want to borrow money for 90 days to fund overnight loans."

Most banks did not lower their broker loan rate below 20 1/2 percent, it lowered the broker rate to 20 percent .Morgan Guaranty lowered its broker rate to 20 percent Monday, as well, while Citibank last Friday lowered the broker loan rate to 19 1/2 percent.

"It appears that the broker loan rate is much more flexible than it used to be," said one analyst. "No one wants to lose anything on any kind of loan if it can be avoided."