Fig. — Mean return by 15-minute slot and weekday (illustrative)

The series builds, step by step in Python, a system to search for intraday seasonal patterns in futures: from 1-minute data to a search that tests every entry combination. Some Python and pandas is enough; the backtester is written from scratch with pandas masks.

Part 1 defines intraday seasonality and its causes, builds a 6E continuous future with a calendar roll and resamples 1-minute bars to 15 minutes. Part 2 writes the IntradaySeasonalBacktester class: it enters by weekday, hour and minute, exits after N bars and returns the trade history in points. Part 3 computes SQN, VaR and CVaR, alpha, beta, maximum drawdown and the Sharpe ratio on that history. Part 4 sweeps every weekday, hour, minute and bar combination with itertools and saves the metrics to a CSV.

The result is a custom backtester and a table of metrics per parameter combination: the starting point for finding seasonal edges.