energy trading framework