Gains from its investment portfolio should help offset weaknesses in its railroad and insurance businesses.