The state treasurer shall identify and allocate to the general fund all earnings, including realized and unrealized gains and losses, from the investment of all accounts or funds in his custody unless the allocation of the earnings is:

A. otherwise provided by law;

B. prohibited by federal law creating the fund or the account or by specific court order; or

C. from the investment of a permanent fund and the use of the interest and income from the fund is restricted by constitutional or statutory provisions to particular purposes.