STRASMORE/EXPLORE 2,882 QUERIES

fine_grid

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-01, from backtest-vs-forward-test.

as of ranking 5×3read in context →
fine_grid — 5 rows by 3 columns, computed from US exchange, SIP and OPRA data.
labelcagr_in_sample_pctcagr_forward_pct
MA 1807.78.42
MA 1907.928.37
MA 2008.397.87
MA 2108.297.78
MA 2208.697.87
Rows × columns
5 × 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 fine_grid, derived from the stored result.
ColumnTypeRangeNotes
label text 5 distinct values (MA 180, MA 190, MA 200…)
cagr_in_sample_pct number 7.7 to 8.69 percent
cagr_forward_pct number 7.78 to 8.42 percent

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,
        toFloat64(close) AS c
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('SPY', 'MSFT', 'JPM', 'HD', 'PEP')
      AND date >= '2008-12-01'
      AND date <  '2026-10-01'
),
ma AS (
    SELECT
        ticker,
        date,
        c,
        avg(c) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 179 PRECEDING AND CURRENT ROW) AS ma_180,
        avg(c) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 189 PRECEDING AND CURRENT ROW) AS ma_190,
        avg(c) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 199 PRECEDING AND CURRENT ROW) AS ma_200,
        avg(c) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 209 PRECEDING AND CURRENT ROW) AS ma_210,
        avg(c) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 219 PRECEDING AND CURRENT ROW) AS ma_220
    FROM px
),
grid AS (
    SELECT
        ticker,
        date,
        c,
        g.1 AS label,
        g.2 AS ma_value
    FROM ma
    ARRAY JOIN [('MA 180', ma_180), ('MA 190', ma_190), ('MA 200', ma_200), ('MA 210', ma_210), ('MA 220', ma_220)] AS g
),
sig AS (
    SELECT
        label,
        ticker,
        date,
        c,
        any(c)                      OVER (PARTITION BY label, ticker ORDER BY date ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) AS prev_c,
        any(if(c > ma_value, 1, 0)) OVER (PARTITION BY label, ticker ORDER BY date ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) AS held
    FROM grid
),
port AS (
    SELECT
        label,
        if(date < '2020-01-01', 'in_sample', 'forward') AS window_name,
        date,
        avg(held * (c / prev_c - 1)) AS r
    FROM sig
    WHERE prev_c > 0
      AND ((date >= '2010-01-01' AND date < '2020-01-01')
        OR (date >= '2020-09-01' AND date < '2026-10-01'))
    GROUP BY label, window_name, date
),
curve AS (
    SELECT
        label,
        window_name,
        date,
        exp(sum(log(1 + r)) OVER (PARTITION BY label, window_name ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)) AS equity
    FROM port
),
metrics AS (
    SELECT
        label,
        window_name,
        round((pow(argMax(equity, date), 252.0 / count()) - 1) * 100, 2) AS cagr_pct
    FROM curve
    GROUP BY label, window_name
)
SELECT
    label,
    anyIf(cagr_pct, window_name = 'in_sample') AS cagr_in_sample_pct,
    anyIf(cagr_pct, window_name = 'forward')   AS cagr_forward_pct
FROM metrics
GROUP BY label
HAVING countIf(window_name = 'in_sample') > 0
   AND countIf(window_name = 'forward') > 0
ORDER BY label
⌘/Ctrl + Enter

ใช้ข้อมูลนี้ในผู้ช่วย AI ของคุณ

เปิดพร้อมคิวรีได้ทันที พร้อมข้อมูลของหน้านี้ ฟรี ไม่ต้องมีบัญชี