Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions blueprints/us-equities/adaptive-paper/README-mover.md

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion blueprints/us-equities/adaptive-paper/README-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ differences stop recovery. It never uses account-wide cancellation or liquidatio
All owned open orders are canceled first. Actual terminal confirmation and a
fresh snapshot must precede a residual exit. Exits use sequential SELL-only
LIMIT/DAY orders with fresh quotes and the original per-order quantity/notional
caps. Quantities retain up to nine decimal places. Cleanup client IDs advance
caps. Each exit is sized within the share cap the ledger applies to that sell at
that bid (`RiskLimits.effective_max_order_qty`): `max_order_qty` in "fixed" mode,
as before, and `min(max_order_qty, floor(max_order_notional_usd / bid), 100)` whole
shares in "notional" mode, so an appreciated position exits in chunks the ledger
admits instead of being refused (`order_size_cap_exceeded`). Quantities retain up
to nine decimal places. Cleanup client IDs advance
past prior journal IDs, including previous failed cleanup attempts. Fully unfilled
exit cancellation stops with `needs_attention`; there is no blind repricing loop.

Expand Down
51 changes: 51 additions & 0 deletions blueprints/us-equities/adaptive-paper/config-mover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"schema_version": 1,
"mode": "mover_paper",
"protocol": "mover-early-entry-v1-20260924",
"endpoint": "https://paper-api.alpaca.markets",
"feed": "sip",
"regular_session_only": false,
"extended_hours_enabled": true,
"sessions": {
"extended_hours": true,
"overnight_holds": false,
"overnight_gross_multiple": "1.0"
},
"catalyst_orders_enabled": false,
"benchmarks": ["SPY"],
"capital_usd": "10000",
"max_gross_exposure_usd": "2000",
"max_order_notional_usd": "2000",
"max_order_quantity": 100,
"max_order_qty_mode": "notional",
"max_held_symbols": 5,
"max_outstanding_orders": 20,
"max_gross_loss_usd": "1000",
"max_drawdown_usd": "1000",
"max_leverage": "1",
"max_spread_bps": "100",
"quote_max_age_seconds": 3,
"max_api_requests_per_minute": 200,
"max_submit_requests_per_minute": 180,
"duration_seconds": 3600,
"cleanup_seconds": 600,
"min_entry_close_seconds": 600,
"order_timeout_seconds": 10,
"mover": {
"rule": "08:00|G20|V1000000|any",
"session_scope": "pre_market_only",
"trial_end_et": "09:25",
"exit": "X2",
"entry": {"limit_cap_bps": "50", "timeout_seconds": 60, "window_seconds": 30},
"exit_orders": {"limit_cap_bps": "50", "timeout_seconds": 10, "max_orders_per_symbol": 20},
"flatten_reserve_seconds": 120,
"max_scan_age_seconds": 300,
"max_symbols": 5,
"max_entry_notional_usd": "200",
"appreciation_allowance": "2",
"gross_guard_fraction": "0.9",
"stream_quote_timeout_seconds": 3,
"rung_schedule": [{"from_session": 1, "to_session": 20, "rung": "1"}]
},
"notes": "Example mover paper trial (protocol mover-early-entry-v1-20260924, paper_e2e). Pre-market only: entries at trial start, hard flatten at 09:25 ET (or earlier when the ledger's 3600 s trial + 600 s cleanup sell window less the 120 s reserve ends first), exit X2 (60 minutes after the first entry fill), rung 1 for paper sessions 1-20. The rule string is a placeholder until the historical study selects the rule; the scanner's file must carry the identical string. Conservative caps: 200 USD per entry (mover.max_entry_notional_usd) and a 2000 USD ledger gross cap with a 2x appreciation allowance, so entries use at most 1000 USD and the sizing formula (equity x L / 5) is bound by the entry cap. The ledger per-order cap bounds exit sells too, so it is 2000 USD, ten times the entry cap (mover.EXIT_HEADROOM_FACTOR, checked at load) and the most RiskLimits allows under this gross cap: a leg sells in one order through a tenfold rise, in whole-share chunks beyond it; the 1000 USD gross-loss and drawdown caps are the engine maximum (capital / 10) and are lifetime budgets of this mover ledger. Quote age 3 s and the 3 s stream timeout are the engine's own limits; the 2026-09-23 after-hours trial stopped on that stream timeout, so a longer stream_quote_timeout_seconds is a separate recorded decision. Spread cap 100 bps is the engine maximum for entries."
}
Loading
Loading