Tradeify247: each person sizes a little apart from everyone else

Every machine sized a like account in a like state to the same position as
every other person's, so two people's positions could match to the unit.
Each person now draws a size factor in [0.85, 1.15] per trade date, seeded
by the master's uuid for them; all of one person's accounts share it.

The factor moves the hold a DXtrade leg is sized for (hold / factor², since
size goes as 1/√hold), so the instrument pick, the dashboard's next leg and
the Firms page's reach test all see the hold the size was made for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-10-19 20:00:33 -05:00
co-authored by Claude Opus 5.5
parent ed56e306d1
commit 6dd2528fe2
8 changed files with 126 additions and 15 deletions
+3 -2
View File
@@ -32,7 +32,8 @@
*/
import axios from './http-client';
import { currentTradeDateCT, FIRM_RESET_UTC_HOUR, DEFAULT_TARGET_HOLD_HOURS, rankForTarget } from './trading-logic';
import { currentTradeDateCT, FIRM_RESET_UTC_HOUR, rankForTarget } from './trading-logic';
import { sizingHoldHours } from './person-size';
import {
saveDailyPnL, loadDailyPnL, loadAccountMeta, saveAccountMeta, loadFundTransactions, saveFundTransactions,
saveEndedCycleStart,
@@ -1222,7 +1223,7 @@ export class DXTradeClient implements PlatformClient {
const ref = this.referenceAccount();
if (!ref) return null;
const firm = getCachedFirm(this.cfg.firmId);
const targetHold = firm?.targetHoldHours || DEFAULT_TARGET_HOLD_HOURS;
const targetHold = sizingHoldHours(firm);
const symbols = [...new Set(candidates.map((c) => c.symbol))];
const [insts, dets, quotes, vols] = await Promise.all([
this.instruments(symbols),