STRASMORE/EXPLORE 3,171 QUERIES

Cumulative weight and the Herfindahl concentration index

Answered against 22 years of US equities and 12 years of US options data and published with the query that produced it. This result is stored as of 2026-10-07, from Portfolio Analysis in SQL: Weights to Drawdown.

as of ranking 6×4read in context →
Cumulative weight and the Herfindahl concentration index — 6 rows by 4 columns, computed from US exchange, SIP and OPRA data.
tickerweight_pctcumulative_weight_pctcumulative_hhi
AAPL25.7125.71661
KO16.5542.26935
XOM15.8658.121186
MSFT15.0873.21414
JNJ14.6887.881629
NVDA12.121001776
Rows × columns
6 × 4
Computed
Completeness
No missing values
Source
US exchange, SIP and OPRA market data
Licence
Strasmore terms · free, no signup
Formats
JSON · CSV · the SQL below

What each column holds

Column definitions for Cumulative weight and the Herfindahl concentration index, derived from the stored result.
ColumnTypeRangeNotes
ticker text 6 distinct values (AAPL, JNJ, KO…)
weight_pct number 12.12 to 25.71 percent
cumulative_weight_pct number 25.71 to 100 percent
cumulative_hhi number 661 to 1,776

Computed from Strasmore's warehouse of US exchange, SIP and OPRA market data. Equity prices are delayed; options greeks and implied volatility are end-of-day. This result is stored, not recomputed on load — it is exactly the numbers that were returned on , and the query below is what returned them.

Run it yourself

This is the exact query behind the result above. Change a ticker, a date or a column and run it against the warehouse — no account, no key. The no-signup tier is smaller than the one this page was computed on; a query that reaches past it comes back saying which plan runs it.

WITH holdings AS
(
    SELECT 'AAPL' AS ticker, 120 AS shares
    UNION ALL SELECT 'MSFT', 45
    UNION ALL SELECT 'NVDA', 80
    UNION ALL SELECT 'KO',   300
    UNION ALL SELECT 'JNJ',  90
    UNION ALL SELECT 'XOM',  150
),
marks AS
(
    SELECT
        ticker,
        argMax(toFloat64(close), (date, _ingest_time)) AS last_close
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('AAPL', 'MSFT', 'NVDA', 'KO', 'JNJ', 'XOM')
      AND date >= today() - 30
    GROUP BY ticker
),
weights AS
(
    SELECT
        h.ticker AS ticker,
        round(100 * (h.shares * m.last_close)
              / sum(h.shares * m.last_close) OVER (), 4) AS weight_pct
    FROM holdings AS h
    INNER JOIN marks AS m ON m.ticker = h.ticker
)
SELECT
    ticker,
    round(weight_pct, 2) AS weight_pct,
    round(sum(weight_pct) OVER (ORDER BY weight_pct DESC
         ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW), 2) AS cumulative_weight_pct,
    round(sum(pow(weight_pct, 2)) OVER (ORDER BY weight_pct DESC
         ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW), 0) AS cumulative_hhi
FROM weights
ORDER BY weight_pct DESC
⌘/Ctrl + Enter

Work with this data in your AI assistant

Opens ready to query, with this page's data. Free, no account.

More from this analysisPortfolio Analysis in SQL: Weights to Drawdown
Pairwise daily return correlation, trailing year ranking 15×2 → Weekly peak-to-trough drawdown of the blended portfolio series 53×4 → Position weights from last close times share count table 6×6 → Trailing twelve-month dividend income by holding table 6×6 → Correlation of price levels against correlation of daily returns, same pairs ranking 15×4 → Pairwise correlation of daily returns, six large caps, Oct 2025 to Sep 2026 ranking 15×2 → See all 3,171 queries →