Thanks to lower interest rates, the Federal National Mortgage Association seems to have survived two years of financial crises and may be able to report at least one profitable quarter before the end of 1983.

As interest rates have fallen, a new management team, installed in 1981, has restructured FNMA's balance sheet, emphasized raising fee income and built a corporate culture intently focused on the bottom line.

FNMA, known as Fannie Mae, was pushed to what Chairman David O. Maxwell recently called "a fearful precipice" when interest rates began skyrocketing three years ago.

As recently as 1978, the government-chartered mortgage company reported $209 million in annual earnings and could look back on eight consecutive profitable years.

But the outlook for Fannie Mae began to darken in early 1980 when Wall Street investors were turning their backs on the corporation's investment vehicles. In 1981, Fannie Mae reported a net loss of more than $190 million. "The risks were very real ones," Maxwell said. "At some point the market would have lost confidence in us if our losses were not arrested.

"If we couldn't have stopped that flow, the market might have finally gotten to the point where they would have said 'no more.' It would be possible for Fannie Mae to go under and we were headed in that direction in 1981," he said. "We would not have been permitted to go under, but the problem would have been explosive."

But the tide, at least, seems to have turned. Although Fannie Mae lost nearly $105 million in 1982, its profit performance has improved in each of the last five quarters. From a 1981 fourth-quarter loss of $70.7 million, Fannie Mae cut its loss to $5.7 million for the last three-month period in 1982, and officials are cautiously predicting a profitable quarter before the year's close.

"I believe that if the rate environment is favorable, the company can report a positive quarter this year," Maxwell said. "We've got a good shot at making money this year."

Wall Street, though to a certain extent enamored with Fannie Mae simply as an "interest rate play," a beneficiary of falling interest rates last year, took a fancy to its stock. Its per share price rose from 7 1/8 at the beginning of last year to a point as high as 27 1/4 late last year. Now the stock is trading in the low 20s.

Based in plush quarters on upper Wisconsin Avenue, Fannie Mae is an odd product of a public-sector past and a private-sector structure. Created in 1938 by the government and jettisoned into the private sector only 13 years ago, it is today federally chartered and shareholder-owned and is the nation's largest single supplier of home mortgage funds.

Today, measured by on assets, Fannie Mae is the nation's sixth largest corporation, its position healthier. The mood among top Fannie Mae officials is upbeat and unequivocally oriented away from the staid, service-oriented managements of the past.

"We are 100 percent committed to the bottom line but we don't think that implies we are not providing the kind of service necessary to support America's homeowners and financial institutions," Arthur Solomon, the association's chief financial officer, told financial analysts here recently. "There is a coincidence of interests.

"Fannie Mae is no longer run like an old savings and loan," Solomon said. "It is run today as an aggressive financial services company with the emphasis on matching the book as rapidly as we can and emphasizing fee income."

The Maxwell team has made a set of dramatic changes in the way Fannie Mae does business. For starters, Maxwell has replaced 14 of Fannie Mae's top 22 officers. "We had to get across to everybody that we were in dire straits," Maxwell said.

Secondly, the association's balance sheet was revised so that Fannie Mae was less dependent on dramatic interest rate swings. The pace of financing activity was intensified and Fannie Mae last year purchased more than $15 billion in mortgages, raising its market share from 6 to 17 percent. Meanwhile, in January, the pace of purchases quickened even further, Solomon said.

In 1980, Fannie Mae purchased nothing but fixed-rate loans primarily from mortgage bankers, and its spread, the margin between its lending and its borrowing rates, was a negative point and a half. Today, Fannie Mae's spread has fallen to a third that rate.

The percentage of its purchased loans in the long-term, fixed-rate mode fell to almost 32 percent last year. In addition, Fannie Mae stopped making firm mortgage commitments to lenders during mortgage auctions, a process which left it tied to mortgages at a certain percentage rate months before they were delivered to Fannie Mae.

As a result of that process, Fannie Mae frequently found itself committed to funding mortgages before they were delivered. The holder of the mortgage, a mortgage banker for instance, would, if the interest rate went up a point, keep that piece of the action, while Fannie Mae had to borrow at higher rates to support that purchase.

It's no longer done that way with Fannie Mae commitments to housing financiers limited generally to a 30-to-60-day window. And, even in those cases, Fannie Mae's borrowing rates to fund those purchases are not fixed until the commitments are made.

So too, Fannie Mae's market is a different one. Today more than half the mortgages it purchases are from commercial banks, thrifts or brokerage firms and Fannie Mae is aggressively purchasing mortgages of multifamily homes and those of some health-care facilities as well.

Finally, Fannie Mae management has put enormous emphasis on raising fees. Its fee income rose from $58.6 million in 1980 to $112.6 million in 1981 and then to almost $264 million last year.

The association's 14-month-old $16 billion mortgage-backed securities program, also includes a lucrative, built-in fee system. The money in that fund is put in pools and sold off in capital markets. As a part of that process, Fannie Mae charges a quarter point for guaranteeing interest and principal payments, what Solomon calls an "insurance-type annuity."

According to Solomon, that income, in effect a certainty, produced about $3 million in fees for Fannie Mae in December, meaning that regardless of the interest rate environment, Fannie Mae would appear to be assured of at least $36 million in fee income in 1982.

What's more, Fannnie Mae officials think they have further insulated their operations from interest-rate volatility by opening a "hedging" desk which is investing its funds in financial futures of various types. "Because T-bill and CD futures are very highly correlated with our short-term discount notes, we have been able to protect ourselves by taking opportunistic positions in futures markets," Solomon said.

With all that activity under his belt already, it appears Maxwell wants to further pick up the tempo. He has asked Congress for authority to get into the Eurobond market through an offshore subsidiary and he wants to see the Department of Housing and Urban Development's authority over Fannie Mae essentially limited to major policy decisions, freeing Fannie Mae to make quick, market-place decisions on new investment and sales opportunities.

Essentially, Maxwell is telling congressional committees and other audiences that in Fannie Mae's view, it is time to deregulate the secondary mortgage market just as the primary market has been freed of most rate restrictions. "Never again should FNMA be regarded as the subsidizer of any economic interest or as the servile instrument of an ever-changing national housing policy," he told an analysts' group here last month.

But the question remains open as to whether any sharp upturn in interest rates will put Fannie Mae into the same tight squeeze it found itself in two years ago.

"We hope that if the interest rates turned up, it would not be life threatening," Maxwell said, noting that in Fannie Mae's view, mortgage rates could fall by as much as another point and a half this year. "But the whole point of what we've done in getting new customers, putting out new products and revamping the balance side is exactly to survive any set of circumstances."