Angel Oak Mortgage REIT posted a $3.4 million profit in the second quarter after taking a $7.4 million loss in the first quarter.