TQTradingQuery

Session behavior · MES

What share of the full daily range does MES's first 30 minutes typically account for

46.7%

mean share

n=1302026-03-05 to 2026-09-07

mean share

46.7%

median share

45.3%

std share

16.9%

min share

15.0%

max share

100.0%

Methodology

Analysis code was generated by an AI model up to 25 times, run in a sandbox against real MES 1-minute bars from 2026-03-05 to 2026-09-07, and reviewed automatically. Attempts that computed the same set of measures were grouped, and the figures shown are the median of the largest group. Agreement between attempts lowers the chance of a one-off coding slip; it does not prove the code matches the question, so the exact code is shown below.

Show the code

et = to_et(bars)
rth = rth_session(et)
rth = rth.copy()
rth['trading_date'] = trading_date(rth)

# daily full range
daily = rth.groupby('trading_date').agg(day_high=('high','max'), day_low=('low','min'))
daily['day_range'] = daily['day_high'] - daily['day_low']

# first 30 minutes window
mask30 = within_minutes_of_open(rth, 30)
first30 = rth[mask30]
f30 = first30.groupby('trading_date').agg(f30_high=('high','max'), f30_low=('low','min'))
f30['f30_range'] = f30['f30_high'] - f30['f30_low']

merged = daily.join(f30[['f30_range']], how='inner')
merged = merged[merged['day_range'] > 0]

shares = merged['f30_range'] / merged['day_range']
shares = shares.replace([np.inf, -np.inf], np.nan).dropna()

n = len(shares)
if n > 0:
    result = {
        'sample_size': int(n),
        'mean_share': float(shares.mean()),
        'median_share': float(shares.median()),
        'std_share': float(shares.std()) if n > 1 else 0.0,
        'min_share': float(shares.min()),
        'max_share': float(shares.max()),
    }
else:
    result = {
        'sample_size': 0,
        'mean_share': None,
        'median_share': None,
        'std_share': None,
        'min_share': None,
        'max_share': None,
    }
  • Generated by an AI model up to 25 times, run in a sandbox, and reviewed automatically; the figures above are the median of the largest group of attempts that computed the same measures. Agreement between attempts lowers the chance of a one-off coding slip -- it does not prove the code matches the question, so check the definition and code. A one-off calculation, not a permanent fixture.

This is historical statistical information only. It is not investment advice, and past performance does not indicate future results. Trading involves risk of loss.