STRASMORE/EXPLORE 2,882 QUERIES

konteks_tren

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 bearish-candlestick-patterns.

as of table 4×5read in context →
konteks_tren — 4 rows by 5 columns, computed from US exchange, SIP and OPRA data.
tren_bucketkejadian_countturun_1_sesi_pctturun_5_sesi_pctturun_20_sesi_pct
1. sepuluh sesi sebelumnya turun lebih dari 5%6855.948.544.1
2. sepuluh sesi sebelumnya turun sampai 5%35945.441.237
3. sepuluh sesi sebelumnya naik sampai 5%56246.844.542
4. sepuluh sesi sebelumnya naik lebih dari 5%13041.543.846.9
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 konteks_tren, derived from the stored result.
ColumnTypeRangeNotes
tren_bucket text 4 distinct values
kejadian_count number 68 to 562 count
turun_1_sesi_pct number 41.5 to 55.9 percent
turun_5_sesi_pct number 41.2 to 48.5 percent
turun_20_sesi_pct number 37 to 46.9 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
harian AS (
    SELECT ticker, date,
           argMax(toFloat64(open),  _ingest_time) AS o,
           argMax(toFloat64(close), _ingest_time) AS c
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('AAPL', 'MSFT', 'JPM', 'JNJ', 'KO', 'PG', 'WMT', 'XOM')
      AND date BETWEEN '2010-01-01' AND '2026-03-31'
    GROUP BY ticker, date
),
pecahan AS (
    SELECT ticker, groupArray(execution_date) AS tanggal
    FROM global_markets.stocks_splits
    WHERE ticker IN ('AAPL', 'MSFT', 'JPM', 'JNJ', 'KO', 'PG', 'WMT', 'XOM')
      AND execution_date BETWEEN '2009-11-01' AND '2026-05-31'
    GROUP BY ticker
),
bars AS (
    SELECT ticker, date, o, c,
           lagInFrame(o, 1)   OVER w AS p1o,
           lagInFrame(c, 1)   OVER w AS p1c,
           lagInFrame(c, 11)  OVER w AS p11c,
           leadInFrame(c, 1)  OVER w AS f1c,
           leadInFrame(c, 5)  OVER w AS f5c,
           leadInFrame(c, 20) OVER w AS f20c
    FROM harian
    WINDOW w AS (PARTITION BY ticker ORDER BY date ROWS BETWEEN 25 PRECEDING AND 20 FOLLOWING)
)
SELECT multiIf(100 * (b.p1c / b.p11c - 1) < -5, '1. sepuluh sesi sebelumnya turun lebih dari 5%',
               100 * (b.p1c / b.p11c - 1) <  0, '2. sepuluh sesi sebelumnya turun sampai 5%',
               100 * (b.p1c / b.p11c - 1) <  5, '3. sepuluh sesi sebelumnya naik sampai 5%',
                                                '4. sepuluh sesi sebelumnya naik lebih dari 5%') AS tren_bucket,
       count()                                         AS kejadian_count,
       round(100 * countIf(b.f1c  < b.c) / count(), 1) AS turun_1_sesi_pct,
       round(100 * countIf(b.f5c  < b.c) / count(), 1) AS turun_5_sesi_pct,
       round(100 * countIf(b.f20c < b.c) / count(), 1) AS turun_20_sesi_pct
FROM bars AS b
LEFT JOIN pecahan AS s ON s.ticker = b.ticker
WHERE b.date BETWEEN '2010-03-01' AND '2025-12-31'
  AND b.p1c > b.p1o AND b.c < b.o AND b.o > b.p1c AND b.c < b.p1o
  AND b.p11c > 0 AND b.f1c > 0 AND b.f5c > 0 AND b.f20c > 0
  AND NOT arrayExists(d -> d > b.date - 30 AND d <= b.date + 45, s.tanggal)
GROUP BY tren_bucket
ORDER BY tren_bucket
⌘/Ctrl + Enter

Olah data ini di asisten AI Anda

Terbuka siap dikueri, dengan data halaman ini. Gratis, tanpa akun.