National Bank of Washington reported yesterday that its profits rose nearly 90 percent between the fourth quarter of 1981 and the fourth quarter of 1982, as the bank shed many of its problem loans and improved the spread between the interest it pays for deposits and the interest it receives on its loans and other assets.

Also yesterday, Federal National Mortgage Association, a major purchaser of home loans in the secondary housing market, said that it recorded a net loss of $104.9 million last year, down substantially from 1981's loss of $190.4 million, officials said.

NBW Chairman Luther H. Hodges Jr. said earnings were $1.5 million ($1.08 a share) in the last three months of 1982 compared with $787,000 (58 cents) in the final three months of 1981.

For the year as a whole, National Bank of Washington had net income after securities losses of $3 million ($2.19) compared with $2.6 million ($1.90) in 1981.

The bank sold off about $20 million in low-yielding securities during the second quarter, taking a $1 million loss, in order to invest the funds more profitably. Before securities losses, the bank earned $4 million ($2.94) in 1982.

The bank sold no securities from its investment portfolio in 1981 or in the final quarter of 1982.

The bank has had earnings problems for the past several years as a result of bad loans (many of them to insiders) and low-yielding investments made by prior management. The bank is under a special agreement with the comptroller of the currency that isolates day-to-day control from the United Mine Worlers Unions, which controls 76 percent of the bank's stock. The comptroller installed new management, including Hodges, in late 1980.

Hodges said that NBW has reduced the loans it has had to write off as uncollectible from 0.65 percent of its portfolio in 1981 to 0.43 percent last year. He said nearly half the loans written off last year dated to the insider loan scandal that rocked the bank in 1979 and 1980.

Most of Fannie Mae's 1982 loss--about $86 million--occurred in the first half of the year, and the final quarter showed a loss of just $5.7 million compared with losses of $70.7 million in the corresponding period of 1981, according to a report from the association.

"The 1982 results provide dramatic evidence of the extraordinary progress we have made in just 18 months since new management took charge at Fannie Mae," the report quoted David Maxwell, chairman and chief executive officer, as saying.

Like such primary lenders as savings and loans, Fannie Mae was hurt badly by high interest rates in 1981 and early 1982. But Maxwell said the diminished losses were due more to the association's actions--such as those to increase income from fees--than to the recent decline in rates.