WASHINGTON — Mortgage finance giant Fannie Mae shook up its executive ranks Wednesday, after shares in it and sibling company Freddie Mac rose for a third straight day as investors appeared less certain a government bailout of the two companies is imminent.

Fannie Mae, the largest buyer and backer of U.S. home mortgages, said its chief financial officer and two other top executives are leaving the company. Three current executives were promoted to replace them.

Fannie Chairman Stephen B. Ashley said in a statement that board members remain "firmly committed" to Chief Executive Daniel Mudd.

Mudd was elevated to the top post in December 2004 when former CEO Franklin Raines and chief financial officer Timothy Howard were swept out of office in an accounting scandal.

Fannie and Freddie saw their stock prices plummet last week as fears mounted they would soon need government support and that any bailout would leave stockholders in the lurch. The government-sponsored companies hold or guarantee half the U.S. mortgage debt and are considered crucial to the mortgage market's continued operation.

Fannie Mae said CFO Stephen Swad, who joined the company last year from Internet company AOL LLC, is leaving to "pursue other opportunities." He is being replaced by David C. Hisey, formerly Fannie's senior vice president and controller.

Peter Niculescu, formerly head of the company's capital markets business, was named chief business officer, replacing the retiring Robert J. Levin.

Michael Shaw, formerly a senior vice president for credit risk oversight, is taking over as chief risk officer for Enrico Dallavecchia, who is also leaving the company "to pursue other opportunities in finance and risk management."