Forecasting energy markets using support vector machines