This paper focuses on forecasting quarterly energy prices of commodities, such as oil, gas and coal, using the Global VAR dataset proposed by Mohaddes and Raissi (2018). This dataset includes a number of potentially informative quarterly macroeconomic variables for the 33 largest economies, overall accounting for more than 80% of the global GDP. To deal with the information on this large database, we apply a dynamic factor model based on a penalized maximum likelihood approach that allows to shrink parameters to zero and to estimate sparse factor loadings. The estimated latent factors show considerable sparsity and heterogeneity in the selected loadings across variables. When the model is extended to predict energy commodity prices up to four periods ahead, results indicate larger predictability relative to the benchmark random walk model for 1-quarter ahead for all energy commodities. In our application, the largest improvement in terms of prediction accuracy is observed when predicting gas prices from 1 to 4 quarters ahead.