Portfolio Entropy: How Many Effective Holdings Do You Have?

Table of Contents

    Four stocks can each have a quarter of your money, or one stock can have 70% while the other three share the rest. The holding count is four either way. Portfolio entropy uses the weights to tell you how evenly your money is spread. Converting entropy to an effective number of holdings puts that result on the same scale as a holding count. Inverse HHI gives a second effective count that responds more strongly to large positions.

    Choose which weights to measure

    Start with a snapshot of a fully funded, long-only portfolio. You can use the current market values from a brokerage holdings table, expressed in one currency. Divide each holding’s market value by the total market value of everything you include. Enter 25% as 0.25 in the formulas below. The weights must be nonnegative and sum to 1 before rounding.

    1. Set the scope and date. Use one account or combine accounts you want to evaluate together. Value positions at the same time. If you compare two dates, keep the account scope and grouping consistent so the change reflects the allocations.
    2. Choose what counts as a holding. For a fund-level view, count each fund as its own holding. To measure issuer exposure, break funds into underlying positions, multiply each position’s share of its fund by the fund’s share of your portfolio, and add exposures to the same issuer across all funds and direct holdings. This can reveal overlap that a fund-level count misses.[5]
    3. Decide how to treat cash. Include cash as one bucket to measure the full allocation. To measure only the invested portion, exclude cash and divide each holding’s value by the invested total so the remaining weights sum to 1. An all-cash portfolio has no invested-only count because its invested total is zero. If you include cash as its sole funded bucket, both effective counts are 1.

    Calculate entropy and effective holdings

    Imagine picking one dollar at random from your portfolio and asking which holding it belongs to. A stock with 70% of your capital would be the answer 70% of the time. With four equal weights, the answer is harder to guess. Shannon entropy measures that uncertainty using the position weights as probabilities.[1]

    Shannon entropy and its effective count
    H = −∑i wi ln(wi)
    Multiply each decimal weight by the negative of its natural logarithm and add the terms. Then calculate exp(H) to get the effective count.

    The natural logarithm, written ln, gives entropy in nats. A zero-weight position contributes zero, the limit of the term as the weight approaches zero. With N equally weighted positions, every weight is 1/N, so entropy is ln(N) and exp(H) is N. The effective count reflects both the number of funded holdings and how evenly capital is split among them. An equally weighted portfolio of four holdings has a count of four, and one of eight has a count of eight. A fractional result falls between two whole-number equal-weight benchmarks.[1][2]

    The Herfindahl-Hirschman Index (HHI) adds squared shares. Applied to portfolio weights, it equals 1/N when N holdings are equally weighted. Its reciprocal therefore also gives N in the equal-weight case.[2][3]

    HHI and its effective count
    HHI = ∑i wi2
    For decimal weights, the effective count is 1 ÷ HHI. With percentage inputs such as 25, HHI is in points and the effective count is 10,000 ÷ HHI points.

    Each percentage input is 100 times its decimal weight, so squaring it makes the points total 10,000 times the decimal total. The market concentration HHI calculator can check the squared-share total in points.

    Compare two four-stock portfolios

    Suppose two hypothetical portfolios are each worth $10,000 at the same close. Both hold four stocks and have no cash or borrowing. Portfolio A has $2,500 in each stock. Portfolio B has $7,000 in one stock and $1,000 in each of the other three.

    Capital weights and effective holdings for two hypothetical portfolios
    Measure Portfolio A Portfolio B
    Stock weights 25% / 25% / 25% / 25% 70% / 10% / 10% / 10%
    Shannon entropy (nats) 1.3863 0.9404
    Shannon effective count 4.00 2.56
    HHI (decimals) 0.25 0.52
    Inverse-HHI effective count 4.00 1.92

    Portfolio A has four identical terms in each calculation. Its entropy is −4 × 0.25 × ln(0.25), and its HHI is 4 × 0.252. For Portfolio B, entropy is −[0.70 × ln(0.70) + 3 × 0.10 × ln(0.10)]. Keep the unrounded result when applying the exponential. The same weights give an HHI of 0.702 + 3 × 0.102 = 0.52. On the points scale, that is 5,200, so 10,000 ÷ 5,200 also gives about 1.92 effective holdings.

    Both methods put Portfolio B below its holding count of four. The inverse-HHI count is lower because squaring gives more influence to the dominant weight. The 70% position is seven times as large as any 10% position, and its squared term is 49 times as large. For any nonnegative weight distribution that sums to 1, the inverse-HHI count is at or below the Shannon effective count. They match when the positive weights are equal.[2]

    See how the same weights can produce different risk

    Keep Portfolio A’s four 25% weights and assume each stock has 20% annual return volatility. Now consider two sets of return correlations. Portfolio variance includes each stock’s own variance and the covariances between pairs of stocks, which depend on their volatilities and correlations.[4]

    • Every pair has zero correlation. The covariance terms between different stocks are zero. The four individual variance terms add up to 4 × 0.252 × 0.202 = 0.01. The square root gives 10% annual volatility.
    • Every pair has a correlation of +1. The stocks’ returns move together perfectly. Portfolio volatility equals the weighted average of the four 20% volatilities, giving 20% annual volatility.

    Both cases still have 4.00 effective holdings under either weight-based measure. The diversification ratio used on this site is portfolio volatility divided by the weighted average of the holdings’ volatilities. That average is 20% in both cases, so the ratio is 0.50 in the first case and 1.00 in the second. The ratio compares volatilities. The effective counts describe how capital is allocated.

    Common mistakes when checking concentration

    Equal share counts can hide very different positions. For example, 10 shares at $100 and 10 shares at $25 give you $1,000 and $250 in market value, so the weights are 80% and 20%. Use those dollar weights to measure current concentration. If you also calculate the count for target weights, label it separately so you can see how the portfolio has drifted from the plan.

    Handle short positions and leverage separately

    A portfolio that is 130% long and 30% short has signed weights of 1.30 and −0.30 relative to equity. The net weights sum to 1. The negative weight is outside the domain of the natural logarithm, and squaring removes the direction of the short position. In a long-only margin portfolio, the securities can also add up to more than 100% of equity because part of the purchase was financed with borrowed money.[6][7]

    Dividing absolute position sizes by total gross exposure can describe how the gross book is split. Use that as a separate calculation and keep the gross exposure visible. In this example, the long and short sides add up to 160% gross exposure relative to equity. That scale and the direction of the positions are information the normalized gross weights leave out.

    Frequently asked questions


    If one holding has all the weight, Shannon entropy is zero because ln(1) = 0. The Shannon count is exp(0) = 1 and the inverse-HHI count is 1 ÷ 12 = 1.


    Yes. In the worked example, four stocks with a 70% position have lower effective counts than a portfolio of three equally weighted stocks, which has a count of 3 under both methods.


    The count is a snapshot of how you’ve allocated capital. Use it to see how concentrated your holdings are and how that changes over time. Judging risk calls for the assets’ exposures, volatilities and correlations, along with your investment objectives.

    Sources

    1. Claude E. Shannon, A Mathematical Theory of Communication, §6 (1948).
    2. M. O. Hill, Diversity and Evenness: A Unifying Notation and Its Consequences, pp. 428–429 (1973). Original paper scan.
    3. U.S. Department of Justice and Federal Trade Commission, 2023 Merger Guidelines, Guideline 1, “Concentration levels.”
    4. Harry Markowitz, Portfolio Selection, pp. 80–81 (1952).
    5. FINRA, Concentrate on Concentration Risk (2022).
    6. SEC Investor.gov, An Introduction to Short Sales (2015).
    7. SEC Investor.gov, Understanding Margin Accounts (2021).
    Disclaimer

    This article is for educational purposes. The portfolios and volatility scenarios are hypothetical.