Files
momentum-system/docs/TRADIER-LIVE-FLIP.md

3.1 KiB

Tradier Real-Money Flip — delta to LIVE-CUTOVER.md

LIVE-CUTOVER.md was written for Alpaca live (rejected 2026-07-27). Plan of record is now Tradier real money on the EXISTING tradier parallel stack (postgres 5434, dashboard 8768). This doc is only the delta.

The flip (3 env lines in truenas-compose.tradier.local.yaml, loop + dashboard)

TRADIER_ENV: live                      # switches base URL to api.tradier.com
TRADIER_ACCESS_TOKEN: <live token>     # from the REAL account, never the sandbox token
TRADIER_ACCOUNT_ID: <live account id>

Market data stays on Alpaca (unchanged). Rollback = set TRADIER_ENV: sandbox

  • sandbox creds, redeploy.

Before the flip — owner tasks (nobody else can do these)

  1. Open a Tradier cash account (margin needs $2k; $300 = cash), fund $300.
  2. Create an API token on the live account. Treat as secret: compose file only, never the repo, never the config_overrides table.
  3. Confirm account approvals: API access enabled on the live account (Tradier sometimes gates API on request).

Before the flip — config (admin UI :8768 or config_overrides on 5434)

Knob Value Why
TRADING_MAX_FRESH_ENTRIES_PER_DAY 1 Cash account T+1: >1 round trip/day risks good-faith violations; 3 GFVs = 90-day freeze. Raise only with equity growth or margin.
TRADING_EQUITY_FLOOR 270 Kill switch at 0.90 x $300.
TRADING_MAX_RISK_DOLLARS 1000 (keep) Inert at this equity (16% notional cap = ~$48 positions binds first); harmless.
TRADING_RISK_PER_TRADE_PCT 0.05 (keep) $15 budget; the $48 position cap means actual risk/trade lands ~$2-8.
TRADING_REGIME_GATE_ENABLED 1 The one lever that survived OOS validation (plan 011); flip-day requirement per LIVE-CUTOVER.

Before the flip — DB hygiene

The tradier DB currently holds SANDBOX trade records. Live must start clean (cutover principle: no blending). Before first live boot:

TRUNCATE events, telemetry_events;   -- on 5434; keep research tables

(Same pattern as bootstrap_live_db.sh. minute_bars/daily_bars/volume_ratios stay — that history is real market data and feeds rvol baselines.)

Day-1 verification (first hour)

  1. Dashboard badge shows tradier-LIVE (factory label), not sandbox.
  2. First fill: check the bracket legs exist at Tradier (stop visible via by-symbol order lookup) — the 2026-07-28 incident class.
  3. Naked-stop drill (memory: required pre-flip, still undone): with a 1-share position open, manually cancel its stop leg in the Tradier UI; the guard must force-exit within 2 passes. This is the drill on real plumbing with pocket-change size.
  4. Telegram alert received; python -m research.slippage --since <today> after close — real-fill slippage vs the 0.3-0.5% paper-measured spread.

Expectations at $300

Positions ~$48 (16% cap), 1-20 shares on $2-20 names. P&L per trade: single dollars. This proves execution (fills, brackets, stops, GFV discipline), not income. Sizing scales automatically as equity grows — the knobs above are the only things to revisit.