STRASMORE/EXPLORE 2,170 QUERIES

Hedge ratio refitted each calendar year, two sector pairs

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-08-13, from Pairs Trading and Cointegration Explained.

as of ranking 7×3read in context →
Hedge ratio refitted each calendar year, two sector pairs — 7 rows by 3 columns, computed from US exchange, SIP and OPRA data.
yearpep_on_ko_betalowes_on_hd_beta
20192.3380.278
20201.1690.87
20213.3450.628
20221.0150.588
20232.9860.521
20240.5460.635
2025-0.5430.539
Rows × columns
7 × 3
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 Hedge ratio refitted each calendar year, two sector pairs, derived from the stored result.
ColumnTypeRangeNotes
year number 2,019 to 2,025
pep_on_ko_beta number -0.543 to 3.345
lowes_on_hd_beta number 0.278 to 0.87

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.

the exact SQL behind every number
WITH daily AS (
    SELECT
        date,
        anyIf(toFloat64(close), ticker = 'PEP') AS pep,
        anyIf(toFloat64(close), ticker = 'KO')  AS ko,
        anyIf(toFloat64(close), ticker = 'LOW') AS lowes,
        anyIf(toFloat64(close), ticker = 'HD')  AS hd
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('KO', 'PEP', 'HD', 'LOW')
      AND date BETWEEN '2019-01-01' AND '2025-12-31'
    GROUP BY date
    HAVING ko > 0 AND pep > 0 AND hd > 0 AND lowes > 0
)
SELECT
    toYear(date)                                  AS year,
    round(covarSamp(pep, ko) / varSamp(ko), 3)    AS pep_on_ko_beta,
    round(covarSamp(lowes, hd) / varSamp(hd), 3)  AS lowes_on_hd_beta
FROM daily
GROUP BY year
ORDER BY year

Run your own version of this

The same 22 years of US equities and 12 years of options data are queryable in SQL or plain English. A free account runs 100 queries a day and takes no card.

More from this analysisPairs Trading and Cointegration Explained
Where the KO/PEP spread sat twenty sessions later, by starting z score (2019-2025) ranking 6×4 Daily-return correlation vs price-level correlation, five familiar pairs (2024-2025) ranking 5×3 Weekly z score of the KO/PEP spread, hedge ratio fitted on 2023 only series 105×2 Variance ratio by block length: does SPY variance scale like independent draws? ranking 7×3 Lag-one autocorrelation: signed returns against absolute returns, 2016 to 2025 ranking 6×4 One position, one year at a time: SPY annualized Sharpe by calendar year table 14×5 See all 2,170 queries →