Count CME holiday sessions as one combined trading day when the type opts in
Account types with the catalog's new combineCmeHolidays flag are read through a combined-day view: holiday-session P&L entries fold into the next full trading day (computed from the federal-holiday rules, so any year works), the day count matches how the firm records it (Apex: Sun/ Mon/Tue around a Monday holiday is ONE day), and on the later sessions of the stretch the earlier sessions' booked P&L carries into realized — so day targets, already-traded gates, target-hit status and the panel's day P&L all treat the stretch as a single day. Off by default; older masters that don't send the flag behave exactly as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
57846d2b5f
commit
f07721019b
+7
-2
@@ -155,8 +155,13 @@ function validatePayload(raw: unknown): FirmCatalogPayload {
|
||||
}
|
||||
if (!isStages(type.withdrawalStages)) throw new Error(`account type ${j} has bad withdrawalStages`);
|
||||
// Lenient like platform: a master from before the split toggle
|
||||
// doesn't send the field, and those account types all split.
|
||||
return { ...type, splitEnabled: type.splitEnabled !== false } as unknown as CatalogAccountType;
|
||||
// doesn't send the field, and those account types all split. Same
|
||||
// for CME holiday combining, where the old behavior was "off".
|
||||
return {
|
||||
...type,
|
||||
splitEnabled: type.splitEnabled !== false,
|
||||
combineCmeHolidays: type.combineCmeHolidays === true,
|
||||
} as unknown as CatalogAccountType;
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user