1. Introduction
Investing in the stock market is vital in directing national resources to the most productive applications. The stock-picking activity of the financial services sector annually commands billions of dollars in fees.
Malkiel (
2013) argues that ever-growing fees for financial services are a deadweight loss for the US economy. The misallocation of resources creates waste and other losses to the economy. This paper offers tools to reduce such losses by proposing public domain stock-picking tools using free, open-source software by
R Core Team (
2023).
Wall Street investment outfits use stock prices attached to stock symbols. We use pretty long price data concerning 39 years and six months, ending in May 2024. If $1 is invested in buying a stock priced at at time t, if the price (adjusted for dividends) at time is higher, the net return will exceed the initial investment of $1. Since the net return is negative when losses are incurred, one defines the gross return as . The gross return is always positive since prices are positive.
Continuously compounded return is the exponential return, , which is always positive. The series expansion of is . Assuming higher order terms in the expansion can be ignored, (, one can write exp. It is customary to equate the exponential return to the gross return and write . Many published papers use the first difference of logs of prices evaluated at time as a return from investment. Since the return data do not always satisfy () for certain time periods, let us define for our monthly returns from the Dow Jones Industrial Average’s 30 (DJ30) stocks.
Let
denote the probability distribution function of returns (
from investing in one of the 30 stocks, and let
denote the (cumulative) distribution function of returns. Denote the expected value (mean) of
by
and the standard deviation by
. The Sharpe ratio,
Sharpe (
1966), is named after a Nobel-winning economist. It represents a risk-adjusted average return from investment
X, defined as
where the denominator makes risk adjustment. Typical SR ranks investment opportunities based on data on market returns represented by the probability distribution
mentioned before.
Although (
1) can also be used for ranking gambles, this paper uses it for stock-picking. Gambling is a zero-sum or negative-sum game. By contrast, buying (selling) a share of companies contributing to socially desirable (undesirable) goods and services often yields positive
and a larger
.
Aumann and Serrano (
2008) propose an ‘index of riskiness’ of an investment as if it is a gamble. They conjure imaginary gambling situations to assess their riskiness using an axiomatic framework and an economic decision-making context. They reject the reciprocal of
of (
1) as a measure of riskiness because it fails monotonicity property based on first-order stochastic dominance.
Aumann and Serrano (
2008) focus too much on the attributes of the stock buyer measured by a buyer’s risk-averse utility function. These authors refer to a constant absolute risk-averse “CARA person” (page 816).
Cheridito and Kromer (
2013), or “CK13,” is an impressive study of mathematical formulas defining 45 performance measures similar to the reward–risk ratio (
1). Among the 45 are tweaks on Sharpe ratios and ratios involving the value at risk (VaR). They evaluate the following four properties:
(M) monotonicity means that more is better than less. This is a common-sense minimal requirement. All performance measures should satisfy it.
(Q) Quasi-concavity describes uncertainty aversion linked to economists’ utility and decision theories. It is not relevant if we include investors who allocate a (small) proportion of investor funds as if they are risk-loving. We need not accept this criterion for our purposes.
(S) Scale Invariance or where is a constant. The invariance requirement is inappropriate for modern investing where some technologies need very large (or small) scale and transaction costs are low for large transactions.
(D) Distribution-based. All six stock-picking algorithms in this paper are distribution-based.
CK13 evaluations are not necessarily for stock market investment, but include the ranking of gambles where the “probability measure” (as in the measure theory of Statistics) may be unknown. By contrast, our probability measure is well approximated by , and its riskiness is well represented by its dispersion. CK13 claim that 17 measures out of 45, including the Sharpe ratio (SR), fail to meet the minimal monotonicity requirement (M). The next four paragraphs show the limitations of the CK13 claim. We shall show that CK13 proof assumes certain artificial gambles that are irrelevant for our stock-picking based on .
Proposition 4.1 in CK13 allegedly proves that fails (M). The proof involves the existence of pathological cases involving three constants satisfying properties as follows: []. The proof needs to assume a non-negative random variable . Since stock returns can be both positive and negative, the assumption is invalid for our .
We begin by showing that SR fails (M) when . CK13 proof defines and . For example, choose , and . Now, and , with . Now, is 96% larger than , whereas (X) = 2.4 is 240% larger than (Y) = 1. Hence, . Since X is larger while is smaller, the Sharpe ratio indeed fails (M) for .
Consider a realistic negative realization of the random variable Z, representing losses, with . Let us keep the above choices of and formulas for X and Y in CK13 unchanged. Now, and , implying that . This is 500% smaller than , whereas (X) = 2.4 is 240% larger than (Y) = 1. Hence, . Since X is smaller while is also smaller, the Sharpe ratio passes (M).
The CK13 alleged failure to pass (M) holds only for artificially constructed gambles satisfying peculiarly demanding unrealistic restrictions with a non-negative random variable Z denying any presence of losses, unlike typical . Thus, stock market investors can safely ignore the claim that SR fails (M).
We further argue that property (Q) linked to utility theory can be ignored when allocating resources. After all, economists have long avoided interpersonal utility comparisons. An individual investor’s utility experience is personal, rarely identical across individuals, and exhibits marked change for the same individual over time and space. Psychologists have documented that utility from profits and losses is asymmetric and sensitive to profit and loss sizes. It is futile to assess whether someone is a “CARA person” before deciding which decision theory applies to him. In summary, the M, Q, S, and D criteria proposed by CK13 can be misleading when applied to stock-picking purposes.
Let us turn to the 30 stocks comprising DJIA. We begin with
Table 1 and
Table 2 for the company names studied here in two parts with fifteen companies each. We report ticker symbols, relative weights in DJIA, and a (case-sensitive) single-character name to identify the stock for later use in graphics and tables.
Figure 1 is inspired by Markowitz’s efficient frontier model, without the straight line representing a risk-free rate. This Figure has the mean return on the vertical axis and the standard deviation of returns measuring the volatility (risk) for that stock on the horizontal axis. We depict thirty letters in
Figure 1 for each DJIA index component sticker.
The basic idea behind
Figure 1 is that we imagine grouping stocks into a certain number (=7) of unequal width ranges of standard deviation class intervals. Our 30 stocks are implicitly assigned to these seven
intervals. Now, the stock yielding the highest average return for each level of risk (measured by the midpoints of the sd class interval) dominates all those below it in
Figure 1. The dominating stocks from DJIA are graphically identified as (j, v, h, f, C, a, z). The corresponding longer company names of dominating stocks, according to
Table 1 and
Table 2, are Johnson & Johnson, Visa, Home Depot, Microsoft, Salesforce, Apple, and Amazon.
1.1. Descriptive Statistics for the DJIA Stock Returns
This section reports some basic information about our data using standard descriptive stats. We report ‘min’ for the smallest return, Q1 for the first quartile, where 25% of data are below Q1 and 75% are above Q1. ‘Median’ and ‘Mean’ are self-explanatory. Q3 is for the third quartile (75% below and 25% above), and ‘max’ denotes the largest return.
In finance, two additional descriptive stats are referenced. The
defined before and the ‘expected gain–expected pain ratio’. The latter is called ‘omega’ (
) in
Keating and Shadwick (
2002), or “KS02” hereafter. While we include
and
among the descriptive statistics associated with each stock, we include them among our six stock-picking algorithms.
1.1.1. Sharpe Ratios for Risk-Adjusted Stock Returns
The
of (
1) is a popular stock-picking tool. Many researchers have studied it and suggested modifications.
treats a symmetric measure
as an approximation to the risk. It treats volatility on the profit and loss side as equally undesirable. Volatility on the loss side is undesirable but desirable on the profit side. An adjusted version,
, replaces the
in the original denominator by downside standard deviation (
) from the square root of DSV, the downside variance. Let
denote the number of observations below the mean. The downside variance in
Vinod and Reagle (
2005) (page 111, Equation (5.2.2)) is computed as
where
when
, and
otherwise. The summation is over
returns involving possible losses. The adjusted version
is not difficult to compute. The online
Appendix A provides software for
.
Page 114 of
Vinod and Reagle (
2005) was perhaps the first to identify an often-ignored serious problem with Sharpe ratios. Now, we show how SR provides the wrong rankings when risk-adjusting any stocks with negative average returns. We explain the wrong ranking using an example of two stocks, p and q, with Sharpe ratios,
, and
. Now, assume that both have a negative average loss of 100, or
. Next, assume that stock p is twice as volatile (risky) as stock q, or
and
. We expect that the money-losing and more risky stock p is worse than q. Note that
is larger than
. The ranking by
says q is worse than p, which is against common sense.
Page 114 of
Vinod and Reagle (
2005) also explains how to use suitably large “add factors” to obtain the
to yield the correct ranking. Fortunately, columns entitled ‘Mean’ in
Table 3 and
Table 4 (of descriptive stats reported later) show that all thirty stocks have positive average returns. Thus, we do not need any ‘add factor’ adjustment in our context.
Note that our
assumes that the researcher has true unknown values of
and
, rather than their sample estimates ignoring estimation errors. A “Double Sharpe ratio” divides the sample estimate
by its standard error (SE), the standard deviation of the sampling distribution. The division penalizes stocks with a higher estimation risk. A double SR, which penalizes for estimation risk represented by a bootstrap standard error, is discussed on page 227 of
Vinod and Reagle (
2005). We denote it as SR with subscript ‘se’ as
The online
Appendix A provides software for computing
of (
3) using downside standard deviation in the denominator. Next, the appendix software computes a large number
J of
based on bootstrap replicates. Then, the code computes
in the denominator of (
4), which becomes the standard deviation of
J bootstrap values
.
Recall that the risk (horizontal axis) versus return (vertical axis) scatterplot of
Figure 1 suggests that Johnson & Johnson, Visa, Home Depot, Microsoft, Salesforce, Apple, and Amazon graphically dominate others. The respective Sharpe ratios of these stocks are (0.22, 0.26, 0.23, 0.25, 0.22, 0.19, 0.15). Note that the Sharpe ratio is a direct measure of risk-adjusted return, bypassing the grouping of stock returns into standard deviation (sd) intervals.
The lowercase versions of ticker symbols for the top seven Sharpe ratios in increasing order of magnitude are amzn = 0.22, jnj = 0.22, crm = 0.22, unh = 0.23, hd = 0.23, msft = 0.25, and v = 0.26, respectively. Markowitz’s theory supports a stock-picking algorithm based on the Sharpe ratio. It is one of the six algorithms listed later in
Section 3.
1.1.2. Original Computation of “Omega” for Stock Returns
KS02 name a “cumulative probability weighted” gain–loss ratio “omega” (), and claim that it is a “universal” performance measure. We regard it as one of many and find that the weighting used in its original computation can be simplified without sacrificing its intent. This subsection describes the need for simplification, while the following subsection describes a recommended version. A referee has suggested that some readers are not interested in knowing exactly how our simplified version maintains the intent behind the gain–loss ratio. Uninterested readers can skip the present subsection.
The title of KS02 claims universality for their performance measure. Since a larger omega means a larger preponderance of positive returns, a stock having a larger omega is more desirable. The idea of measuring a gain–loss ratio is first mentioned by
Bernardo and Ledoit (
2000), who define
r as a risk-adjusted excess return over a target return. Their risk adjustment requires assumptions about the utility function of investors. This paper avoids any assumption regarding investor utility functions. We retain their distinction between
, the positive part of returns, and
, the negative part. Their gain–loss ratio is
, (where the subscript ‘bl’ identifies authors) is as follows:
Section 3.1 of CK13 states that Bernardo–Ledoit-type ratios satisfy all four (
M,
Q,
S,
D) properties mentioned above.
KS02 do not assume anything about the utility function of investors. The gains and losses in KS02 are compared to a target return. If all stocks in a data set have a common target return, we can subtract it from all returns and work with returns in “excess of target”. Hence, there is no loss of generality in letting the target be zero. Therefore, our target return is mostly zero in the sequel.
Metel et al. (
2017) explain how omega generalizes the mean variance-based Sharpe ratio by encompassing the entire
(page 4) “therefore incorporating higher moment properties”. Their Theorem 1 proves that, within the class of elliptical density functions, using the Sharpe ratio or the Omega measure to optimize portfolio performance leads to the same optimal portfolio. The theorem has no practical implications for our purposes when working with real-world market returns, usually not from any known density.
KS02 define
where the expectation operator from the probability theory in
is represented by choosing weights (
) by assuming continuous distributions. Similarly, KS02 represent
by choosing
weights. The subscript ‘ks’ in
identifies the authors of KS02.
Considerable literature on “omega” assumes a continuous , usually with a known (Gaussian, Elliptical) form. By contrast, this paper assumes a nonparametric representation of based on actual market returns data. Since observable data are always discrete, we replace with the empirical cumulative distribution function (ECDF), a step function of returns. It uses all the information in the data on returns and is considered a “sufficient statistic”.
Figure 2 illustrates the ECDF for an imaginary stock A with
, returns
, for
A vertical axis at
, shown in
Figure 2, separates the ECDF for stock A into the loss side on the left (for
) and the gain side on the right (for
).
How do we represent the
E operator weights in the discrete case? Usually, mathematical expectation
(return
with probability
) is the average return. KS02 formulate the mathematical expectation of aggregate loss based on cumulative sums of negative returns
times corresponding cumulative probabilities from
as weights. Their gain side weights based on (
) are from the areas above the ECDF steps. The following paragraph uses
Figure 2 to explain the numerical computation of KS02’s cumbersome weighting for toy stock A mentioned above.
The ECDF on the loss side for toy stock A has two negative ranges, (box intervals) (
) and (
), with areas under the pillars for the two ranges of (1/n) and (2/n), respectively. The respective gain side weights (2/n) and (1/n) are based on (
). These weights represent the areas above the pillars for the two ECDF ranges (0, 2) and (2, 5) on the right-hand side of the zero axis in
Figure 2.
The KS02 weighting scheme of
appears to be the same as that of the partial moments of degree 1. Hence,
of (
6) is the ratio of the upper partial moment (UPM) of degree 1 to the analogous lower partial moment (LPM),
Viole and Nawrocki (
2016). In the R package called NNS,
Viole (
2021) has convenient functions called UPM and LPM to compute them, and hence
where
r is a vector of returns, and where we have included the arguments (degree = 1, target = 0) of the R functions in the NNS package. Considering that these ratios are decades old, there is a need to compare the out-of-sample performance of
from stock market return data using the NNS package with the three versions of Sharpe ratios in Equations (
1), (
3), and (
4).
This subsection has explained the logic behind the cumbersome weighting scheme in KS02. The following subsection shows how the ECDF weighting is not really needed to achieve the intent in
Bernardo and Ledoit (
2000).
1.1.3. Recommended Computation of “Omega” for Stock Returns
Recall that we regard omega as one of many stock-picking algorithms. This subsection suggests a direct computation of Equation (
5) for aggregate gain–aggregate loss ratios without using
and
weights. We divide the vector of returns
into positive
and negative
parts, proposing
where the subscript ‘sum’ refers to summations in the formula. The numerator and denominator are both positive. For example, the stock A with returns
has
. The stock B with returns
has the same
. The computation of
is seen to be easy and intuitive.
An alternative formulation is
where
denotes the number of positive returns in the data,
denotes the number of negative returns, and the subscript ‘avg’ refers to the averages in the formula. If the stock returns arose from an independent and identically distributed (IID) process, the probability of observing each return
is 1/n and averages equal mathematical expectations. Hence, it is tempting to prefer
over
. However, market returns are almost never IID. A stock’s return is intimately related to its own past, the returns of other stocks in its class, the socio-political conditions, etc. Since the joint density of all stocks is unknown, the probability of the sum of
k returns (
is also unknown.
Can we use the averages in
as an approximation by pretending that returns are IID? Let us compare the two formulas (
8) and (
9). Observe that
is larger than
when
is large, and that
is smaller when
is large. The total gain–loss ratio is being multiplied by (
). What are the implications of the relative sizes of (
) to the investor’s bottom line? We use two imaginary stocks, A and B, to argue that a larger (smaller) ratio (
) does not benefit (hurt) the bottom line of the investor and should be ignored.
Assume two sets of stock returns
and
. They have the same
, though the
. If one relies on
, we have to conclude that the gain–pain ratio for stock A is over three times better than stock B. The aggregate gain (=7), aggregate loss (=4), and gain–loss ratio (7/4 = 1.75) to the investor is exactly the same for stocks A and B. The aggregate gain of 7 for stock B is spread over
periods, while the aggregate loss (=4) is spread over only one period
. The aggregate gain and loss for stock A is spread over two periods
. The practically irrelevant (to the investor) sizes of (
) should not be allowed to contaminate the computation of the gain–loss ratio. We conclude this section by stating that there are sound reasons for rejecting
of (
9) in favor of the simpler
of (
8).
Table 3.
Table of basic descriptive stats. ‘Sharpe’ is the ratio of mean to standard deviation (sd). is , the sum of all positive returns divided by the sum of all negative returns. Number of non-missing or available sample size in the last column, ‘Av.N’. Part 1.
Table 3.
Table of basic descriptive stats. ‘Sharpe’ is the ratio of mean to standard deviation (sd). is , the sum of all positive returns divided by the sum of all negative returns. Number of non-missing or available sample size in the last column, ‘Av.N’. Part 1.
Ticker | Min | Q1 | Median | Mean | Q3 | Max | Sd | Sharpe | | Av.N |
---|
aapl | −57.74 | −4.66 | 2.53 | 2.40 | 9.81 | 45.38 | 12.20 | 0.20 | 1.7 | 473 |
amgn | −41.53 | −3.62 | 1.59 | 2.17 | 6.36 | 45.88 | 9.94 | 0.22 | 1.9 | 473 |
amzn | −41.16 | −4.73 | 2.47 | 3.61 | 9.74 | 126.38 | 16.56 | 0.22 | 2.0 | 324 |
axp | −32.09 | −2.38 | 1.37 | 1.31 | 5.86 | 85.03 | 8.72 | 0.15 | 1.6 | 473 |
ba | −45.47 | −3.82 | 1.45 | 1.18 | 6.99 | 45.93 | 8.83 | 0.13 | 1.4 | 473 |
cat | −35.91 | −4.16 | 1.69 | 1.52 | 7.15 | 40.14 | 8.96 | 0.17 | 1.6 | 473 |
crm | −36.03 | −4.61 | 1.75 | 2.39 | 8.98 | 40.26 | 11.08 | 0.22 | 1.8 | 239 |
csco | −36.73 | −4.01 | 1.70 | 2.19 | 8.27 | 38.92 | 10.48 | 0.21 | 1.8 | 411 |
cvx | −21.46 | −2.57 | 1.09 | 1.15 | 4.76 | 26.97 | 6.47 | 0.18 | 1.6 | 473 |
dis | −28.64 | −3.34 | 1.05 | 1.28 | 5.73 | 31.26 | 7.91 | 0.16 | 1.5 | 473 |
dow | −26.45 | −3.37 | 1.24 | 0.86 | 6.30 | 25.48 | 9.41 | 0.09 | 1.3 | 62 |
gs | −27.73 | −5.20 | 1.33 | 1.15 | 6.64 | 31.38 | 9.22 | 0.12 | 1.4 | 300 |
hd | −28.57 | −3.41 | 1.71 | 1.91 | 7.06 | 30.33 | 8.14 | 0.23 | 1.8 | 473 |
hon | −38.19 | −2.39 | 1.33 | 1.18 | 5.06 | 51.05 | 7.75 | 0.15 | 1.5 | 473 |
ibm | −24.86 | −3.61 | 0.75 | 0.84 | 5.00 | 35.38 | 7.44 | 0.11 | 1.4 | 473 |
Table 4.
Table of basic descriptive stats. Sharpe is the ratio of mean to standard deviation (sd). is , the sum of all positive returns divided by the sum of all negative returns. Number of non-missing or available sample size in the last column, ‘Av.N’. Part 2.
Table 4.
Table of basic descriptive stats. Sharpe is the ratio of mean to standard deviation (sd). is , the sum of all positive returns divided by the sum of all negative returns. Number of non-missing or available sample size in the last column, ‘Av.N’. Part 2.
Ticker | Min | Q1 | Median | Mean | Q3 | Max | Sd | Sharpe | | Av.N |
---|
intc | −44.47 | −4.39 | 1.25 | 1.52 | 7.05 | 48.81 | 10.67 | 0.14 | 1.5 | 473 |
jnj | −16.34 | −2.23 | 1.25 | 1.22 | 4.43 | 19.29 | 5.59 | 0.22 | 1.8 | 473 |
jpm | −32.68 | −3.86 | 1.22 | 1.32 | 6.36 | 33.75 | 9.17 | 0.14 | 1.5 | 473 |
ko | −19.33 | −2.08 | 1.24 | 1.20 | 4.62 | 22.64 | 5.83 | 0.21 | 1.7 | 473 |
mcd | −25.67 | −2.16 | 1.36 | 1.26 | 5.04 | 18.26 | 5.94 | 0.21 | 1.7 | 473 |
mmm | −27.83 | −2.46 | 1.22 | 1.01 | 4.40 | 25.80 | 6.07 | 0.17 | 1.5 | 473 |
mrk | −26.62 | −3.02 | 1.12 | 1.33 | 5.86 | 23.29 | 6.94 | 0.19 | 1.6 | 473 |
msft | −34.35 | −3.56 | 2.25 | 2.36 | 6.80 | 51.55 | 9.45 | 0.25 | 2.0 | 458 |
nke | −37.50 | −3.30 | 1.84 | 1.90 | 7.02 | 39.34 | 9.40 | 0.20 | 1.7 | 473 |
pg | −35.42 | −1.77 | 1.20 | 1.20 | 4.92 | 24.69 | 5.57 | 0.22 | 1.8 | 473 |
trv | −53.47 | −3.17 | 1.42 | 1.09 | 5.03 | 52.51 | 7.34 | 0.15 | 1.5 | 473 |
unh | −36.51 | −3.21 | 2.50 | 2.18 | 7.39 | 40.70 | 9.57 | 0.23 | 1.9 | 473 |
v | −19.69 | −2.47 | 2.27 | 1.58 | 5.25 | 16.83 | 6.14 | 0.26 | 1.9 | 194 |
vz | −20.48 | −2.75 | 0.52 | 0.89 | 4.92 | 37.61 | 6.17 | 0.14 | 1.5 | 473 |
wmt | −27.06 | −2.40 | 1.25 | 1.37 | 5.55 | 26.59 | 6.48 | 0.21 | 1.7 | 473 |