STRASMORE/EXPLORE 3,171 QUERIES

Pairwise daily return correlation, trailing year

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 15×2read in context →
Pairwise daily return correlation, trailing year — 15 rows by 2 columns, computed from US exchange, SIP and OPRA data.
paircorrelation
JNJ / KO0.385
MSFT / NVDA0.255
AAPL / KO0.142
AAPL / MSFT0.137
KO / XOM0.127
JNJ / XOM0.113
AAPL / NVDA0.091
AAPL / JNJ0.089
AAPL / XOM-0.092
KO / MSFT-0.099
MSFT / XOM-0.132
NVDA / XOM-0.195
JNJ / NVDA-0.214
JNJ / MSFT-0.241
KO / NVDA-0.291
Rows × columns
15 × 2
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 Pairwise daily return correlation, trailing year, derived from the stored result.
ColumnTypeRangeNotes
pair text 15 distinct values (AAPL / JNJ, AAPL / KO, AAPL / MSFT…)
correlation number -0.291 to 0.385

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 px AS
(
    SELECT
        ticker,
        date,
        max(toFloat64(close)) AS close
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('AAPL', 'MSFT', 'NVDA', 'KO', 'JNJ', 'XOM')
      AND date >= today() - 420
      AND date <  today()
    GROUP BY ticker, date
),
rets AS
(
    SELECT
        ticker,
        date,
        close / lagInFrame(close) OVER (PARTITION BY ticker ORDER BY date
              ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) - 1 AS ret
    FROM px
)
SELECT
    concat(a.ticker, ' / ', b.ticker) AS pair,
    round(corr(a.ret, b.ret), 3)      AS correlation
FROM rets AS a
INNER JOIN rets AS b ON a.date = b.date
WHERE a.ticker < b.ticker
  AND a.date >= today() - 365
  AND isFinite(a.ret)
  AND isFinite(b.ret)
GROUP BY pair
ORDER BY correlation 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
Cumulative weight and the Herfindahl concentration index ranking 6×4 → 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 →