Transfer Entropy Approach for Portfolio Optimization: An Empirical Approach for CESEE Markets

In this paper, we deal with the possibility of using econophysics concepts in dynamic portfolio optimization. The main idea of the research is that combining different methodological aspects in portfolio selection can enhance portfolio performance over time. Using data on CESEE stock market indices, we model the dynamics of entropy transfers from one return series to others. In the second step, the results are utilized in simulating the portfolio strategies that take into account the previous results. Here, the main results indicate that using entropy transfers in portfolio construction and rebalancing has the potential to achieve better portfolio value over time when compared to benchmark strategies.


Introduction
Dynamic portfolio selection today represents at once a difficult and interesting task (Martínez-Vega et al. 2020). The literature about this issue is still growing, although the concepts of portfolio and diversification possibilities are not new. The bulk of the literature on dynamic optimization is great (Skaf and Boyd 2008). There exist different approaches and their combinations in predicting market dynamics regarding risk and/or return series. Applied methodologies depend on the research questions and some systematization of models and methods has been done in the past (Taylor and Allen 1992;Wallis 2011).
Over time, the availability of a great amount of data has allowed researchers to deepen the analysis of financial markets. In particular, the existence of big data attracted to the field of finance analysis statistical physicists. From this connection between statistical physics and finance, a new branch of literature was born, called econophysics. In particular, the different methods used by statistical physicists have the advantage of not requiring assumptions such as linearity, normality, or stationarity, allowing for different kinds of analysis.
In this paper, we use transfer entropy, a methodology originated from the information theory proposal of Shannon (1949), which in addition to the general advantage previously identified, gives us also the possibility of analyzing the directional relationship between variables. We focus the analysis on CESEE (Central, Eastern, and South-Eastern European) stock markets. The reasons why we focus on the CESEE markets are as follows. Firstly, recent research shows that these markets are still not that integrated with developed markets (Kamisli et al. 2015;Cevik et al. 2017). Then, both earlier works (Gilmore and McManus 2003) and newer ones (Golab et al. 2015) show that these markets still provide higher to analyse if X Granger-causes Y, making a similar process, in the case if F(y t |x t−1 , . . . , x t−k , y t−1 , . . . , y t−k ) = F(y t |y t−1 , . . . , y t−k ).
The original Granger causality is a very useful approach, although it is limited to the analysis of the linear relationship between variables, when it is known that financial markets are complex and suffer from several types of nonlinearities. In this context, the use of nonlinear approaches could be seen as crucial to deepen the analysis of financial markets, which is put into practice in this paper with the use of transfer entropy.
Proposed by Schreiber (2000), transfer entropy (TE) is based on the concept of entropy as an information measure presented by Shannon (1949), measuring the information flow from one variable to another. In particular, the transfer entropy from Y to X (TE Y→X (k, l)) is given by TE is a directional measure of dependence between two different variables and is easily generalized to measure the informational flow from X to Y, allowing us to obtain TE Y→X (k, l), which is helpful to estimate the dominant direction of the information flow between any pair of variables (Behrendt et al. 2019).
TE has a similar objective to Granger causality, although with the advantage of not measuring only linear relationships, besides being also a model-free measure, as is usual in other measures of information theory. To be calculated in the context of continuous data, TE implies the realization of discretization, which in this paper is made considering the relevance of the tails in the distributions, which normally are seen in financial data (see, for example, Jizba et al. 2012). The significance of the TE is tested according to the bootstrap method of Dimpfl and Peter (2013). The estimations of the TE and the computation of its statistical significance are made under the RTranferEntropy package from R software.
Besides transfer entropy, we also applied the calculation of transfer entropy (NET TE), given by NET TE YX = TE YX − TE XY , which identifies in pairs of assets which is the net influencer or the net influenced asset in the pair.
Regarding the data, we retrieved the data from Investing (2021) for 12 different stock markets: Bosnia, Bulgaria, Croatia, the Czech Republic, Greece, Hungary, Poland, Romania, Russia, Serbia, Slovakia, and Slovenia, from 1 June 2008 until 5 March 2021, in total 3188 observations. After the application of the log returns, we had a total of 3187 observations. The data refers to stock market indices, in index point values (for descriptive statistics, please see Appendix A, Table A1).

Preliminary Results
As previously mentioned, we started by calculating the transfer entropy between the different pairs of markets as well as the net transfer entropy, both with the sliding windows approach. In Figure 1 we can see the mean value of the different transfer entropy values between each market, considering the window length of 250 observations, while Figure 2 shows the mean of the net transfer entropy values.
Considering the information in Figure 1, it is possible to see that some markets were more affected than others. For example, Slovakian and Bosnian markets seemed to be less affected than others (the respective columns have, in general, lighter color). On the opposite side, Russian, Romanian, Serbian, and Slovenian seem to have been the most affected markets. Figure 2 presents the information about the net transfer entropy between the indices, indicating the net influence; making it possible to identify that Greece, the Czech Republic, and Poland were the biggest net influencers while Serbia, Slovenia, and Russia were the most net influenced indices. more affected than others. For example, Slovakian and Bosnian markets seemed to be less affected than others (the respective columns have, in general, lighter color). On the opposite side, Russian, Romanian, Serbian, and Slovenian seem to have been the most affected markets. Figure 2 presents the information about the net transfer entropy between the indices, indicating the net influence; making it possible to identify that Greece, the Czech Republic, and Poland were the biggest net influencers while Serbia, Slovenia, and Russia were the most net influenced indices.

Description of Simulated Strategies
Based on the values of net transfer entropy values (NTEV), several strategies were simulated. The pair-wise NTEV values between two indices were averaged over every month and the values were ranked in each month. The ranking varies depending on the strategy and is explained for each strategy in this section. Based on the rankings within each approach/strategy, the investor makes the decision about which indices enter or exit the portfolio in the next month. The criterion of entering or exiting the portfolio differs based on the strategy in place. The only common thing is that all of the countries that enter the portfolio have equal weights in it. Considering the information in Figure 1, it is possible to see that some markets were more affected than others. For example, Slovakian and Bosnian markets seemed to be less affected than others (the respective columns have, in general, lighter color). On the opposite side, Russian, Romanian, Serbian, and Slovenian seem to have been the most affected markets. Figure 2 presents the information about the net transfer entropy between the indices, indicating the net influence; making it possible to identify that Greece, the Czech Republic, and Poland were the biggest net influencers while Serbia, Slovenia, and Russia were the most net influenced indices.

Description of Simulated Strategies
Based on the values of net transfer entropy values (NTEV), several strategies were simulated. The pair-wise NTEV values between two indices were averaged over every month and the values were ranked in each month. The ranking varies depending on the strategy and is explained for each strategy in this section. Based on the rankings within each approach/strategy, the investor makes the decision about which indices enter or exit the portfolio in the next month. The criterion of entering or exiting the portfolio differs based on the strategy in place. The only common thing is that all of the countries that enter the portfolio have equal weights in it.

Description of Simulated Strategies
Based on the values of net transfer entropy values (NTEV), several strategies were simulated. The pair-wise NTEV values between two indices were averaged over every month and the values were ranked in each month. The ranking varies depending on the strategy and is explained for each strategy in this section. Based on the rankings within each approach/strategy, the investor makes the decision about which indices enter or exit the portfolio in the next month. The criterion of entering or exiting the portfolio differs based on the strategy in place. The only common thing is that all of the countries that enter the portfolio have equal weights in it.
As the first basic strategy (strategy_1), the idea is to obtain basic diversification possibilities, in terms of including those stock indices in the portfolio that have the least NTEV among them. Thus, the NTEV values are ranked from the lowest to the highest value. Those values that are closest to zero value are interpreted as the lowest NTEV among two-country indices. This means that shocks in one country's return series will spill to other series in a very limited manner. This contributes to the idea of the diversification of the portfolio risk within modern portfolio theory concepts. The five pair-wise NTEVs closest to zero value were then cut off from the total sample to include the countries in the portfolios that are included in those top five spillovers. The number of countries that enter or exit the portfolio varies each month, depending on the number of countries that enter or leave the top five pair-wise NTEV. It is seen in this approach that both positive and negative spillover values are taken into consideration. Just the value of the spillover is observed as an important indicator of diversification possibilities. Furthermore, every month, when we determine which countries enter the portfolio, those countries enter it. If there are countries from the previous month that are no longer on the list, those indices are sold so that these countries exit the portfolio.
The second strategy (strategy_2) is similar to the first one: we include the five pairwise NTEVs that are the best in terms of not being closest to zero value but based on being below the average value of all NTEVs in each month. In other words, for every month we calculate the average pair-wise NTEV values for all countries. Next, we rank the individual pair-wise NTEVs concerning the average value from all pairs. Then, five pair-wise NTEV values that are closest to the average value are used to determine which countries enter the portfolio. As in the first strategy, the zero value is chosen as the best theoretical value (no spillovers at all); this is hard to obtain in practice. Thus, in this second strategy, we chose the average NTEV value as a more realistic threshold. Entering or leaving the portfolio is determined as in the previous strategy. The third strategy (strategy_3) is concentrated on positive returns and high NTEV values. The idea is that the investor buys those indices which have positive returns as he anticipates that the indices' value will continue to grow. Alongside that, high pair-wise NTEVs are taken into consideration, as shocks in positive return series would be welcomed to spill over to other positive returns. This is a strategy concentrated on gaining great portfolio value over time. It could be seen as a strategy to beat the market. Now, the countries that have positive return series in a month are taken into consideration, alongside the top five greatest pair-wise NTEV values.
The fourth strategy (strategy_4) is the opposite of the previous one. Here, the investor is focused on negative returns, i.e., losses, with the lowest values of pair-wise NTEVs between countries. The investor is focused on suffering the least loss when bad times occur in the markets. So, if the markets fall, i.e., the losses occur on stock markets, the investor includes only those country indices that have the least amount of pair-wise spillovers. Again, the lowest five pair-wise NTEVs are observed. The final, fifth strategy (strategy_5) is the combination of the third and fourth ones. The investor includes those country indices in the portfolio that have positive returns and the greatest NTEVs between countries, with the inclusion of those indices that have the lowest spillovers when the returns are negative.
The two benchmark strategies to compare these five are the Markowitz portfolio strategy, in which the global minimum variance portfolio is optimized each month; and the equally weighted portfolio (in which all indices are in the portfolio in the whole observed period). The equally weighted portfolio represents the long portfolio, as it is assumed that the investor buys all of the stock indices at the beginning of the observed period, and holds the portfolio until he sells it at the end of the observed timespan. Furthermore, additional benchmark strategies are added regarding the minimization of the conditional value at risk of the portfolio, on 95% and 99% of level of alpha, following Krokhmal et al. (2001), denoted by cVaR 95% and 99% respectively. As these four benchmark ones are usually applied within the literature (see Škrinjarić 2020a; Krokhmal et al. 2001;Cheridito and Kromer 2013), we include them here as basic benchmarks as well. Finally, before moving on to the results, it is assumed that every purchase or sale comes with transaction costs. Thus, every time the portfolio structure changes, the value of the portfolio is reduced by the value of transaction costs that are expressed as a percentage of the value of the transaction itself. We assume two levels of costs; 1% as an example of a big investor who can handle great value transactions, and 10% costs as the extreme example of very unfavorable conditions on the stock markets. At the beginning of the sample, in each of the strategies, the investor holds one monetary unit and invests it in the indices that enter the portfolio based on the previously described strategies. Figure 3 depicts the portfolio values of all strategies, with the 10% transaction costs, in order to consider the worst-case scenario. It is not surprising that the Markowitz model, i.e., the minimum variance portfolio, has the overall worst performance in terms of portfolio value. This is due to this strategy focusing on risk minimization rather than obtaining high portfolio values. However, the return to risk-ratio analysis will provide more insights into the trade-offs between risk and return of all strategies. The equal-weight strategy is similar to the first benchmark one. The final, fifth strategy is the best-performing one. This is also not surprising as in it we combine the best of both worlds: including those return series that exhibit positive behavior when the spillovers are high; and taking into consideration when spillovers of losses are small between each pair of country indices. Other strategies based on the NTEVs are better than the benchmark ones, but not as much as the final strategy. However, this indicates that portfolio value-wise, tracking the return spillovers provides additional insights into achieving better returns compared to traditional approaches.

Results of Trading Simulations
comes with transaction costs. Thus, every time the portfolio structure changes, the va of the portfolio is reduced by the value of transaction costs that are expressed a percentage of the value of the transaction itself. We assume two levels of costs; 1% as example of a big investor who can handle great value transactions, and 10% costs as extreme example of very unfavorable conditions on the stock markets. At the beginn of the sample, in each of the strategies, the investor holds one monetary unit and inve it in the indices that enter the portfolio based on the previously described strategies. Figure 3 depicts the portfolio values of all strategies, with the 10% transaction co in order to consider the worst-case scenario. It is not surprising that the Markowitz mod i.e., the minimum variance portfolio, has the overall worst performance in terms portfolio value. This is due to this strategy focusing on risk minimization rather th obtaining high portfolio values. However, the return to risk-ratio analysis will prov more insights into the trade-offs between risk and return of all strategies. The equ weight strategy is similar to the first benchmark one. The final, fifth strategy is the b performing one. This is also not surprising as in it we combine the best of both wor including those return series that exhibit positive behavior when the spillovers are hi and taking into consideration when spillovers of losses are small between each pair country indices. Other strategies based on the NTEVs are better than the benchmark on but not as much as the final strategy. However, this indicates that portfolio value-w tracking the return spillovers provides additional insights into achieving better retu compared to traditional approaches.  Next, investors are interested in risk series as well, as this is another parameter that determines the utility obtained from a strategy. We plot the risk values of every strategy from Figure 3 to Figure 4. As the minimum variance portfolio has the lowest risk over time, it is, of course, the best performing in this case. Again, strategy 5 catches the eye, due to it having the greatest volatility over time and having the greatest spikes of risk overall. As this strategy is the most demanding one in terms of its description, the investor has to do a lot of rebalancing over time. This affects the volatility. Furthermore, as in this case the investor aims for the greatest positive return NTEVs, greater returns come with greater risks. Again, all other strategies are in between.

Results of Trading Simulations
determines the utility obtained from a strategy. We plot the risk values of every strate from Figure 3 to Figure 4. As the minimum variance portfolio has the lowest risk ov time, it is, of course, the best performing in this case. Again, strategy 5 catches the e due to it having the greatest volatility over time and having the greatest spikes of r overall. As this strategy is the most demanding one in terms of its description, the inves has to do a lot of rebalancing over time. This affects the volatility. Furthermore, as in t case the investor aims for the greatest positive return NTEVs, greater returns come w greater risks. Again, all other strategies are in between. For better comparison purposes, several performance measures have been calculat as well. Table 1 reports those measures. We compare the average return of each strate (mean), the standard deviation (SD), certainty equivalent (CE), the total return, high partial moment (HPM), and lower partial moment (LPM), and the standardized retu The CE is the utility value an investor achieves from each strategy, calculated as CE ≈ 0.5γσ 2 , where we calculate the mean CE value for each strategy based on the month values of the portfolio return μ, and the portfolio variance σ 2 , alongside the coefficient absolute risk aversion γ. Furthermore, the values of γ are chosen to be 1, 2, and 5 (l risk-averse investor, and the more averse one). For details, please refer to Knight a Satchell (2002), and Timmermann (2007, 2008). In order to take in consideration possibilities of achieving extra returns and not suffering great loss, observe both the HPM and LPM measures as follows, with m as the degree of r aversion, assumed to be value 1, and r a referent return value set by the investor, assum to be 0. The other performance measures, such as the information ratio, Sortino-Satch ratio, are calculated as described in Cheridito and Kromer (2013).
As bold values indicate the best performance by row, it is obvious that strategy was the overall best performer. It provides the investor with the best possibilities obtaining good profits, even when standardized by risk. Furthermore, the CE values ta into consideration both risk and return of a portfolio. It is not surprising that the low portfolio risk was the risk-minimizing one (Markowitz). For better comparison purposes, several performance measures have been calculated as well. Table 1 reports those measures. We compare the average return of each strategy (mean), the standard deviation (SD), certainty equivalent (CE), the total return, higher partial moment (HPM), and lower partial moment (LPM), and the standardized return. The CE is the utility value an investor achieves from each strategy, calculated as CE ≈ µ − 0.5γσ 2 , where we calculate the mean CE value for each strategy based on the monthly values of the portfolio return µ, and the portfolio variance σ 2 , alongside the coefficient of absolute risk aversion γ. Furthermore, the values of γ are chosen to be 1, 2, and 5 (less risk-averse investor, and the more averse one). For details, please refer to Knight and Satchell (2002), and Timmermann (2007, 2008). In order to take into consideration possibilities of achieving extra returns and not suffering great loss, we observe both the HPM and LPM measures as follows, with m as the degree of risk aversion, assumed to be value 1, and r a referent return value set by the investor, assumed to be 0. The other performance measures, such as the information ratio, Sortino-Satchell ratio, are calculated as described in Cheridito and Kromer (2013).
As bold values indicate the best performance by row, it is obvious that strategy_5 was the overall best performer. It provides the investor with the best possibilities of obtaining good profits, even when standardized by risk. Furthermore, the CE values take into consideration both risk and return of a portfolio. It is not surprising that the lowest portfolio risk was the risk-minimizing one (Markowitz).
Finally, we observe the structure of the best-performing portfolio in Figure 5 and Table 2 over time. Overall, we do not find specific patterns in the weight structure. The structure is interchangeable in that the majority of the indices enter the portfolio several times as the only ones (fifth column in Table 2), except for Poland and Slovenia. This indicates that these two indices were correlated with others to the least degree. The index that was correlated with others the most was Slovakia as it entered the portfolio alone a total of 6 months. Returns on Hungary and Greece were those that contributed to the overall portfolio value the most, as they were in the portfolio 37 and 36 months respectively (first column). The findings indicate that following strategies in this research could have potential in obtaining a good portfolio value over time, even when taking into consideration the portfolio risk. Note: values in the first five rows are multiplied by 1000. Mean is the average return, SD is the average standard deviation (volatility), CE is the average certainty equivalent, with γ = 1, 2, and 10, HPM is the average higher partial moment, LPM is the average lower partial moment, m = 1, r = 0, std return is return standardized by standard deviation. RoVar ratio is as in Favre and Galeano (2002), Sortino-Satchell is in Sortino and Satchell (2001), Rachev ratio in Biglova et al. (2004). Bolded values indicate the best performance in a row.

Conclusions
In this paper, we used transfer entropy, a methodology from information theory, to obtain portfolio optimization for CESEE stock markets. Besides the innovative application, which could give us new insights about portfolio management, the application of such measures could have some advantages, in particular the fact that transfer entropy could be used not only to detect linear but also nonlinear linkages between assets, making it better, for example, than other measures like Granger causality. Moreover, the application of information theory measures or other methodologies based on statistical physics had been widely used in the context of financial markets and is able to make understood and explain complex systems, as in the case of financial markets.
The empirical results of the study indicate that combining approaches that are not commonly used in empirical finance could result in good portfolio performance over time. This is due to this approach exploiting the best characteristics from such methodologies and this can enhance the portfolio performance if used in the right way. Practical implications of the study include utilizing the transfer entropy results in a way that the potential investor observes how shocks in one return series spill over to others. This is beneficial for purposes of diversification. The dynamic analysis provided here shows that financial markets are always changing and constant monitoring of the market conditions is necessary in the search for the best portfolio design. In particular, our method shows that the use of different methodologies, including transfer entropy, considering the possibility of linear and nonlinear relationships, could be an advantage when compared with other methods. Some of the shortfalls of the study are as follows. In the simulation part of the strategies, we assumed some simple approaches of detecting when an index will enter or leave the portfolio. However, this is a starting point, as previous research on these questions does not exist. This makes this research rather explorative in nature. Future work should aim to refine the strategies and the criteria within them. Next, we used equal weights in the simulation as well. Other criteria can be chosen when the investor determines which indices (or individual returns) enter the portfolio. This could be based on preferences, legislative restrictions for the investor, and overall monetary or other criteria as well. Some other future research and applicative possibilities include the following ones. The issue of portfolio weights could be observed in a separate strand of literature that deals with this topic, and combination of the approach of calculating the spillovers within this paper can be made with other areas of research that deal strictly with portfolio weights. Technical research and papers dealing with computational and coding issues could emerge as well. This could be interesting for investors that want to apply such an approach to a greater number of stocks.
Author Contributions: All authors contributed to the paper equally. All authors have read and agreed to the published version of the manuscript.
Funding: This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior-Brasil (CAPES)-Finance Code 001. The APC was funded by MDPI.
Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: Data is available upon request. Acknowledgments: P.F. acknowledges the financial support of Fundação para a Ciência e a Tecnologia (grants UIDB/05064/2020 and UIDB/04007/2020). D.Q. wishes to acknowledge the CAPES for funding support. This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior-Brasil (CAPES)-Finance Code 001.

Conflicts of Interest:
The authors declare no conflict of interest.