STRASMORE/EXPLORE 2,648 QUERIES

kanuni_za_saa

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-09-26, from us-stock-market-hours-east-africa-time.

as of table 3×8read in context →
kanuni_za_saa — 3 rows by 8 columns, computed from US exchange, SIP and OPRA data.
ratibaeat_openeat_closesession_countkikao_cha_kwanzakikao_cha_mwishoopen_eat_hrclose_eat_hr
16:30 hadi 23:0016:3023:0016822 Septemba 202523 Septemba 202616.523
17:30 hadi 00:0017:3000:00833 Novemba 20256 Machi 202617.524
17:30 hadi 21:0017:3021:00228 Novemba 202524 Desemba 202517.521
Rows × columns
3 × 8
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 kanuni_za_saa, derived from the stored result.
ColumnTypeRangeNotes
ratiba text 3 distinct values
eat_open text 2 distinct values (16:30, 17:30)
eat_close text 3 distinct values (00:00, 21:00, 23:00)
session_count number 2 to 168 count
kikao_cha_kwanza text 3 distinct values
kikao_cha_mwisho text 3 distinct values
open_eat_hr number 16.5 to 17.5 US dollars
close_eat_hr number 21 to 24 US dollars

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
    dakika AS
    (
        SELECT
            window_start,
            toTimeZone(window_start, 'America/New_York')         AS ny,
            toDate(toTimeZone(window_start, 'America/New_York')) AS siku
        FROM global_markets.delayed_stocks_minute_aggs
        WHERE ticker = 'SPY'
          AND window_start >= toDateTime(today() - 371)
          AND window_start <  toDateTime(today() - 2)
          AND volume > 0
          AND (toHour(ny) * 60 + toMinute(ny)) >= 9 * 60 + 30
          AND (toHour(ny) * 60 + toMinute(ny)) <  16 * 60
    ),
    mipaka AS
    (
        SELECT
            siku,
            min(window_start) AS kufungua,
            max(window_start) AS kufunga,
            count()           AS dakika_zilizopimwa
        FROM dakika
        GROUP BY siku
        HAVING dakika_zilizopimwa >= 120
    ),
    eat AS
    (
        SELECT
            siku,
            toHour(toTimeZone(kufungua, 'Africa/Nairobi'))
              - toHour(toTimeZone(kufungua, 'America/New_York'))     AS saa_tofauti,
            toHour(toTimeZone(kufunga, 'America/New_York')) < 15     AS ni_kufunga_mapema,
            toUInt32(round((toHour(toTimeZone(kufungua, 'Africa/Nairobi')) * 60
                          + toMinute(toTimeZone(kufungua, 'Africa/Nairobi'))) / 30) * 30) % 1440 AS dk_kufungua,
            toUInt32(round((toHour(toTimeZone(kufunga, 'Africa/Nairobi')) * 60
                          + toMinute(toTimeZone(kufunga, 'Africa/Nairobi'))) / 30) * 30) % 1440  AS dk_kufunga
        FROM mipaka
    ),
    vipindi AS
    (
        SELECT
            count()                               AS session_count,
            arrayElement(topK(1)(dk_kufungua), 1) AS dk_kufungua_kawaida,
            arrayElement(topK(1)(dk_kufunga), 1)  AS dk_kufunga_kawaida,
            min(siku)                             AS siku_ya_kwanza,
            max(siku)                             AS siku_ya_mwisho
        FROM eat
        GROUP BY saa_tofauti, ni_kufunga_mapema
        HAVING session_count >= 2
    )
SELECT
    concat(eat_open, ' hadi ', eat_close) AS ratiba,
    concat(leftPad(toString(intDiv(dk_kufungua_kawaida, 60)), 2, '0'), ':',
           leftPad(toString(dk_kufungua_kawaida % 60), 2, '0'))  AS eat_open,
    concat(leftPad(toString(intDiv(dk_kufunga_kawaida, 60)), 2, '0'), ':',
           leftPad(toString(dk_kufunga_kawaida % 60), 2, '0'))   AS eat_close,
    session_count,
    concat(toString(toDayOfMonth(siku_ya_kwanza)), ' ',
           ['Januari','Februari','Machi','Aprili','Mei','Juni','Julai','Agosti','Septemba','Oktoba','Novemba','Desemba'][toMonth(siku_ya_kwanza)],
           ' ', toString(toYear(siku_ya_kwanza)))                AS kikao_cha_kwanza,
    concat(toString(toDayOfMonth(siku_ya_mwisho)), ' ',
           ['Januari','Februari','Machi','Aprili','Mei','Juni','Julai','Agosti','Septemba','Oktoba','Novemba','Desemba'][toMonth(siku_ya_mwisho)],
           ' ', toString(toYear(siku_ya_mwisho)))                AS kikao_cha_mwisho,
    round(dk_kufungua_kawaida / 60, 2)                           AS open_eat_hr,
    round((dk_kufunga_kawaida + if(dk_kufunga_kawaida < dk_kufungua_kawaida, 1440, 0)) / 60, 2) AS close_eat_hr
FROM vipindi
ORDER BY session_count DESC, open_eat_hr, close_eat_hr
⌘/Ctrl + Enter

Work with this data in your AI assistant

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