A steady drumbeat of negative headlines out of Brazil has painted a picture of a country in chaos. The economy is in recession. Inflation is nearing 10%. The state’s oil company Petrobras, is mired in a corruption investigation. Perhaps most startling of all, Brazil’s political system has been rocked by numerous corruption scandals topped off by the impeachment of President Dilma Rousseff, who has been suspended from office pending the outcome of her trial.

Yet amid the chaos there is optimism for a few reasons. For one, Brazil is facing its problems head on. A popular call for accountability in government is being taken seriously. The country is also likely to liberalize key sectors such as oil and gas and mineral extraction in a move to become more open to the global economic market. For another, Brazil remains Latin America’s largest economy and the strides it has made over the past decade or so, including reducing the proportion of people living in poverty from 17.3% in 2006 to 7.4% in 2014, are inspiring.

From such optimism comes opportunity. While significant challenges remain on the road to recovery in Brazil, the combination of underpriced assets coupled with an anticipated business-friendly administration make many of the country’s sectors attractive for investors. As shown in the infographic below, the timing is right—with a dash of caution—for investment in four diamonds in the rough: agriculture, education, real estate, and energy.

Click here to view image