Gains for miners and energy companies courtesy of rising commodity prices have helped the ASX close higher and recover from a grim economic forecast.

Gains for miners and energy companies courtesy of rising commodity prices have helped the ASX close higher and recover from a grim economic forecast.