High interest rates on residential mortgages can be expected to continue through the rest of this year, according to government housing economists and the banking community. Yet there will be little shortage of funds available for lending.

Most of those surveyed feel that mortgage rates, now at record levels, either already have packed or nearly have peaked. They look for rates to decline no more than a quarter to a half point by year end at most, but expect them to go down in the first half of 1979. Some decrease in demand also is predicted.

One of the more closely watched indices of mortgage costs is the biweekly auction of the Federal Nation Mortgage Association, the quasigovernmental secondary mortgage market maker. Yields on conventional loans rose steadily from October 1977 until July of this year. The first meaningful downturn occurred on Aug. 7 when the rate for four-month commitments dipped to 10.150 percent from its record high of 10.205 percent. This past week, it dropped to 10.019 percent on conventionals and 9.778 on government-backed FHA and VA loans. (Commitments for future mortgage loans to buy new single-family homes are considered an indication of what mortgage bankers think rates will be in the market four months hence.)

In June, Fannie Mae economists forecast that conventional mortgage rates would be at 10.15 percent by the end of the third quarter and 9.95 percent by the end of the year. They predict the first two quarters of 1979 will see a continued reduction to a low of 9.80 percent, with a return to a 10 percent centanticipated by the end of next year. On FHA-VA home loans, the rates areexpected to top at 10.00 percent by the end of this quarter and then dip to a low of 9.65 percent next winter.

Six-month commitments for conventional loans by the Federal Home Loan Mortgage Corp. declined from 9.903 percent in May to 9.692 percent in August. (Freddie Mac's commitments are for loans with a 75 percent loan-to-value ratio, instead of Fannie Mae's 90 percent, so the rates are lower.) Because this subsidiary of the Federal Home Loan Bank Board turns around and sells its mortgage-backed securities in the capital markets, May, yields are a good indication of what the market anticipates in November.

Actual interest rates set a record in August, according to the bank board. Average effective rates on conventional loans for new homes rose to 9.69 percent; for existing homes, these rates went up to 9.77 percent. In Washington, the effective rates were higher: 9.80 percent for new and 9.86 percent for existing. A dozen cities from Columbus to Seattle reported granting mortgages above 10 percent on existing homes.

California, the nation's largest mortgage market, was the first to reach 10 percent and the first to begin cutting rates. In mid-August, prior to the Federal Reserve's tightening of credit, several savings and loan associations in that state dropped the interest on home loans to 9.75 percent because of slackened demand. A single Chicago S&L followed suit, but there has been no rush in the rest of the country to imitate California. Mortgage bankers are reported to be waiting to see if the slackening is the normal seasonal lag during the summer months or the start of a real downturn.

Even though mortgage money remains expensive, it isn't scarce as it was earlier in the year. Savings and loan associations suffered some disintermediation then as customers withdrew their funds to invest them at higher interest rates elsewhere, as in Treasury bills for example. Deposits were down 40 percent from the previous year. Associations borrowed heavily from the bank system. In the first half of 1978, loans were increased by $5 billion, and plans call for another $6 billion by year end, a doubling of advances since mid-1977. It also eased liquidity requirements.

Fannie Mae almost doubled its commitments in the first half of the year, and purchases of mortgages rose to $7 billion from $2.9 billion in 1977. Freddie Mac raised its 1978 commitment goal to $7.5 billion, $2 billion more than the previous year.

Despite government funds and penalties against holders of long-term certificates of deposit for cashing them prematurely - sageguards that largely were nonexistent during the mortgage crunch of 1974 - money still became scarce in late spring and early summer when financial institutions had to make good on prior commitments.

Several Washington S&Ls reported their savings flows were in the red in July or just breaking even. Another local problem was momentary uncertainty over extending the District's rate ceiling to 11 percent. Numbers at lenders began restricting loans to customers with savings accounts. Perpetual Federal Savings and Loan, the area's largest lender, even had a recorded telephone message giving out the bad news in July.

To stem the tide, the Federal Home Loan Bank Board and the Federal Reserve created a new savings instrument, called the money market certificate because its flexible yield is pegged to six-month Treasury bill rates. During June and July, savers bought $5.5 billion of the new certificates; approximately 42 percent of that was new money, funds they otherwise would have placed in other investments. As a result, the net savings inflow in July increased 62 percent from June, although the July total was still down 28 percent from a year earlier.

Other recently introduced methods of increasing availability of funds for mortgage loans include the issuance of mortgage-based pass-through securities, begun by the Bank of America, and the issuance of tax-exempt mortgage revenue bonds by municipalities, led by Chicago.

Ralph S. Childs, president of the Metropolitan Washington Savings and Loan League, remarked, "Four months ago, I saw a complete cutoff of funds." He now believes money will continue to be available in the Washington area, although almost exclusively for owner-occupied residences. Loans for rental and commercial properties will be less plentiful. Funds will be more available in the District than in Maryland, which has a 10 percent interest rate ceiling and allows no points.

Childs, who is also president of Home Federal Savings and Loan, foresees no rates below 9.75 percent in the District before the end of the year, California's action notwithstanding. In that state, he explained, S&Ls experienced a better savings flow than anticipated. Moreover, California, in common with many other states, can charge three or four points on a loan with the result that face rate is reduced but the yield is still high. Finally, due to the prevalence of variable-rate mortgages, some lenders have been able to reduce rates on new loans while rising them on older ones. However, Thomas R. Harter, chief economist for the Mortgage Bankers Association, cautioned that recent and possible future tightening of credit by the Fed could dissuade other institutions from following California's example.