Files
momentum-system/judge/run_live.cmd
T
momentum devandClaude Opus 5.5 347031e2bb feat: judge paper trader survives a crash mid-session
On 2026-09-29 the trader's console was killed at 10:21 ET (exit 0xC000013A) and
it sat dead for the rest of the day. The scheduled task now re-fires every 5 min
from 08:10 to 15:00 local, and IgnoreNew makes that a no-op while the trader is
running. It also catches up if the machine was off at 08:10.

A relaunched trader now picks up where the dead one left off:
- positions still held at the broker are adopted, with the entry, original
  stop, fill time and high-water taken from today's journal and the backfilled
  tape, so the trail, time stop and 15:55 flat still apply. The working stop leg
  is reused; if none is working a new one is armed. A position with no known
  stop is closed rather than guessed at.
- the per-symbol order count is rebuilt from the journal, so the cap holds
  across restarts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3PXXn2tHBzdv6rYtGPz86
2026-09-29 21:21:42 -05:00

13 lines
732 B
Batchfile

@echo off
rem Paper trial of the v2 judgement model (Alpaca paper "Momentum V2"). Started by Task Scheduler at 08:10 local
rem (09:10 ET); the process exits by itself after 16:00 ET. Log: data\judge\logs\live_YYYY-MM-DD.log
rem The task re-fires every 5 min until 15:00 local (IgnoreNew): if the trader died it is relaunched, and it adopts
rem any open position and today's per-symbol order counts from the journal.
setlocal
cd /d "%~dp0.."
set PYTHONIOENCODING=utf-8
if not exist data\judge\logs mkdir data\judge\logs
for /f %%i in ('powershell -NoProfile -Command "Get-Date -Format yyyy-MM-dd"') do set RUNDATE=%%i
data\ross\.venv\Scripts\python.exe -m judge.live >> "data\judge\logs\live_%RUNDATE%.log" 2>&1
exit /b %ERRORLEVEL%