Vest: a day that lost to the bot's limit stops, even with Vest room left

The daily-loss room on Vest was min(the stage's limit, balance − Vest's
floor), which ignored the day's losses against the bot's own limit. With
the type's $1,229 under Vest's 3% ($1,500), five 50k evals that had
lost $1,111.65 today still saw $388 of room and traded again. The room
is now min(limit + the day's realized loss, balance − floor).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-10-26 18:55:54 -05:00
co-authored by Claude Opus 5.5
parent 32081f3dcf
commit 29eaf64a6b
4 changed files with 39 additions and 14 deletions
+4 -1
View File
@@ -631,7 +631,10 @@ function dailyLossGate(
if (floor === null) return { reason: DLL_BASE_PENDING };
let room: number;
if (typeof floor === 'number') {
room = floorRoom({ dailyLossLimit: dll, closedBalance: cash.amount, floor });
room = floorRoom({
dailyLossLimit: dll, closedBalance: cash.amount, floor,
realizedToday: Math.min(cash.realizedPnL, combinedRealized),
});
} else {
const dayStart: number | null | undefined = client.dayStartBalance?.(accountId);
if (dayStart === null) return { reason: DLL_BASE_PENDING };