wedge_vs_base
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-06, from falling-wedge-pattern.
| horizon | wedge_up_pct | base_up_pct | avg_gap_pct | wedge_signals |
|---|---|---|---|---|
| 5 | 52.3 | 54.4 | -0.02 | 287 |
| 10 | 51.9 | 55.7 | -0.39 | 287 |
| 20 | 54 | 57.1 | -0.76 | 287 |
- Rows × columns
- 3 × 5
- Computed
- Completeness
- No missing values
- Source
- US exchange, SIP and OPRA market data
- Licence
- Strasmore terms · free, no signup
What each column holds
| Column | Type | Range | Notes |
|---|---|---|---|
horizon |
number | 5 to 20 | |
wedge_up_pct |
number | 51.9 to 54 | percent |
base_up_pct |
number | 54.4 to 57.1 | percent |
avg_gap_pct |
number | -0.76 to -0.02 | percent |
wedge_signals |
number | every row is 287 |
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(high) AS hi,
toFloat64(low) AS lo,
toFloat64(close) AS px
FROM global_markets.stocks_daily_aggs
WHERE ticker IN ('AAPL','MSFT','NVDA','AMZN','GOOGL','META','TSLA','AVGO','JPM','BAC','WFC','GS','KO','PEP','PG','JNJ','PFE','MRK','XOM','CVX','WMT','HD','MCD','NKE','CSCO','INTC','IBM','T','VZ','DIS')
AND date >= '2010-01-04'
AND date <= '2026-09-30'
),
split_dates AS (
SELECT
ticker,
groupArray(execution_date) AS split_days
FROM
(
SELECT ticker, execution_date
FROM global_markets.stocks_splits
WHERE execution_date >= '2009-10-01'
GROUP BY ticker, execution_date
)
GROUP BY ticker
),
stepped AS (
SELECT
ticker,
date,
px,
hi - lo AS rng,
if(hi < lagInFrame(hi, 1) OVER w AND lo < lagInFrame(lo, 1) OVER w, 1, 0) AS lower_both
FROM bars
WINDOW w AS (PARTITION BY ticker ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
),
feat AS (
SELECT
ticker,
date,
px,
sum(lower_both) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) AS wedge_streak,
avg(rng) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 4 PRECEDING AND CURRENT ROW) AS rng5,
groupArray(rng) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 64 PRECEDING AND 5 PRECEDING) AS prior_rng,
lagInFrame(px, 5) OVER wf AS px_back5,
leadInFrame(px, 5) OVER wf AS px_fwd5,
leadInFrame(px, 10) OVER wf AS px_fwd10,
leadInFrame(px, 20) OVER wf AS px_fwd20
FROM stepped
WINDOW wf AS (PARTITION BY ticker ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
),
scored AS (
SELECT
f.px AS px,
f.px_fwd5 AS px_fwd5,
f.px_fwd10 AS px_fwd10,
f.px_fwd20 AS px_fwd20,
if(f.wedge_streak = 4 AND f.rng5 < arraySort(f.prior_rng)[15], 1, 0) AS is_wedge
FROM feat AS f
LEFT JOIN split_dates AS s ON s.ticker = f.ticker
WHERE length(f.prior_rng) = 60
AND f.px_back5 > 0
AND f.px_fwd5 > 0
AND f.px_fwd10 > 0
AND f.px_fwd20 > 0
AND NOT arrayExists(d -> (d >= f.date - 10) AND (d <= f.date + 32), s.split_days)
)
SELECT
horizon,
round(100 * countIf(is_wedge = 1 AND fwd_pct > 0) / countIf(is_wedge = 1), 1) AS wedge_up_pct,
round(100 * countIf(fwd_pct > 0) / count(), 1) AS base_up_pct,
round(avgIf(fwd_pct, is_wedge = 1) - avg(fwd_pct), 2) AS avg_gap_pct,
countIf(is_wedge = 1) AS wedge_signals
FROM
(
SELECT
is_wedge,
h.1 AS horizon,
h.2 AS fwd_pct
FROM
(
SELECT
is_wedge,
arrayJoin([
(5, 100 * (px_fwd5 / px - 1)),
(10, 100 * (px_fwd10 / px - 1)),
(20, 100 * (px_fwd20 / px - 1))
]) AS h
FROM scored
)
)
GROUP BY horizon
ORDER BY horizon ASC
Work with this data in your AI assistant
Opens ready to query, with this page's data. Free, no account.