diff --git a/deploy/docker/truenas-compose.yml b/deploy/docker/truenas-compose.yml index b713e8b..45ae832 100644 --- a/deploy/docker/truenas-compose.yml +++ b/deploy/docker/truenas-compose.yml @@ -191,6 +191,11 @@ services: if [ "$$(date +%H:%M)" = "20:00" ] && [ "$$(date +%u)" -le 5 ]; then python -m research.premarket_eval || echo "[scheduler] eval FAILED" python -m research.eod_reconcile || echo "[scheduler] reconcile FAILED" + # Flywheel: grow the whole-market dataset first, then fit the tuner on + # it. 20:00 ET is after close, so replay of "today" is complete data — + # NOT look-ahead (replay is a labeling job, not a live gate). + python eod_replay.py || echo "[scheduler] eod_replay FAILED" + python nightly_tune.py || echo "[scheduler] nightly_tune FAILED" sleep 120 fi sleep 20 diff --git a/docker-compose.yml b/docker-compose.yml index e3a8cf5..56a02fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -133,6 +133,11 @@ services: echo "[scheduler] premarket_eval $$(date)" python -m research.premarket_eval || echo "[scheduler] eval FAILED" python -m research.eod_reconcile || echo "[scheduler] reconcile FAILED" + # Flywheel: grow the whole-market dataset first, then fit the tuner on + # it. 20:00 ET is after close, so replay of "today" is complete data — + # NOT look-ahead (replay is a labeling job, not a live gate). + python eod_replay.py || echo "[scheduler] eod_replay FAILED" + python nightly_tune.py || echo "[scheduler] nightly_tune FAILED" sleep 120 fi sleep 20 diff --git a/eod_replay.sh b/eod_replay.sh deleted file mode 100644 index 4bb8901..0000000 --- a/eod_replay.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# End-of-day whole-market replay: what today's logic would have done + grow the -# stored dataset for the tuner/verification. Schedule right after the close, -# before nightly_tune (which then tunes on the freshly-grown data). -# crontab -e -> 5 16 * * 1-5 /mnt/c/code/momentum/eod_replay.sh -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -VENV_PY="/home/philip/.venvs/momentum/bin/python" -cd "$ROOT" || exit 1 -mkdir -p "$ROOT/data" -echo "=== eod_replay $(date) ===" >> "$ROOT/data/eod_replay.log" -PYTHONPATH="$ROOT" "$VENV_PY" eod_replay.py >> "$ROOT/data/eod_replay.log" 2>&1