Petrobras shares close up almost 10pc on strong Q2 earnings