Selecting Investment Portfolios With AI

Artificial intelligence (AI) allows us to find the best solutions to defend us from the high volatility in energy prices and improve the performance of energy portfolios

Cómo la IA puede ayudar a seleccionar portafolios de inversión óptimos

Artificial intelligence (AI) and machine learning allow us to make better investment behavior estimates. For example, predictions can be made about the future level of energy prices, which will serve to find the best solutions to protect us from risk or improve the performance of investment portfolios.

The invasion of Ukraine and the sanctions imposed on Russia have caused a general increase in energy prices, together with the prospect of episodes of high volatility. In this context, building an optimal portfolio in energy assets becomes highly relevant for investors.

How could, for example, oil company stocks, crude oil or natural gas positions be combined with oil and gas futures to obtain solutions that will minimize the risk of the total position? Or how could the best risk-return profiles be achieved?

How to measure risk

Instead of measuring risk in the traditional way, such as the variance or standard deviation of returns, coherent measures can be used, a technical term for measures that represent risk adequately. Additionally, numerical methods can be developed that add granularity and extreme values ​​to the historical data sample considered.

With these estimates and through the use of optimization algorithms, we can obtain hedging solutions that minimize the position risk, comparing the solutions obtained with all risk measures, both conventional and coherent. Moreover, the use of algorithms is extended to find efficient portfolios for each of the proposed risk measures.

The strength of history

A core element of these methodologies is the assumption that some of the features of the historical data will be kept—be they expected returns, volatilities, correlations, or forms of distribution—and that the elements described beforehand will remain the same in the near future for which we want to make predictions, enabling us to find solutions that are useful for that point in time.

Even though there are statistical methods for making predictions, their usefulness is subject to the assumptions used being fulfilled in the future and to the data distribution not being altered or separated from certain known families. In contrast, AI makes it possible to overcome this problem.

A successful new approach

Using machine learning and, in particular, neural networks –both AI tools– a computer model can be trained with real historical data and its predictions contrasted with other real data. In this way, with the difference between what is predicted and what is observed, the model can be adjusted to ensure that the final differences are minimal. All of this can be achieved without having to program the computer step by step. Once the final model has been completed, we feed it with new data or future data estimations and the model returns the best prediction of our variable of interest.

Take, for example, the price of WTI oil. If we want to predict the price of this marker for the coming months, we can create a model using the historical series of crude oil prices together with the data series of economic, financial, political-social variables, among others.

Such data – for example, from the last 20 years – can be divided into two groups: the first with data from the first 15 years and the second with data from the last five years. We can train the model with the data from the first 15 years and use its predictions to compare the oil price levels for the final 5 years. In addition, with the initial differences returned, the model can be programmed to adjust its parameters (with the help of a supervisor), ultimately achieving a model whose predictions are as close as possible to what actually happened.

Once we have obtained this calibrated model, it can be fed with the economic and financial data estimations for the following months, enabling the model to predict the price of WTI oil for that same period.

The artificial intelligence methodology used to estimate the future price of WTI can also be applied to estimate future price volatility and other associated risk measures. These predictions are fed into the optimization models to find the best investment or hedging solutions.

An army at our service

Machine learning is the same as having an army of analysts at our disposal, executing, almost simultaneously, different methods to solve a problem and, for each of those methods, testing multiple solutions until they find the best one. In the cases we have presented, these virtual analysts’ work is supervised by a person. Furthermore, by using the parallel process, several armies can be brought together to address the same problem, even from remote locations.

The content of this article is based on a chapter we wrote about the hedging and optimization of energy asset portfolios, included in the book Data Analytics Applications in Emerging Markets (Springer 2022).

The authors are Associate Professor at EGADE Business School (Roberto R. Barrera Rivera) and private consultant an former professor at EGADE Business School (Humberto Valencia-Herrera).

Article originally published in Alto Nivel.

Go to research
EGADE Ideas
in your inbox