Unify simulation order execution and persist paper accounting
This commit is contained in:
parent
7dec0be3b4
commit
63c3856797
37 changed files with 3901 additions and 3043 deletions
|
|
@ -45,7 +45,8 @@ export async function runMigrations(container: IServiceContainer): Promise<void>
|
|||
f.endsWith('.sql') &&
|
||||
(f.startsWith('001_') ||
|
||||
f === '09-backtest-run-contract.sql' ||
|
||||
f === '10-durable-backtest-dispatch.sql')
|
||||
f === '10-durable-backtest-dispatch.sql' ||
|
||||
f === '11-simulation-execution-ledger.sql')
|
||||
) // Explicit additive migration allowlist; never replay destructive init migrations
|
||||
.sort();
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ export class BacktestServiceV2 {
|
|||
endDate: definition.endDate.toISOString(),
|
||||
initialCapital: definition.initialCapital,
|
||||
config: definition.config,
|
||||
riskLimits: definition.config.riskLimits,
|
||||
dataFrequency: definition.config.dataFrequency ?? '1d',
|
||||
commission: definition.config.commission ?? 0.001,
|
||||
slippage: definition.config.slippage ?? 0.0001,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue