Fannie Mae and Freddie Mac can keep future earnings in line with agreement between Treasury and regulators