A $10k book in whole shares holds SNDK at 17.8% for a 10% target, so the live record mixes the strategy with rounding and fee noise (2026-09-25..10-12: overnight_recovery_top10 -9.0% live vs -7.65% at its own weights). Each daily_log entry now stores the target held from that close and ideal_return, the previous target's return to this close with fractional shares, no fees, no resize band and no idle cash. compare prints Ideal and Gap (live minus ideal) over the recorded days. The recorded returns compound to the frictionless ledger (new contract test); an in-memory rerun of 10-09/10-12 on live states reproduces the recorded equity to the cent. systemd: SuccessExitStatus=143 on the monitor and overnight-paper units, so a stop or restart no longer logs 'Failed' and the journal shows only crashes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
519 B
Desktop File
18 lines
519 B
Desktop File
[Unit]
|
|
Description=Overnight-only momentum book on Alpaca paper (MOC buy, MOO sell)
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/home/gahow/projects/quant-trading
|
|
ExecStart=/home/gahow/projects/quant-trading/deploy/start-overnight-paper.sh
|
|
Restart=always
|
|
# SIGTERM from a stop/restart ends the Python process with 143; count it as a
|
|
# clean stop so 'Failed' in the journal means a real crash.
|
|
SuccessExitStatus=143
|
|
RestartSec=30
|
|
Environment=PYTHONUNBUFFERED=1
|
|
|
|
[Install]
|
|
WantedBy=default.target
|