Investors Savings Bank of Richmond was flying high last year during the go-go days of relatively low interest rates, a high volume of new mortgage loans and a rush of refinancings.

Then the savings and loan's profits crashed this spring when one of its mortgage lending operations lost almost $19 million in its second quarter. Overall, the S&L lost $9.7 million for the quarter, compared to a $3.7 million profit the year before.

The reason: a sudden rise in interest rates.

"We gave everything back that we had made" in the past year, said Tom Crump, chief financial officer of the S&L, which has six mortgage offices in the Washington suburbs.

Investors Savings Bank was not alone, according to earnings statements now being released by Washington area lenders. The sudden swings in interest rates this year have demonstrated that mortgage lending still is a volatile, risky business -- cutting profits and even forcing sizable losses at some Washington area savings and loan institutions.

"Some folks made tremendous amounts of money last year," said Christopher W. Burch, executive vice president of the United Savings Bank of Vienna. But in the same business this year, he said, "they are losing money."

Since the early 1980s, when many S&Ls were awash in red ink, the industry has developed a number of tools to protect itself from interest rate swings. For example, S&Ls now sell most of their residential mortgage loans to other investors or institutions -- thus freeing up their cash and allowing them to adjust more quickly to changing interest rates.

Nonetheless, the sudden increase in interest rates last spring caught S&Ls off guard, as the value of some of their existing loans rapidly eroded. Particularly hurt were those lenders that gambled on a further decline in rates. At the same time, as higher interest rates scared off home buyers, mortgage lenders faced a sharp reduction in the fees they received for making mortgage loans.

As a result, S&L profits are suffering, and some lenders have been forced to lay off 10 percent or more of the sizable staffs they built up during last year's lending boom.

"It has been a tough year," said Warren Lasko, executive vice president of the Mortgage Bankers Association of America. Not only did many institutions get hurt last spring when rates rose, but they have also suffered in the past few weeks as interest rates fell and borrowers delayed closing their loans, he said.

Despite the improvements in their armor against interest rate risks, some lenders still can get caught if they fail to protect themselves in an attempt to stretch for more profits, according to Thomas Owen, chairman of Perpetual Savings Bank of Alexandria. And There also are other ways S&Ls can be vulnerable, S&L officials say.

Some lenders, including Investors Savings Bank, were caught when they agreed to lend millions of dollars at a designated interest rate -- only to have market interest rates rise sharply before the loan was closed or resold. Investors Savings Bank alone lost $18.7 million when it was caught with lower-interest-rate loans.

For example, if a lender commits to a $100,000 mortgage loan at 9 percent with a loan origination fee of $2,000, the loan can easily be resold for its full value if interest rates remain stable. In that case, the mortgage banking unit can keep all of the $2,000 fee.

However, if interest rates rise, the loan can be sold only at less than full value, cutting into the $2,000 fee. In simplest of terms, an increase of a mere one-quarter percentage point can wipe out the profit, and a larger increase could cause thousands of dollars of losses.

Mortgage bankers can almost eliminate this risk by getting agreements in advance from investors or other institutions to buy those loans being processed. Those agreements can lock in the S&Ls' profits, but they carry a fee and can prevent the S&L from making an even bigger profit should interest rates go down.

Investors Savings Bank, for example, had agreements for the resale of only 30 to 35 percent of its loan commitments when interest rates rose in April, Crump said. That left it vulnerable to losses on millions of dollars of loans. "We weren't expecting the rates to rise," Crump said.

Similarly, profits at CFS Financial Corp., the parent of Continental Federal Savings Bank, which has 25 banking offices in Northern Virginia, fell dramatically during its latest quarter to $16,000, compared with $1.3 million for the same period last year. Most of the decline was attributed to losses at First Southern Mortgage Corp., which is owned jointly by CFS and Fedstar Savings Bank.

First Southern's losses were largely a result of having to reduce the value of its loan portfolio after interest rates rose, according to CFS President Allan R. Plumley Jr., who declined to explain why First Southern had to mark down the value of its loans.

Another factor that leaves the S&Ls vulnerable is the increasingly large portion of S&L income that comes from loan fees, commonly called points, that are paid when a loan is closed.

With the interest rate increases this year, the volume of loans and fees fell sharply, catching some institutions with high overhead costs in the form of a growing number of mortgage lending branches and employes. For at least a while, profits were hurt as expenses offset the reduced fee income.

The 50 percent decline in profits during the quarter ending Sept. 30 at Dominion Federal Savings & Loan Association, for example, was largely attributed to lower loan fee income and fewer loans being resold. Through attrition and the layoff of about 40 employes, the S&L cut its mortgage lending work force by 10 percent to 12 percent, according to David Erickson, senior executive vice president of the McLean-based S&L.

"As long as you can continue to feed the pipeline with loans" everything is all right, Erickson said. But when the volume falls off, the institution has no choice but to cut staffing, he said. "That's tough from a human standpoint."

William H. Savage, president of Annandale's Ameribanc Investors Group, which owns Ameribanc Savings Bank, said monthly loan originations recently have fallen as much as 50 percent below the peak periods in the past year. In its third quarter, Ameribanc laid off 21 of the 150 staff members in its mortgage lending units and canceled plans to open new lending offices in Annapolis and Rockville, he said. Ameribanc also consolidated its Fair Oaks office into the Annandale headquarters.

Other lenders have reported problems that have little connection to this year's interest rate swings.

McLean Savings & Loan Association reported a $7.5 million loss -- mostly from its mortgage banking subsidiary -- at the end of its 1987 fiscal year. McLean sold the subsidiary in August, shortly before the mortgage banking operation sought protection from creditors in a Chapter 11 bankruptcy filing.

McLean said most of the losses were a result of losses from troubled real estate loans in Texas, which has been hit by the depressed oil economy, and the costs of defending numerous lawsuits.

United Savings Bank's profits also suffered, because it wrote off $3.1 million in commercial loans to a Texas businessman. Burch said the businessman has filed for bankruptcy and the S&L still is trying to collect the debt.

Even those S&L executives who weathered this year's interest rate swings said they are cautious about what interest rate risks are ahead.

And Mark Obrinfky, an economist with the U.S. League of Financial Institutions, said, "We are always going to be somewhat vulnerable to rising interest rates."