Anglo American was whacked by 4.6bn dollars-worth of impairments in 2012, while underlying earnings took a hit from falling commodity prices, ongoing cost pressures and a loss-making platinum business.However, with expectations low coming into the results announcement, the company was able to beat forecasts, leading shares to rise on Friday morning. The stock was up 1.61% at 2,045.5p by 10:47.The company swung into the red in the 12 months to December 31st, recording a loss before tax of $239m, compared with a profit of $10,782m the year before. The firm took an impairment worth $4.0bn (post-tax) in relation to its Brazilian Minas-Rio project, which was found to need $8.8bn more in capital expenditure after a detailed cost and schedule review.Chief Executive Cynthia Carroll said: "Despite the difficulties we have faced that have caused a significant increase in capital expenditure, we continue to be confident of the medium and long term attractiveness and strategic positioning of Minas-Rio and we remain committed to the project. "The first phase of the project will begin its ramp-up at the end of 2014, with operating costs expected to be highly competitive in the first quartile of the FOB cash cost curve, generating significant free cashflow for many decades to come."Meanwhile, a number of platinum projects that were said to be "uneconomical" resulted in a further $0.6bn of impairments. Last month, the company proposed a major restructuring plan at is South African platinum division, Amplats, which was hit by strikes and falling prices in 2012. The shake-up would see the company close down some mines and consolidate certain assets, a move that would affect 14,000 jobs.On an underlying basis, group earnings dropped by 54% from $6,120m to $2,839m. Underlying earnings per share fell from $5.06 to $2.26.Meanwhile, revenues decreased by 10% from $36,548m to $32,785m as the company said that there was a decline in realised prices across the majority of commodities it produced.Cautious optimismDespite the gloomy 2012 results, the company's outlook statement was a little more upbeat, as Carroll highlighted "a degree of renewed optimism to the economic prospects".She said that while economies in Europe and Japan remain weak, "recent policy changes ought to stimulate growth in 2013"."Alongside a continuing recovery in the US, we expect robust growth in the major emerging economies - especially China and India - as they benefit from continuing urbanisation. Rising living standards and an expanding middle class should support demand for our products across our diversified mix."The company raised its final dividend per share (DPS) by 15% to 53 cents, bringing the total DPS to 85 cents, also up 15% year-on-year."Worst is now over"Even including the impact of strikes in South Africa during the second half, analysts at Jefferies said that underlying earnings still beat consensus estimates, helped by better-than-forecast results in iron ore, metallurgical coal and thermal coal. "We believe the market's expectations for Anglo were low coming into earnings, and we expect this morning's results to lead to near-term outperformance for Anglo American shares."The broker added: "While we have been concerned about structural cost pressures in South Africa, operational challenges in most of Anglo's businesses, and the risk of further delays and capex overruns at the company's Minas Rio iron ore project, it is possible that the worst is now over for Anglo American, and we are becoming more positive on Anglo shares."Meanwhile, the broker said that incoming Chief Executive Officer Mark Cutifani would likely look for opportunities to create value at Anglo, "and there is a possibility that the merged Glenstrata attempts to acquire the company at some point."While Jefferies has maintained its 'hold' rating for the shares in a research report on Friday morning, the broker said that it sees upside risk to its 2,050p target price.