Vest: payout projections and the completion catch-up restart same-day stages each day

projectPerfectPath and endedCycleCompletion counted every withdrawal ever
made, so a Vest funded account that had claimed on any earlier day was
projected at stage 2's $3,000 forever (labelled stage 3, 4, ...), and a
day's stage-1 cycle that the auto-claim ended before the reporter saw it
was judged against $3,000 and never reported. The projection now takes
the stage inputs: a type whose stages reset each day trades today on
today's payouts and every projected day from the base stage. The catch-up
judges a same-day type's ended cycle on its day's base stage; the stage it
reports stays the payout's number among the account's withdrawals, which
the master clears the entry by. Other types project exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-10-27 14:15:07 -05:00
co-authored by Claude Opus 5.5
parent 4add379c68
commit e33e890a83
5 changed files with 99 additions and 15 deletions
+3
View File
@@ -38,6 +38,9 @@ export interface AccountConfig {
/** Hard daily loss limit in dollars (0/absent = none): every leg carries a
* stop that keeps the firm's day inside it, less a reserve and fees. */
dailyLossLimit?: number;
/** The stage is picked by the payouts since the firm's last daily reset,
* and every new day starts back at the base stage (Vest). */
stagesSameDay?: boolean;
/** The firm trades every calendar day, weekends and CME holidays included. */
tradesEveryDay?: boolean;
}