{'fraction_non_alphanumeric': 0.03137689184200812, 'fraction_numerical': 0.013330052089742013, 'mean_word_length': 4.564125969876769, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Financial Portfolios based on Tsallis Relative Entropy as the Risk Measure

Earlier studies have shown that stock market distributions can be well described by distributions derived from Tsallis entropy, which is a generalization of Shannon entropy to non-extensive systems. In this paper, Tsallis relative entropy (TRE), which is the generalization of Kullback-Leibler relative entropy (KLRE) to non-extensive systems, is investigated as a possible risk measure in constructing risk optimal portfolios whose returns beat market returns. Portfolios are constructed by binning the risk values and allocating the stocks to bins according to their risk values. The average return in excess of market returns for each bin is calculated to get the risk-return patterns of the portfolios. The results are compared with those from three other risk measures: 1) the commonly used 'beta' of the Capital Asset Pricing Model (CAPM), 2) Kullback-Leibler relative entropy, and 3) the relative standard deviation. Tests carried out for both long (~18 years) and shorter terms (~9 years), which include the dot-com bubble and the 2008 crash periods, show that a linear fit can be obtained for the risk-excess return profiles of all four risk measures. However, in all cases, the profiles from Tsallis relative entropy show a more consistent behavior in terms of both goodness of fit and the variation of returns with risk, than the other three risk measures.


Introduction
In capital asset management, risk optimal portfolios are usually based on using the covariance defined in modern portfolio theory [1] and the capital asset pricing model (CAPM) [2][3] [4][5] [6] or simply the standard deviation as volatility measures. These measures are based on the efficient market hypothesis [7] [8] according to which a) investors have all the information available to them and they independently make rational decisions using this information, b) the market reacts to all the information available reaching equilibrium quickly, and c) in this equilibrium state the market has a normal distribution. Under these conditions, the return for an equity j is linearly related to the market return [9] is the risk parameter given by where , is the correlation coefficient of and , and and are the standard deviations of and .
The intercept is the value of when is zero and hence can be considered as the excess return of the equity above the market return. The return over a period is defined as In 1972, empirical tests of the validity of CAPM were carried out by Black, Jensen and Scholes [10] who examined the monthly returns of all the stocks listed in NYSE for 35 years, between 1931-1965. Portfolios were constructed by binning the estimated risk parameter and allocating the stocks for each bin according to their risk parameter. The long term (35 years) results showed a highly linear relationship between the excess portfolio return α and the bin risk parameter , the slope being slightly positive. This indicates that the higher risk stock portfolios yield marginally higher excess returns. However, when the tests were carried out for shorter periods (~9 years), the relationship between the excess returns and were still linear but the slopes were non-stationary becoming even negative for some periods.
In reality, how true are the assumptions of CAPM? Observations show that the market is a complex system that is the result of decisions by interacting agents (e.g., herding behavior), traders who speculate and/or act impulsively on little news, etc. Such a collective/chaotic behavior can lead to wild swings in the system, driving it away from equilibrium into the regions of nonlinearity. Further, the stock market returns show a more complicated distribution than a normal distribution. They have sharper peaks and fat tails ( Figure 1).
Hence, there is a need to define a risk measure which is not bound by the constraints of CAPM. There have been several publications which argue that entropy is one such risk measure. In statistical mechanics, entropy is a measure of the number of unknown microscopic configurations of a thermodynamical system that is consistent with the measurable macroscopic quantities such as temperature, pressure, volume, etc. It is a measure of the uncertainty in the system [11] [12]. In 1948, Shannon applied the concept of entropy as a measure of uncertainty to information theory, deriving Shannon entropy [13]. In finance, there are several features which make entropy more attractive as a risk measure. It is more general than the standard deviation [14][15] since it depends on the probabilities. Depending on the type of entropy used, it is capable of capturing the nonlinearity in the dynamics of stock returns [16]. A review of applications of entropy in finance can be found in [17].
There have been several empirical studies comparing the predictive power of Rényi and Shannon entropies [18] [19] with those from other measures (in particular and ) with respect to portfolio expected returns. The conclusions are [19] that in the long run, the risk optimal portfolios from both Rényi and Shannon entropies show significantly lower variance than those from either  or .
In this work, we investigate the use of Tsallis relative entropy (TRE) [20], Kullback-Leibler relative entropy (KLRE) [21], beta, and relative standard deviation as risk measures for constructing risk optimal portfolios and compare the results with those of CAPM. In the CAPM tests by Black, Jensen and Scholes [10], the portfolio returns and risk parameters are defined relative to the market returns and risks. Hence, any new risk measures to be tested and compared with CAPM results also must be relative.
Several studies [22] [23] indicate that the issues connected with the assumptions of CAPM (viz. efficient market hypothesis) can be addressed using statistical methods based on Tsallis entropy [24], which is a generalization of Shannon entropy to non-extensive systems. These methods were originally proposed to study classical and quantum chaos, physical systems far from equilibrium such as turbulent systems (non-linear), and long range interacting Hamiltonian systems. However, in the last several years, there has been considerable interest in applying these methods to analyze financial market dynamics as well. Such applications fall into the category of econophysics [25].
The rest of the paper is organized as follows. In Section 2, Tsallis relative entropy with some necessary background on Tsallis entropy and -Gaussian distribution is discussed. A relationship between TRE and the parameters of a -Gaussian distribution is derived. Section 3 deals with the data and methodology for constructing risk optimal portfolios and their results. The conclusions are given in Section 4.
In this paper we use the terms volatility and risk interchangeably. Strictly speaking, the term volatility should be used since we only use the stock price time series for the analysis. However, in the literature the term risk has also been used to mean volatility.
The returns are calculated as defined in (1c). The term expected returns is used to mean predicted average returns.

Review of Tsallis Statistics
Tsallis entropy is a generalization of Shannon entropy to non-extensive systems. It is given by where is the probability density function at the i th sample under the condition ∑ = 1 and the logarithm ( ) is given by The scaling parameter is a universal parameter, but its value can change from system to system.
Substituting (4) in (3), we get: Unlike Shannon entropy, Tsallis entropy obeys a pseudo additive property The scaling parameter denotes the extent of the non-extensivity of the system. As → 1, the additive property of Shannon entropy is recovered.
Considering the continuous case for a random variable Ω, one can show [24] that the maximization of with respect to under the following constraints: gives the Tsallis -Gaussian distribution: ̂ is the normalization. 1 and 2 are the Lagrange multipliers for the constraints (7b) and (7c) respectively. The expectation value 〈−〉 in (7b) and (7c) are the -expectation values.
Equation (8) can be re-written in a -Gaussian form The normalization is given by Here  is the gamma function. Note that in the limit → 1, it can be shown that the Tsallis entropy and the corresponding -Gaussian distribution go to the Shannon entropy and the Gaussian distribution respectively.
As described in detail in an earlier publication [26], the parameters , and are estimated using the method of Maximum Likelihood Estimation (MLE) [27]. For completeness, the MLE equations are given here. Denoting, for brevity = 1 ( − 1) ⁄ and = ( − 1) The MLE equations for , , and are given by and N is the number of samples. The weights are normalized.
Equations (11a) -(11c) are non-linear and have to be solved numerically. The details are given in [26]. We will denote the estimated values of , and as ̂, ̂ and ̂ respectively.
It is easy to verify that for → 1 → 1 → → 1 (2 2 ) ⁄ and being the mean and standard deviation respectively of Ω.

Tsallis Relative Entropy
The generalization by Tsallis [20] of Kullback-Leibler relative entropy to non-extensive systems is given by P and R are normalized PDF's.
Using the definition of ( ) given in (4), The following are some of the properties of : 1. Asymmetry: 2. Non-negativity [28]: Since − ( ) is a convex function for > 0 3. Pseudo-additivity [28]: The first two properties hold for KL relative entropy as well.
Equation (17) shows the applicability of TRE to correlated systems. As → 1, the pseudo additivity becomes the additive property

Tsallis q-Gaussian Relative Entropy
Direct calculations of relative entropies defined in equations (12) and (13) in terms of histograms of the data have several problems: 1. They depend on the number of bins in the histograms.
2. The relative entropies are defined only in the overlapping region of and .
3. is finite only if is non-zero in all the overlapping bins. The same is true for but for >1.
This makes the number of samples for the computation of relative entropies rather sparse and hence the stability and accuracy become questionable. However, if both and can be well fit with -Gaussian distributions, analytical expressions for the relative entropies can be derived in terms of the parameters of these distributions. In an earlier work [26] we have shown that the financial market return distributions (S&P 500 and Nasdaq) can be well modelled by -Gaussian distributions, even during the dot-com bubble and 2008 crash periods. If the distributions of the returns of individual equities can also be modelled by -Gaussians, then we can derive analytical formulas for TRE of an individual equity with respect to the market . Figure 2 shows monthly percentage returns of S&P 500 and five randomly chosen individual stocks (both from S&P 500 and Nasdaq) and the corresponding fit to -Gaussian distributions. Visual inspection shows that the fits are pretty good. However, to quantify the 'goodness of fit,' Kolmogorov-Smirnov (KS) [29] tests are carried out. Briefly, this involves determining the maximum absolute distances Dmax between the empirical and the synthetic -Gaussian cumulative distribution functions (CDF). The fit is good if Dmax is less than a critical distance . The details of constructing synthetic -Gaussian and determining Dmax and are given in [26]. The values of Dmax and for S&P 500 and the five randomly chosen stocks are displayed in Figure 2. In all cases Dmax is < showing that the distributions of the returns of even the individual stocks can be modelled well with -Gaussian distributions.
From equations (9) and (10), the Tsallis -Gaussian distributions for the returns of a market index R and an individual equity P can be written as and (Ω) The normalizations and are given by The parameter is estimated from the reference distribution R. All three parameters , and are estimated for R. For P, only and are estimated using of the reference distribution.
As shown in the Appendix, the Tsallis relative entropy is now given by Here = √ ⁄ .
In the limit → 1, → , → 1 (2 2 ) ⁄ , and → , where = ⁄ is the relative standard deviation, giving the KL relative entropy ( ǁ ) is evaluated at the estimated parameters ̂, ̂ and ̂. The first two moments are used to compute the .
Note that depends non-linearly on the returns since both and have non-linear dependence on the returns (equations (11b) and (11c)). The first two terms in (20) depend only on the generalized standard deviations. The third term is a distance term (complementary to correlation) in generalized average returns. This is a systematic risk as the one addressed in CAPM. Hence Tsallis relative entropy combines aspects of both the standard deviation and CAPM risk measures and addresses the non-linearity of the stock dynamics.

Data
For the present study, we consider daily stock data from 4 January 2000 to 30 May 2018. The reference market index is chosen to be the S&P 500. For portfolio construction, we consider securities in the S&P 500 as of 2018. The data are adjusted for dividends and splits. No attempt has been made to correct the data for inflation.

Methodology
In testing the performance of the four risk measures in this study (Tsallis relative entropy, Kullback-Leibler relative entropy, beta, and the relative standard deviation ), two procedures somewhat similar to that described by Black, Jensen and Scholes [10] are followed. The exact procedures are as follows.

Procedure I
We only consider securities in the S&P 500 as of 2018 which have data extending all the way back to January 1995. This gives us about 340 stocks to work with in Procedure I and this list of stocks remains the same for all the cycles in Procedure I.
Each cycle consists of the following three steps: a) Five years of data prior to the starting date of the cycle (e.g., 4 January 2000 is the starting date of the first cycle) are used to estimate the parameters of the risk models for the reference market index S&P 500 and for each of the securities. The values of the relative entropy risk measures are calculated from the model parameters. The expected return is computed as the average monthly return (as defined in (1c)) of the security over the next six months (arbitrarily chosen).
b) The risk values are then binned and the securities are assigned to each bin according to their risk value such that there are an equal number of securities in each bin. Note that this makes the bin widths variable. The set of securities in each bin can be considered a portfolio. The risk value of each bin is taken to be the center value of the bin. The number of bins remains the same for all cycles. c) Assuming an equal amount of money invested in every security, the expected return of the portfolio in each bin in excess of the S&P 500 expected return is calculated. This gives the riskreturn values for each portfolio.
The data are then shifted by six months and steps a) -c) are repeated for the next cycle. The values, however, are estimated every year. The process is continued until all the data are exhausted. For the data period considered, this gives us 36 samples of average monthly returns for each security.
Note that every time the data are shifted, the contents of each bin in step b) can change (even though the number of stocks in each bin remains the same in Procedure I). Also, in step c), each bin is rebalanced every six months such that an equal amount of money is invested in every security. This means that if this procedure is applied in practice, some securities would be sold and others bought every six months to implement steps b) and c). The effects on the portfolio returns due to transaction costs incurred in such selling and buying and taxes imposed on realized gains are not included in this study.
Finally, the returns in each bin are further averaged over all the 36 samples of average monthly returns and the bin-risk values are also averaged over all cycles. This gives us the final riskexpected return profile. We denote the expected earnings of the portfolio in excess of expected market return as Erel. Note that the binning procedure is expected to minimize the effect of estimation errors on the performance of the portfolios.

Procedure II
For each cycle, we use the securities in the S&P 500 as of 2018 which have data extending five years before the start date of the cycle, e.g., all the way back to January 1995 for the first cycle. As the cycles move forward in time, more and more securities enter the computation. This gives us about 340 stocks in the first cycle increasing to about 460 in the last cycle.
The rest of Procedure II is similar to Procedure I, except that the bin widths (determined in the first cycle) do not change with each cycle, but the number of securities in each bin can change with each cycle. This procedure is closer to that described by Black, Jensen and Scholes [10] than Procedure I where the number of securities in each bin are kept fixed.

Goodness of Fit
The performance of the four risk measures is assessed by estimating the 2 , which is one of the commonly used estimates in statistics [19] in determining the goodness of fit. This quantity shows how close the risk-return patterns are to a linear regression. If {s} is a set of risk values of the bins and {e} the corresponding portfolio earnings, then Here 0 and 1 (intercept and slope) are the parameters of the linear fit and ̅ is the mean of e. Note that the closer the values of e to the linear fit, the closer is 2 to 1.

Results
We will first discuss the results from Procedure I. Figure 3 shows the long term behavior of the Erel calculated from monthly returns vs. the risk for the four risk measures considered. The period is 2000-2018. Note that for this long period, the slopes of the linear fit in all four cases are positive, indicating that for greater relative risk there is greater relative return. This behavior is similar to that observed in the tests of the CAPM model [10] as well. The 2 is comparable in all cases, with TRE giving a value somewhat better than those for the others and a higher slope. Figure 4 shows the effect of increasing the number of securities in each portfolio (diversification) on the long term performance of the portfolios. In the case of TRE, we observe a consistent behavior of improved performance with an increase in the number of securities in the portfolio. However, this is not the case with the other risk measures. Further, in all cases, the goodness of fit of TRE is better than that of beta of the CAPM.
Tests of CAPM by Black, Jensen and Scholes [10] for shorter periods (~9 years) show that the linear relationship between risk and return is intrinsic and not the result of better statistics. However, the risk-return patterns are non-stationary, i.e., the slopes and intercepts vary widely for each period, the slopes becoming even negative in some cases. In the present work, we carry out similar tests of the four risk measures, dividing the data into two periods of 9 years each:  Figure 5, the values for period a) varies between 1.24 -1.45 denoting a relatively calm situation. For interval b) the range is between 1.4 -1.74 pointing to strong non-extensivity and possibly a chaotic situation. So unlike [10], these tests look at the intrinsic behavior of risk-return patterns during very different market conditions.
The risk-relative return profiles for the two 9 year periods are displayed in Figure 6. First of all, whereas TRE shows good 2 values during both periods, the other three measures show rather poor 2 values during the first period. Further, the profiles for show the biggest change in slope, going from negative in the first period to positive in the second. The other three risk profiles all show positive slopes, with that for TRE showing the least change in slope between the two periods. So these tests indicate that the TRE based profiles show a very consistent behavior even during periods that might include chaotic market situations.
We will now discuss the results from Procedure II. As discussed previously, in this case the number of stocks that enter the computation increases as time progresses. This means more number of stocks in each bin and hence better statistics and possibly better performance. Figure 7 shows the number of securities used for portfolio construction in each five-year window of step a) as a function of year.
The long term behavior of the Erel calculated from monthly returns vs. the four risk measures is shown in Figure 8. As in the previous procedure, the slopes of the linear fit in all four cases are positive, indicating that for greater relative risk there is greater relative return. Except in the case of , all measures show a better 2 . However, of all the risk measures, TRE gives the best 2 and highest slope. The profile with as the risk measure shows the worst 2 and the smallest slope.
The results for the two shorter terms, 2000-2009 and 2009-2018, are shown in Figure 9. As in procedure I, the risk-return patterns of show the biggest change in slope going from negative in the first period to positive in the second. Such a swing also accounts for the poor performance in terms of both goodness of fit and returns (small slope) over the longer (18 year) period. The performance of TRE, however, is consistent for both the periods in terms of better 2 values and higher positive slopes (higher returns for higher risk) compared to those from the other risk measures. This again indicates that the TRE based portfolios behave consistently during periods of different stock market characteristics.

Summary and Conclusions
In this work, we have proposed Tsallis relative entropy (TRE) as a novel risk measure for the selection of risk optimal portfolios for returns in excess of market returns. Since the distributions of the returns of both the market (S&P 500) and the individual stocks can be well fit with -Gaussian distributions, the TRE can be analytically expressed in terms of the model parameters of the -Gaussian distributions. This alleviates several problems (described in 2.3) encountered in the histogram based estimation of relative entropies. Further, the analytical expressions show that TRE has aspects of both the CAPM and the standard deviation risk measures in a non-linear way.
The performance of TRE as a risk measure is compared with those of three other risk measures: KLRE, beta of CAPM, and relative standard deviations. The KLRE is obtained as the limiting → 1 case of TRE.
One of the observations in these empirical tests is the consistent behavior of TRE. Over the long term, even though all risk measures show a linear relationship with earnings, TRE gives the best value of 2 and highest slope. Over the shorter term consisting of periods of very different market characteristics (bubble and crash), the measures KLRE, , and relative standard deviation show quite different behaviors. This is particularly obvious in the results of procedure II which has better statistics. The biggest change is shown by with slopes going from negative in the first period to positive in the second. Such a change in behavior degrades the long term performance as well in terms poor goodness of fit and returns. TRE, however, shows a consistent behavior in terms of good 2 values and highest positive slopes, even during these shorter intervals. These results indicate that it might be possible to construct portfolios whose returns can beat the market return even during periods that might include chaotic situations such as bubbles and crashes, using TRE as the risk measure.
The empirical investigations in this work point to the importance of taking into account the nonlinearity and correlations of stock market dynamics in defining risk measures. TRE is one such measure and may help in the construction of portfolios whose returns show a predictive risk-return behavior both in the long and shorter time investments.
This brings us to the question of how short is a 'shorter time' to hold the portfolio whose returns beat the market. That depends on the relaxation time of the market dynamics. In the case of Tsallis statistics, one might be able to get a handle on these by estimating [24][30] [31]. This, however, is a subject for future studies.