I don't really want to go down the conspiracy theory rabbit hole of who does what at the Fed but it's main decision makers are government appointees, it was established by an act of Congress, and it remits its profits to the Treasury.
Ginnie Mae is part of the government as well (also mortgages). Fannie/Freddie are GSE's but currently under directly government control since the financial crisis.
I'm not sure how the accounting works, but they are somewhat autonomous and have their own balance sheets.
The interaction of the accounting rules and the new tax plan was fascinating too because the value of their deferred tax asset changed:
> “A reduction in corporate tax rates would require us to measure our net deferred tax asset using the new rate in the period in which the rate change is enacted, resulting in a one-time charge through the tax provision in the period the tax rate was changed, ...”
Ginnie Mae is part of the government as well (also mortgages). Fannie/Freddie are GSE's but currently under directly government control since the financial crisis.
I'm not sure how the accounting works, but they are somewhat autonomous and have their own balance sheets.