STRASMORE/EXPLORE 3,171 QUERIES

dragonfly_context

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 dragonfly-doji-follow-through.

as of table 4×5read in context →
dragonfly_context — 4 rows by 5 columns, computed from US exchange, SIP and OPRA data.
contextsample_countsample_sizemedian_5d_pctmedian_20d_pct
dragonfly_after_5d_decline2022020.4221.035
dragonfly_mid_range2332330.4441.382
other_days_after_5d_decline4270743 ஆயிரம்0.4451.225
other_days_mid_range5303353 ஆயிரம்0.2451.203
Rows × columns
4 × 5
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 dragonfly_context, derived from the stored result.
ColumnTypeRangeNotes
context text 4 distinct values
sample_count number 202 to 53,033 count
sample_size text 4 distinct values (202, 233, 43 ஆயிரம்…)
median_5d_pct number 0.245 to 0.445 percent
median_20d_pct number 1.035 to 1.382 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 bars AS
(
    SELECT
        ticker,
        date,
        toFloat64(open)  AS o,
        toFloat64(high)  AS h,
        toFloat64(low)   AS l,
        toFloat64(close) AS c
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('AAPL','MSFT','NVDA','AMZN','GOOGL','META','JPM','XOM','JNJ','KO','PG','WMT','HD','UNH','CVX','MRK','CSCO','PEP','SPY','QQQ')
      AND date >= '2006-01-01'
      AND date <  '2026-10-01'
      AND high > low
      AND low > 0
),
shaped AS
(
    SELECT
        ticker,
        date,
        c,
        h - l              AS rng,
        abs(c - o)         AS body,
        h - greatest(o, c) AS upper_wick,
        least(o, c) - l    AS lower_wick,
        0.01 * o           AS min_range,
        lagInFrame(c, 5)   OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN 5 PRECEDING AND CURRENT ROW)  AS c_prev5,
        leadInFrame(c, 5)  OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN CURRENT ROW AND 20 FOLLOWING) AS c_fwd5,
        leadInFrame(c, 20) OVER (PARTITION BY ticker ORDER BY date ASC ROWS BETWEEN CURRENT ROW AND 20 FOLLOWING) AS c_fwd20
    FROM bars
),
tagged AS
(
    SELECT
        ticker,
        date,
        c,
        c_prev5,
        c_fwd5,
        c_fwd20,
        multiIf(
            rng >= min_range AND body <= 0.10 * rng AND upper_wick <= 0.10 * rng, 'dragonfly',
            rng >= min_range AND body <= 0.10 * rng AND lower_wick <= 0.10 * rng, 'gravestone',
            'other_days') AS pattern
    FROM shaped
),
ctx AS
(
    SELECT
        ticker,
        date,
        c,
        c_fwd5,
        c_fwd20,
        concat(pattern, if(c < c_prev5, '_after_5d_decline', '_mid_range')) AS context
    FROM tagged
    WHERE pattern != 'gravestone'
      AND c_prev5 > 0
      AND c_fwd5  > 0
      AND c_fwd20 > 0
)
SELECT
    context,
    count()                 AS sample_count,
    if(count() >= 10000,
       concat(toString(round(count() / 1000)), ' ஆயிரம்'),
       toString(count()))   AS sample_size,
    round(100 * (quantileDeterministic(0.5)(c_fwd5  / c, cityHash64(concat(ticker, toString(date)))) - 1), 3) AS median_5d_pct,
    round(100 * (quantileDeterministic(0.5)(c_fwd20 / c, cityHash64(concat(ticker, toString(date)))) - 1), 3) AS median_20d_pct
FROM ctx
GROUP BY context
ORDER BY context
⌘/Ctrl + Enter

Work with this data in your AI assistant

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