Stocks & Trading
This section contains the documentation and system architecture for the Antigravity automated quantitative trading lab.
Antigravity Run-Book Visualizer
Below is the automated daily timeline mapping for the four current strategies, current as of 2026-07-11. SPY was retired 2026-07-08 (capital reallocated to QQQ+DIA); QQQ and DIA no longer enforce a one-active-at-a-time gate against each other (removed 2026-07-08) and trade fully independently. All four strategies now route through a shared safety layer (login lock, global kill switch, daily drawdown guard) added 2026-07-11, plus an independent 30-minute watchdog that alerts on failure without blocking trades.
graph TD
classDef strategy1 fill:#1e88e5,stroke:#0d47a1,stroke-width:2px,color:#fff;
classDef strategy2 fill:#00897b,stroke:#004d40,stroke-width:2px,color:#fff;
classDef strategy4 fill:#8e24aa,stroke:#4a148c,stroke-width:2px,color:#fff;
classDef manual fill:#f4511e,stroke:#bf360c,stroke-width:2px,color:#fff;
classDef safety fill:#c62828,stroke:#7f0000,stroke-width:2px,color:#fff;
subgraph S1 [Strategy 1: Portfolio 2 - SPMO/SMH/TQQQ]
A["6:30 AM - 1:00 PM PT
portfolio2_trader.py loops every 5m"]:::strategy1
B["Places real fractional buy/sell orders directly
Discord alert is post-execution notice"]:::strategy1
A --> B
end
subgraph S2 [Strategy 2: QQQ Weekly Options - 2 contracts]
C["5:30 AM PT
premarket_scanner.py (Gemini 2.5)
skips on real NYSE holidays"]:::strategy2
D["Discord: Daily Bias Approval
approve calls / puts / both / neutral"]:::manual
E["6:30 AM - 1:00 PM PT
trader.py loops with Daily Bias
live-quote exit pricing, trades independently of DIA"]:::strategy2
C --> D
D --> E
end
subgraph S3 [Strategy 3: DIA Weekly Options - 1 contract]
F["Same premarket_scanner.py covers DIA too"]:::strategy2
G["6:30 AM - 1:00 PM PT
trader.py loops with Daily Bias
trades independently of QQQ"]:::strategy2
F --> G
end
subgraph S4 [Strategy 4: QQQ 0DTE Options - 1 contract, EXPERIMENTAL, added 2026-07-09]
J["6:30 AM - 1:00 PM PT
trader.py loops, 'both' bias
no manual approval, same-day expiration"]:::strategy4
end
subgraph SAFE [Shared Safety Layer - shared_trading_lib, added 2026-07-11]
L["Login Lock
only one bot in MFA flow at a time"]:::safety
M["Global Kill Switch
gates every buy AND sell"]:::safety
N["Daily Drawdown Guard
-5% vs yesterday pauses new buys only"]:::safety
end
W["Watchdog (every 30 min)
silent unless broken -> Discord alert
does not block trades"]:::manual
A -.-> SAFE
E -.-> SAFE
G -.-> SAFE
J -.-> SAFE
W -.-> L
H["Dashboard (localhost:8080)
Individual Account + Roth IRA tabs"]:::manual
B --> H
E --> H
G --> H
J --> H
See Trading Bot Systems for full technical detail on each strategy, the shared safety layer, the GTE verification protocol, the dashboard, and a running log of fixed issues.