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:
co-authored by
Claude Opus 5.5
parent
ed56e306d1
commit
6dd2528fe2
+7
-6
@@ -14,7 +14,6 @@ import {
|
||||
combineCmeSessions, computeDayPlan, groupLegFraction, pickLegAmount, resolveEffectiveConfig, currentTradeDateCT,
|
||||
obfuscationStopDollars, takeProfitPlan, onTick, percentFee, dllRoom, dllStopDollars, dllViable, stopTicks,
|
||||
expectedSwapToWin, planLegSize, maxLossRoom, breachDistance,
|
||||
DEFAULT_TARGET_HOLD_HOURS,
|
||||
isNoTradeTime, isPastSessionClose,
|
||||
BIG_DAY_THRESHOLD, LEG_COMPLETION_EPSILON, MAX_LEGS_PER_DAY,
|
||||
FALLBACK_COMMISSION_PER_CONTRACT, MAX_COMMISSION_PER_CONTRACT, DLL_MIN_STOP,
|
||||
@@ -27,6 +26,7 @@ import type { LaneTick, TickReason } from './master-protocol';
|
||||
import { POINT_VALUES, housekeepingRoot, HOUSEKEEPING_ROOT, MAX_HOLD_HOURS, futuresContracts } from './instrument-specs';
|
||||
import { firmInstruments, drawFuturesInstrument, spreadBlock, type LegShape } from './instruments';
|
||||
import { recordEntry } from './trade-mix';
|
||||
import { sizingHoldHours } from './person-size';
|
||||
import { errorMessage, isClientReady, isOrderNotPlaced, type PlatformClient, type PlatformContract, type PickContext } from './platform-client';
|
||||
|
||||
// ── process-wide state ───────────────────────────────────────────────────────
|
||||
@@ -1329,7 +1329,7 @@ function sizeLeg(item: SizingItem, contract: LegContract, legAmount: number, tra
|
||||
leg: legAmount,
|
||||
contract,
|
||||
commissionPct: pct,
|
||||
targetHoldHours: item.firm.targetHoldHours || DEFAULT_TARGET_HOLD_HOURS,
|
||||
targetHoldHours: sizingHoldHours(item.firm, tradeDate),
|
||||
financingPctPerDay: item.firm.financingPctPerDay ?? 0,
|
||||
dailyLossLimit: cfg.dailyLossLimit ?? 0,
|
||||
dllRoom: item.dllRoom,
|
||||
@@ -1352,7 +1352,7 @@ function pickContextFor(items: SizingItem[], tradeDate: string): PickContext | u
|
||||
if (!lead) return undefined;
|
||||
const legAmount = legAmountFor(lead, tradeDate);
|
||||
return {
|
||||
targetHoldHours: lead.firm.targetHoldHours || DEFAULT_TARGET_HOLD_HOURS,
|
||||
targetHoldHours: sizingHoldHours(lead.firm, tradeDate),
|
||||
evaluate: (contract) => {
|
||||
const { sizing, cost } = sizeLeg(lead, contract, legAmount, tradeDate);
|
||||
return sizing && cost !== null ? { notional: sizing.notional, holdHours: sizing.predictedHoldHours, cost } : null;
|
||||
@@ -1366,9 +1366,10 @@ function pickContextFor(items: SizingItem[], tradeDate: string): PickContext | u
|
||||
*
|
||||
* Size: futures trade one contract per $1,000 of leg; a platform that prices
|
||||
* positions (stepNotional) sizes by notional instead — whatever makes the
|
||||
* leg's expected hold the firm's target, from the instrument's recent
|
||||
* volatility — under the account type's notional cap and the instrument's
|
||||
* margin rate (the firm's leverage).
|
||||
* leg's expected hold the firm's target as this person sizes it today
|
||||
* (sizingHoldHours), from the instrument's recent volatility — under the
|
||||
* account type's notional cap and the instrument's margin rate (the firm's
|
||||
* leverage).
|
||||
*
|
||||
* Fees: a percent-of-notional firm's fee is computed off the fill; otherwise
|
||||
* it is read off the realized-P&L change a second after it. A firm that
|
||||
|
||||
Reference in New Issue
Block a user