A quantitative intraday trading system that trades SPY options using a three-layer architecture: regime classification, gamma exposure context, and live fair value gap detection.
Uses Hidden Markov Models to classify the current daily market regime along two axes: volatility (HIGH_VOL / LOW_VOL) and direction (BULLISH / BEARISH). The combined regime (e.g. HIGH_VOL_BEARISH) determines which trade directions are enabled and their take-profit targets.
Pre-market gamma exposure analysis. Fetches the full SPY options chain, computes dealer gamma exposure per strike, and identifies key structural levels.
wall, major, minor, noiseStreams 1-minute SPY bars during regular trading hours. Detects Fair Value Gaps, gates entries behind the Market Opening Process and cycle confirmation, then executes ATM options orders.
The first 15 minutes of trading establish the MOP range (high/low). All entries are gated behind price breaking above MOP high (for CALL) or below MOP low (for PUT).
After MOP completes, the bot requires 6 consecutive bars above MOP high (CALL cycle) or below MOP low (PUT cycle) before any entries can be taken. VWAP acts as a dynamic threshold when price extends beyond the MOP range.
A Fair Value Gap requires 3 consecutive bars where a gap forms between bar 0's high and bar 2's low (bullish) or bar 0's low and bar 2's high (bearish). Gaps are filtered by:
The regime determines which directions are enabled and the take-profit target. Key rule: never trade PUT when direction is BULLISH. A TP of 0% means hold to EOD.