This page describes how Trade Control’s synthetic dataset is constructed for proof and reconciliation work.
It is intentionally technical: it documents the dataset generator as a controlled, repeatable test fixture used to validate accounting derivations (Cash Statement, Balance Sheet snapshots, and annual reconciliation views).
The generator is implemented as discrete stored procedures prefixed App.proc_DatasetSyntheticMIS_*, orchestrated by App.proc_DatasetSyntheticMIS.
App.proc_DatasetSyntheticMISEXEC_DatasetSyntheticMIS.sqlEXEC_DatasetSyntheticMIS.sql executes four scenarios designed to exercise the reconciliation across profit/loss and VAT modes:
@PriceRatio = 3.0)@PriceRatio = 3.0)@PriceRatio = 0.5)@PriceRatio = 0.5)Each scenario calls App.proc_DatasetSyntheticMIS with:
@IsCompany = 1@IsVatRegistered from the scenario@EnableOpeningBalance = 1The scenario runner then records results from Cash.vwEquityReconciliationByYear for comparison.
App.proc_DatasetSyntheticMIS runs the following steps in order.
@IsCompany:
Minimal Micro Company Accounts 2026Sole Trader Accounts 2026@IsVatRegistered is not provided, it is inferred from App.tbTemplate.IsVatRegistered.#DatasetCodesA temp table #DatasetCodes is created once per run and used by all nested procedures to share generated codes (Subjects, Projects, etc.) deterministically.
Responsibilities (high level):
App.proc_NodeDataInit.App.proc_NodeBusinessInit and App.proc_BasicSetup.@EnableOpeningBalance = 1.This step is what makes runs repeatable: every scenario begins from the same baseline.
Executed when @EnableProjects = 1:
App.proc_DatasetSyntheticMIS_ProjectInitApp.proc_DatasetSyntheticMIS_ProjectTemplatesApp.proc_DatasetSyntheticMIS_ProjectTranApp.proc_DatasetSyntheticMIS_ProjectInvoice (conditional: @EnableInvoices = 1)App.proc_DatasetSyntheticMIS_ProjectPay (conditional: @EnableProjectPayments = 1)These procedures create the trading activity that drives profit/loss and therefore the annual reconciliation.
Executed when @EnablePayables = 1:
App.proc_DatasetSyntheticMIS_PayInitApp.proc_DatasetSyntheticMIS_PayMisc (conditional: @EnableMiscPayments = 1)App.proc_DatasetSyntheticMIS_PayWages (conditional: @EnableWages = 1 and @IsCompany = 1)App.proc_DatasetSyntheticMIS_Expenses (conditional: @EnableExpenses = 1)These procedures generate operating cash movements and costs required for non-trivial Cash Statement coverage.
Executed when @IsCompany = 1 and @EnableAssets = 1:
This provides asset-state behavior for balance sheet snapshotting and capital-related flows.
Executed when @IsVatRegistered = 1 and @EnableTax = 1:
This enables VAT-on scenarios and is part of proving VAT does not break the annual bridge (penny-level rounding only).
Executed when @EnableTransfers = 1:
App.proc_DatasetSyntheticMIS_Transfers (internally uses transfer helpers)This introduces non-trade cash movements (sweeps) so bank/cash behavior is not trivial.
Executed when @IsCompany = 1 and @EnableTax = 1:
This provides corp tax behavior required to prove:
This ensures downstream reporting surfaces (views/materializations that depend on rebuild logic) are coherent for the scenario outputs and proof script.
The proof paper /technical/cash-statement-proof references:
PROOF_CashStatementReconciliation.sql, andThis synthetic dataset exists specifically to provide controlled coverage of the reconciliation under:
The dataset can then be used as a reliable foundation for tutorials and guides.