Files
quant-trading/deploy/systemd/quant-trading-ibkr-live.service
Gahow Wang fd44842570 live: IBKR order layer for trend_rider_v10 (guarded MOC orders via IB Gateway)
ibkr_trader.py computes the strategy's target for the close the way trader.py's
morning phase does, sizes whole-share orders on min(NAV, $10.5k) less a 1%
cash buffer against the account's real positions, and sends MOC orders,
sells before buys. Guards: the login must manage IBKR_ACCOUNT; a live account
needs --live and data/ibkr_live/ARMED; the account may hold only the
strategy's universe; MOC whole-share orders only; one submission per session.
After the close it records executions and commissions, scores each order
against the primary exchange's closing cross (SIP condition 6) and compares
NAV with the simulated account, with a preregistered verdict on the first
20 orders.

A what-if run on the paper Gateway (no orders) accepted GLD/SHY MOC orders
at $1.00 commission and rejected TQQQ/UPRO: the account lacks the Complex or
Leveraged ETP permission. The live service is defined but not enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:17:11 -07:00

19 lines
583 B
Desktop File

[Unit]
Description=trend_rider_v10 in the IBKR live account (MOC orders via IB Gateway)
After=network-online.target
# Not enabled by default. Install only after the live IB Gateway is logged in,
# IBKR_ACCOUNT is set in .env, the account may trade leveraged ETFs, and
# data/ibkr_live/ARMED exists (see ibkr_trader.py).
[Service]
Type=simple
WorkingDirectory=/home/gahow/projects/quant-trading
ExecStart=/home/gahow/projects/quant-trading/deploy/start-ibkr-live.sh
Restart=always
SuccessExitStatus=143
RestartSec=30
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=default.target