STRASMORE/EXPLORE 3,256 QUERIES 22Y EQUITIES · 12Y OPTIONS

3,256 answered market questions

every one with its exact SQL, its result and the date it was computed · free, no signup

Portfolio Analysis in SQL: Weights to Drawdown
Position weights from last close times share counttable · 2026-10-07 · 6×6 Pairwise daily return correlation, trailing yearranking · 2026-10-07 · 15×2Preview: 15 ranked values, largest first. Weekly peak-to-trough drawdown of the blended portfolioseries · 2026-10-07 · 53×4Preview: a 16-point series, roughly flat. Trailing twelve-month dividend income by holdingtable · 2026-10-07 · 6×6 Cumulative weight and the Herfindahl concentration indexranking · 2026-10-07 · 6×4Preview: 6 ranked values, largest first.
The Lowest-Volatility Stocks
The calmest large caps: annualized realized volatility over the past year, lowest firstranking · 2026-10-04 · 15×2Preview: 15 ranked values, smallest first. Maximum drawdown of the calmest names: the worst peak-to-trough fall over the past yearranking · 2026-10-04 · 8×2Preview: 8 ranked values, largest first.
Did Stocks Take 25 Years to Recover From 1929?
SPY cash distributions each year, as a percent of the year's opening share priceranking · 2026-10-04 · 19×2Preview: 16 ranked values, smallest first. Price weight vs market-cap weight across eight large US namesranking · 2026-10-04 · 8×4Preview: 8 ranked values, largest first. SPY from its October 2007 peak month: price only vs dividends reinvestedtable · 2026-10-04 · 75×4
The Real Risk of One Stock
Annualized volatility: the S&P 500 index versus six single stocks (last ~250 sessions)ranking · 2026-10-04 · 7×2Preview: 7 ranked values, smallest first. Same $100 invested: one single stock versus the S&P 500 index, indexed to 100series · 2026-10-04 · 14×3Preview: a 14-point series, ending lower. Maximum drawdown: deepest peak-to-trough drop over the last yearranking · 2026-10-04 · 7×2Preview: 7 ranked values, smallest first.
How Long a Losing Streak Is Normal
Chance of at least one losing streak of five, eight or ten in a 200 trade seriesranking · 2026-08-17 · 5×4Preview: 5 ranked values, smallest first. Chance of at least one five loss run at a 70 percent win rate, by series lengthranking · 2026-08-17 · 5×2Preview: 5 ranked values, smallest first. One named window against somewhere in a 200 trade series, at a 70 percent win rateranking · 2026-08-17 · 3×4Preview: 3 ranked values, largest first. How long the worst losing run of a 200 trade series usually is, at a 70 percent win rateranking · 2026-08-17 · 7×3Preview: 7 ranked values, largest first. Drawdown from an eight and a ten loss streak, by risk per traderanking · 2026-08-17 · 4×4Preview: 4 ranked values, smallest first.
What Is Maximum Drawdown? Depth vs Recovery
Same fund, five lookback windows: SPY maximum drawdown by sample length to July 31, 2026ranking · 2026-08-05 · 5×3Preview: 5 ranked values, smallest first. Completed SPY drawdowns since 2016: depth, days falling, days climbing backtable · 2026-08-05 · 8×5 SPY underwater curve: month end close against its running peak, 2016 to 2026series · 2026-08-05 · 127×2Preview: a 16-point series, roughly flat. Maximum drawdown against annualized volatility: eight large caps, five years to July 31, 2026ranking · 2026-08-05 · 8×3Preview: 8 ranked values, largest first.
Kelly Criterion Position Sizing, Measured
Kelly inputs from daily closes, 2016 through 2025: win rate, average gain, average loss, and the fraction the formula returnstable · 2026-07-31 · 6×5 The same Kelly calculation on the S&P 500 tracker, year by year, 2016 through 2025table · 2026-07-31 · 10×5 One decade of S&P 500 daily returns compounded at eight fixed bet sizes: ending wealth and worst drawdownranking · 2026-07-31 · 8×3Preview: 8 ranked values, smallest first.
Position weights from last close times share count

Position weights from last close times share count

most recentas of table 6×6read in context →
Position weights from last close times share count — 6 rows by 6 columns, computed from US exchange, SIP and OPRA data.
tickershareslast_closeposition_valueweight_pctpriced_through
AAPL120336.174034125.71Oct 7, 2026
KO30086.572597116.55Oct 7, 2026
XOM150165.882488115.86Oct 7, 2026
MSFT45525.692365615.08Oct 7, 2026
JNJ90255.892303014.68Oct 7, 2026
NVDA80237.611900912.12Oct 7, 2026
the exact SQL behind every number
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,
        max(date)                                      AS last_session
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('AAPL', 'MSFT', 'NVDA', 'KO', 'JNJ', 'XOM')
      AND date >= today() - 30
    GROUP BY ticker
),
positions AS
(
    SELECT
        h.ticker                          AS ticker,
        h.shares                          AS shares,
        round(m.last_close, 2)            AS last_close,
        round(h.shares * m.last_close, 0) AS position_value,
        m.last_session                    AS last_session
    FROM holdings AS h
    INNER JOIN marks AS m ON m.ticker = h.ticker
)
SELECT
    ticker,
    shares,
    last_close,
    position_value,
    round(100 * position_value / sum(position_value) OVER (), 2) AS weight_pct,
    formatDateTime(last_session, '%b %e, %Y')                    AS priced_through
FROM positions
ORDER BY weight_pct DESC
$