665 lines
31 KiB
Markdown
665 lines
31 KiB
Markdown
|
|
# EVIDENCE PROTOCOL v0.1 — EXP-003B / GATE B
|
||
|
|
|
||
|
|
**CENTAUR QUANT ARCHITECTURE — EXP-003B** · Governance / Evidence Specification
|
||
|
|
· Version: 0.1 (DRAFT — AWAITING HUMAN RATIFICATION)
|
||
|
|
· Created: 2026-08-15 · Status: REQUIRED REPOSITORY ARTIFACT per ratified rule AE+8
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 0. Document Identity and Status
|
||
|
|
|
||
|
|
- This document is a **governance / evidence specification only**.
|
||
|
|
- It is the repository artifact required by ratified rule **AE+8** of
|
||
|
|
`00_CONCEPT\EXP003B_RESULTS\ANALYSIS\gate_b_human_ratification_decision_COMPLETED.md`
|
||
|
|
("Evidence Protocol v0.1 is required as a repository artifact before execution").
|
||
|
|
- It is a **DRAFT for human ratification**. It does not become authoritative
|
||
|
|
until explicitly ratified by the human principal.
|
||
|
|
- This document **grants NO authorization** — specifically, it grants no
|
||
|
|
instrumentation authorization, no source-modification authorization, no
|
||
|
|
compilation authorization, no tester-execution authorization, and no Gate B
|
||
|
|
execution authorization (see §22).
|
||
|
|
- It reproduces **only already-ratified Gate B rules** from the authoritative
|
||
|
|
human-ratification record and its verified supporting audits. It introduces
|
||
|
|
**no new statistical rule, no new threshold, no new sample requirement, no
|
||
|
|
new OOS rule, no new stop condition, and no new execution permission**.
|
||
|
|
- Where ratified governance does not specify a value, this document marks the
|
||
|
|
item: **`UNSPECIFIED — HUMAN DECISION REQUIRED`**. No assumption is invented.
|
||
|
|
|
||
|
|
### 0.1 Authority chain (precedence)
|
||
|
|
|
||
|
|
1. `gate_b_human_ratification_decision_COMPLETED.md` — authoritative human-ratification record (highest precedence for Gate B governance).
|
||
|
|
2. `post_ratification_governance_lock_audit.md` — verified governance lock (2026-08-15 14:41 +07).
|
||
|
|
3. `gate_b_pre_execution_instrumentation_readiness_audit.md` — 33-field evidence schema and stop/abort evidence mapping (2026-08-15 14:46 +07; verified consistent with the ratification record).
|
||
|
|
4. `gate_b_protocol_addendum_audit.md` — operational specification the human ratified (2026-08-15 14:24 +07).
|
||
|
|
5. `EXP-003_SCANNER_ACTIVATION.md` (ratified at commit `f81d85d`) — experiment objective, threshold 55.0, Phase-4 intent, diagnostic mode.
|
||
|
|
6. Step 1–8 artifacts (`gate_a_evaluation.md`, `observation_unit_definition.md`, `oracle_reconciliation.md`, `C0_quality_report.md`, etc.) — verified evidence chain.
|
||
|
|
|
||
|
|
Any future change to this protocol requires a **new explicit human governance decision**.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 1. Purpose and Scope
|
||
|
|
|
||
|
|
### 1.1 Purpose
|
||
|
|
|
||
|
|
Define, as a governance specification, the complete evidence handling required
|
||
|
|
to make a future Gate B evaluation auditable and reproducible: the mandatory
|
||
|
|
evidence lifecycle, every mandatory evidence field, field provenance,
|
||
|
|
referential integrity, timestamp/event ordering, identity rules, missing- and
|
||
|
|
invalid-evidence treatment, R-multiple reconstruction, partial-exit handling,
|
||
|
|
cost representation, zone clustering, dataset-snapshot identity, binary/config
|
||
|
|
provenance, manifest/freeze procedure, evidence preservation, and the mapping
|
||
|
|
of the 18 ratified stop/abort conditions to the evidence required to detect
|
||
|
|
them.
|
||
|
|
|
||
|
|
### 1.2 Scope
|
||
|
|
|
||
|
|
- **In scope:** evidence specification for the execution stage of EXP-003B /
|
||
|
|
Gate B (the stage that produces order attempts, positions, management
|
||
|
|
events, exits, and round-trips). C0 scanner-stage evidence handling
|
||
|
|
(Steps 1–8) is already executed and frozen; this protocol adopts its
|
||
|
|
PRESERVED → HASHED → FROZEN pattern as precedent.
|
||
|
|
- **Out of scope:** statistical inference rules (ratified separately; see
|
||
|
|
§2 reference), parameter optimization, OOS-barrier definition (ratified
|
||
|
|
Option A; formal barrier deferred to Phase 5/6), live trading, and any
|
||
|
|
source modification. Instrumentation implementation is explicitly
|
||
|
|
**NOT authorized** by this document.
|
||
|
|
|
||
|
|
### 1.3 Current binding state (unchanged, verified)
|
||
|
|
|
||
|
|
```
|
||
|
|
GATE A = PASS
|
||
|
|
B1 = RETIRED — ORIGINAL CONTINGENCY INVALIDATED
|
||
|
|
GATE B GOVERNANCE = RATIFIED
|
||
|
|
GATE B GOVERNANCE LOCK = VERIFIED / COMPLETE
|
||
|
|
AE+6 POWER CALCULATION = DEFERRED
|
||
|
|
INSTRUMENTATION = NOT AUTHORIZED
|
||
|
|
SOURCE MODIFICATION = NOT AUTHORIZED
|
||
|
|
COMPILATION = NOT AUTHORIZED
|
||
|
|
GATE B EXECUTION = NOT AUTHORIZED
|
||
|
|
RAW EVIDENCE = FROZEN
|
||
|
|
BASELINE = IMMUTABLE
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Ratified Gate B Governance Reference (reproduced verbatim in substance)
|
||
|
|
|
||
|
|
The following are already-ratified rules. This section is a reference only;
|
||
|
|
nothing here is new.
|
||
|
|
|
||
|
|
| Rule | Ratified value | Source |
|
||
|
|
|---|---|---|
|
||
|
|
| Primary endpoint | **net R per completed round-trip** | record A |
|
||
|
|
| Primary comparison | **E[net R \| fused ≥ 55] vs E[net R \| fused < 55]**; threshold 55.0 fixed | record B; C (N/A — existing) |
|
||
|
|
| Effect-size floor | **Cohen's d ≥ 0.20** (a priori) | record D |
|
||
|
|
| CI method | **cluster bootstrap, 10,000 resamples, structural-zone clusters** | record E |
|
||
|
|
| Significance | α = 0.05, **secondary** to effect size | record F |
|
||
|
|
| Minimum sample | **≥ 50 completed round-trips per fusion class AND ≥ 50 distinct structural zones** | record G |
|
||
|
|
| Interim analysis | **None** | record H |
|
||
|
|
| Stopping | **One terminal decision** after evidence freeze | record I |
|
||
|
|
| Insufficient sample | **NOT EVALUABLE** (never converted to PASS/FAIL) | record J |
|
||
|
|
| Signal unit | **structural zone `(direction, zone_low, zone_high)`** | record K (N/A — Step 7 existing) |
|
||
|
|
| Outcome unit | **completed round-trip** | record L |
|
||
|
|
| Dependence | **round-trips clustered by structural zone; never treated as independent** | record M |
|
||
|
|
| Same-zone re-entry | allowed only when each round-trip complete and traceable | record N |
|
||
|
|
| First-entry-only | **rejected** | record O |
|
||
|
|
| Lifecycle | CANDIDATE → DECISION → ORDER ATTEMPT → ACCEPT/REJECT → POSITION OPEN → MANAGEMENT → POSITION CLOSE → ROUND-TRIP COMPLETE | record P |
|
||
|
|
| Identifiers | zone_id, attempt_id, round_trip_id (= position ticket) | record Q |
|
||
|
|
| Missing evidence | absence = governance event; never guessed/reconstructed | record R |
|
||
|
|
| OOS | **OPTION A**: in-window confirmatory; no new split; formal barrier deferred to Phase 5/6; no frozen dataset/barrier modified | record S, §6 |
|
||
|
|
| Dataset identity | pre-run identity mandatory | record T |
|
||
|
|
| Dataset comparison | compare vs C0 (11,639 bars / 696,947 ticks); discrepancy reported | record U |
|
||
|
|
| Execution mode | **diagnostic MT5 Strategy Tester only**; no live/VPS/broker transmission | record V |
|
||
|
|
| Intervention | prohibited except defined emergency abort | record W |
|
||
|
|
| R-multiple | R fixed to initial risk at entry; partial exits handled consistently | record X |
|
||
|
|
| Monetary P&L | secondary until independent tick-value reconciliation | record Y |
|
||
|
|
| Transaction costs | preserved separately, normalized to initial-risk units | record Z |
|
||
|
|
| Risk scaling | R is lot-size invariant; no reweighting to compensate for risk scaling | record AA |
|
||
|
|
| Binary provenance | binary identity + SHA-256 captured before execution | record AB |
|
||
|
|
| Manifest/freeze | evidence manifested and frozen before analysis | record AC |
|
||
|
|
| Stop/abort | 18-condition matrix authoritative (reproduced in §18) | record AD |
|
||
|
|
| Reproducibility | target; all stated prerequisites satisfied before execution | record AE |
|
||
|
|
| Censoring | end-of-window open positions censored, counted, explicitly reported | record AE+1 |
|
||
|
|
| Invalid outcomes | excluded only with documented reason and preserved evidence | record AE+2 |
|
||
|
|
| Zero-R | R=0 retained; zero-risk cases invalid | record AE+3 |
|
||
|
|
| No reweighting | R observations never reweighted for risk scaling | record AE+4 |
|
||
|
|
| Arm isolation | future arms isolated; no pooling without new protocol + ratification | record AE+5 |
|
||
|
|
| Power calculation | **DEFERRED** until empirical variance, expected effect size, zone ICC known (non-blocking; prerequisite only for future power claim) | record AE+6 |
|
||
|
|
| Evidence schema | ratified **as a governance requirement**; instrumentation separately unauthorized | record AE+7 |
|
||
|
|
| Protocol artifact | Evidence Protocol v0.1 required as repository artifact before execution | record AE+8 |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Evidence Lifecycle (ratified P — operational definition)
|
||
|
|
|
||
|
|
Every terminal state must be reconstructable from structured records. The
|
||
|
|
mandatory lifecycle is:
|
||
|
|
|
||
|
|
```
|
||
|
|
CANDIDATE → DECISION → ORDER ATTEMPT → ACCEPT/REJECT
|
||
|
|
→ POSITION OPEN → MANAGEMENT → POSITION CLOSE
|
||
|
|
→ ROUND-TRIP COMPLETE
|
||
|
|
```
|
||
|
|
|
||
|
|
| Stage | Definition (evidence-level) |
|
||
|
|
|---|---|
|
||
|
|
| CANDIDATE | Scanner produces a structural zone in proximity; candidate row recorded (CSV pattern, C0 precedent). |
|
||
|
|
| DECISION | Fusion classifies candidate PASS/SKIP vs fixed threshold 55.0; decision row recorded. |
|
||
|
|
| ORDER ATTEMPT | An order request is submitted for a PASS candidate; attempt record created. |
|
||
|
|
| ACCEPT/REJECT | Broker/tester response recorded (retcode, description, deal ref) — accept or reject. |
|
||
|
|
| POSITION OPEN | Accepted order becomes a position; position-open record with ticket and actual fill. |
|
||
|
|
| MANAGEMENT | Every SL/TP modification (break-even, trailing) recorded. |
|
||
|
|
| POSITION CLOSE | Exit event recorded (timestamp, price, reason, deal id). |
|
||
|
|
| ROUND-TRIP COMPLETE | Round-trip summary record: initial risk R0, gross R, cost_R, net R, monetary P&L (if reconcilable), reconciliation status. |
|
||
|
|
|
||
|
|
- A record must exist for **every** stage. **Absence of a mandatory record is
|
||
|
|
a governance event** (ratified R) and triggers the stop/abort mapping (§18).
|
||
|
|
- A candidate that is SKIPped does not proceed beyond DECISION; its records
|
||
|
|
remain part of the evidence (C0 precedent: PASS and SKIP both logged).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Mandatory Evidence Fields (operational schema)
|
||
|
|
|
||
|
|
The mandatory field set below operationalizes ratified lifecycle rule P,
|
||
|
|
identifier rule Q, and evidence-schema rule AE+7. The field set is the
|
||
|
|
33-field schema (A–AG) from the verified
|
||
|
|
`gate_b_pre_execution_instrumentation_readiness_audit.md` §5, which was
|
||
|
|
audited as consistent with the ratification record. **No field is considered
|
||
|
|
implemented merely because equivalent information appears in Print logs**
|
||
|
|
(see §14).
|
||
|
|
|
||
|
|
Legend — Provenance: `CSV` = exists in C0 candidate CSV pattern · `INSTR` =
|
||
|
|
requires new structured instrumentation record (NOT AUTHORIZED by this
|
||
|
|
document) · `DERIVED` = computed from recorded fields · `REPORT` = from
|
||
|
|
preserved tester report · `ABSENT` = currently absent from evidence.
|
||
|
|
Identity: `zone_id` · `attempt_id` · `round_trip_id`.
|
||
|
|
|
||
|
|
| ID | Stage | Mandatory field | Provenance | Type | Identity |
|
||
|
|
|---|---|---|---|---|---|
|
||
|
|
| A | CANDIDATE | Candidate identity | CSV | string | zone_id |
|
||
|
|
| B | CANDIDATE | Structural zone (direction, zone_low, zone_high) | CSV | string | zone_id |
|
||
|
|
| C | CANDIDATE | Timestamp | CSV | datetime | — |
|
||
|
|
| D | CANDIDATE | Direction (LONG/SHORT) | CSV | enum | — |
|
||
|
|
| E | DECISION | Fused score | CSV | double | — |
|
||
|
|
| F | DECISION | Threshold (55.0) | CSV | double | — |
|
||
|
|
| G | DECISION | Decision (PASS/SKIP) + reason | CSV | enum+string | — |
|
||
|
|
| H | ORDER ATTEMPT | Attempt ID | INSTR | ulong | attempt_id |
|
||
|
|
| I | ORDER ATTEMPT | Attempt timestamp | INSTR | datetime | — |
|
||
|
|
| J | ORDER ATTEMPT | Order type | INSTR | enum | — |
|
||
|
|
| K | ORDER ATTEMPT | Requested volume | INSTR | double | — |
|
||
|
|
| L | ORDER ATTEMPT | Requested entry | CSV | double | — |
|
||
|
|
| M | ORDER ATTEMPT | Initial SL | CSV (+ comment) | double | — |
|
||
|
|
| N | ORDER ATTEMPT | Initial TP | CSV | double | — |
|
||
|
|
| O | ACCEPT/REJECT | Broker/server response description | INSTR | string | — |
|
||
|
|
| P | ACCEPT/REJECT | Retcode | INSTR | uint | — |
|
||
|
|
| Q | POSITION OPEN | Position ticket | INSTR | ulong | round_trip_id |
|
||
|
|
| R | POSITION OPEN | Deal ticket(s) | INSTR | ulong[] | — |
|
||
|
|
| S | POSITION OPEN | Actual fill price | INSTR | double | — |
|
||
|
|
| T | POSITION OPEN | Actual volume | INSTR | double | — |
|
||
|
|
| U | POSITION OPEN | Position-open timestamp | INSTR | datetime | — |
|
||
|
|
| V | MANAGEMENT | Management events | INSTR (batched) | rows | ticket |
|
||
|
|
| W | MANAGEMENT | SL/TP modifications | INSTR (batched) | rows | ticket |
|
||
|
|
| X | POSITION CLOSE | Exit timestamp | INSTR | datetime | — |
|
||
|
|
| Y | POSITION CLOSE | Exit price | INSTR | double | — |
|
||
|
|
| Z | POSITION CLOSE | Exit reason | INSTR | enum | — |
|
||
|
|
| AA | POSITION CLOSE | Closure/deal identity | INSTR | ulong | — |
|
||
|
|
| AB | ROUND-TRIP | Round-trip identity | INSTR | ulong | round_trip_id |
|
||
|
|
| AC | ROUND-TRIP | Initial risk R0 (entry − SL) | DERIVED | double | — |
|
||
|
|
| AD | ROUND-TRIP | Realized R (gross) | DERIVED | double | — |
|
||
|
|
| AE | ROUND-TRIP | Net R (gross R − cost_R) | DERIVED | double | — |
|
||
|
|
| AF | ROUND-TRIP | Monetary P&L | REPORT | double | — |
|
||
|
|
| AG | ROUND-TRIP | Reconciliation status | DERIVED | enum | round_trip_id |
|
||
|
|
|
||
|
|
- Fields marked `INSTR` cannot be produced by the current source state
|
||
|
|
(verified: order-attempt, position, management, exit, round-trip records are
|
||
|
|
Print-only or absent). Producing them requires separately authorized
|
||
|
|
instrumentation. **This document does not authorize that.**
|
||
|
|
- Fields V/W (management, SL/TP modifications) fire in `OnTick` and therefore
|
||
|
|
require **mandatory batching** (see §5.3 and §21) to avoid per-tick I/O
|
||
|
|
explosion.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 5. Field Provenance Rules
|
||
|
|
|
||
|
|
1. **CSV fields (A–G, L, M, N):** already produced by the C0 candidate record
|
||
|
|
pattern (`AppendSetupCSV`); values must be byte-traceable to the frozen C0
|
||
|
|
schema semantics (31 columns; `ob_time_age_bars` = seconds despite name).
|
||
|
|
2. **INSTR fields (H–K, O–U, V, W, X–AB):** must be written by dedicated
|
||
|
|
structured evidence records (attempt log, position-open log, management log
|
||
|
|
[batched], exit log, round-trip summary). **Print-only equivalents do not
|
||
|
|
satisfy the schema** (§14).
|
||
|
|
3. **DERIVED fields (AC–AE, AG):** computed only from recorded structured
|
||
|
|
fields per §10 (R-multiple) and §11 (costs); derivations must be
|
||
|
|
reproducible from the recorded evidence alone.
|
||
|
|
4. **REPORT field (AF):** monetary P&L from the preserved tester report only;
|
||
|
|
secondary metric (ratified Y). Never reconstructed from prices without
|
||
|
|
independent tick-value reconciliation.
|
||
|
|
5. Every field must be **deterministic** given the recorded inputs and the
|
||
|
|
ratified rules — no field may require discretionary judgment.
|
||
|
|
|
||
|
|
### 5.1 Referential integrity (ratified Q)
|
||
|
|
|
||
|
|
- `zone_id` = `(direction, zone_low, zone_high)` — foreign key from every
|
||
|
|
execution-stage record back to the CANDIDATE/DECISION CSV rows.
|
||
|
|
- `decision_id` = `zone_id + decision timestamp` (per verified addendum §7).
|
||
|
|
- `attempt_id` = sequential per `(zone_id, decision_id)`; a rejected/failed
|
||
|
|
attempt gets its own attempt row with retcode and **no** round-trip.
|
||
|
|
- `round_trip_id` = `position_ticket`; every deal under the round-trip
|
||
|
|
(`deal_ids[]`) attaches to it.
|
||
|
|
- Referential chains must be fully resolvable:
|
||
|
|
`zone_id → decision_id → attempt_id → position_ticket → deal_ids[]`.
|
||
|
|
|
||
|
|
### 5.2 Timestamp / event ordering requirements
|
||
|
|
|
||
|
|
- Event timestamps recorded in tester simulated time (C0 convention:
|
||
|
|
`YYYY.MM.DD HH:MM:SS`, 1-second granularity).
|
||
|
|
- Event order must conform to the §3 lifecycle for every round-trip:
|
||
|
|
candidate ≤ decision ≤ attempt ≤ accept/reject ≤ open ≤ close (≤ window end).
|
||
|
|
- Where events share the same simulated timestamp (C0 observed same-second
|
||
|
|
re-emissions), ordering is established by the **referential identity chain**
|
||
|
|
(attempt sequence, ticket/deal linkage), never by guessing.
|
||
|
|
- Wall-clock time may be recorded additionally for operational auditing but
|
||
|
|
must never replace simulated-time ordering.
|
||
|
|
|
||
|
|
### 5.3 Batching of management events (V/W)
|
||
|
|
|
||
|
|
- Management-event records V/W must be **batched** (mandatory requirement to
|
||
|
|
control per-tick I/O; see instrumentation readiness audit §5/§6 and §21).
|
||
|
|
- Exact batch interval/count parameters:
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`**.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 6. Identity Rules (ratified Q — operational)
|
||
|
|
|
||
|
|
| Identifier | Definition | Created at | Notes |
|
||
|
|
|---|---|---|---|
|
||
|
|
| zone_id | `(direction, zone_low, zone_high)` | CANDIDATE | exists in CSV; Step-7 signal unit |
|
||
|
|
| decision_id | `zone_id + decision timestamp` | DECISION | one per PASS/SKIP evaluation (verified addendum §7) |
|
||
|
|
| attempt_id | sequential per `(zone_id, decision_id)` | ORDER ATTEMPT | rejected attempts have attempt_id, no round_trip_id |
|
||
|
|
| round_trip_id | position ticket | POSITION OPEN | parent identity for all deals of the round-trip |
|
||
|
|
|
||
|
|
- Same-zone re-entry produces **distinct** position tickets → distinct
|
||
|
|
round_trip_ids (ratified N: permitted when each round-trip is complete and
|
||
|
|
traceable).
|
||
|
|
- A round-trip is traceable iff its full §3 lifecycle chain resolves via the
|
||
|
|
identifiers above.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 7. Missing Evidence Treatment (ratified R)
|
||
|
|
|
||
|
|
1. **Absence of any mandatory record/field is a governance event.**
|
||
|
|
2. Missing evidence is **never** filled by:
|
||
|
|
- Print/log lines, tester summaries, later position state, timestamps,
|
||
|
|
P&L values, assumptions, or synthetic events.
|
||
|
|
3. Every missing-evidence occurrence must be:
|
||
|
|
- recorded (which field, which stage, which round-trip/attempt),
|
||
|
|
- preserved (partial evidence retained as-is),
|
||
|
|
- mapped to the stop/abort action in §18 (e.g., missing mandatory event →
|
||
|
|
ABORT; missing exit / open at end → CENSOR+REPORT; missing initial SL →
|
||
|
|
INVALID OUTCOME / CONTINUE).
|
||
|
|
4. No reconstruction, no imputation, no "normalization" of missing evidence.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 8. Invalid Outcome Treatment (ratified AE+2, AE+3, X)
|
||
|
|
|
||
|
|
- **Invalid outcomes** (e.g., missing initial SL/entry/exit, or failed
|
||
|
|
reconciliation) are **excluded from the primary endpoint** only with:
|
||
|
|
- a documented reason, and
|
||
|
|
- the preserved underlying evidence.
|
||
|
|
- **Zero-risk cases** (SL-distance = 0 or entry = exit) are **invalid**
|
||
|
|
(ratified AE+3).
|
||
|
|
- **R = 0 outcomes are retained** as valid observations when risk0 is valid
|
||
|
|
(ratified AE+3).
|
||
|
|
- Exclusions and their reasons must be reported in the analysis manifest;
|
||
|
|
they must never be silently dropped.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 9. Censored Outcomes (ratified AE+1)
|
||
|
|
|
||
|
|
- Positions still open at window end are **censored**, **counted**, and
|
||
|
|
**explicitly reported** — never silently treated as completed round-trips.
|
||
|
|
- Censored positions do not enter the primary endpoint (completed round-trips).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 10. R-Multiple Reconstruction (ratified X, AA; AE+3)
|
||
|
|
|
||
|
|
Definition (operational form of ratified rule X, per verified addendum §11):
|
||
|
|
|
||
|
|
```
|
||
|
|
LONG : R = (exit_price − entry_price) / risk0
|
||
|
|
SHORT: R = (entry_price − exit_price) / risk0
|
||
|
|
risk0 = |entry_price − initial_SL| (price units, fixed at entry)
|
||
|
|
```
|
||
|
|
|
||
|
|
Rules:
|
||
|
|
- `entry_price` = actual fill price at position open (field S).
|
||
|
|
- `initial_SL` = zone.sl (source of truth; also persisted in comment
|
||
|
|
`CEN:<score>:<sl>`); source for round-trip R.
|
||
|
|
- **Break-even and trailing moves do not redefine risk0** (R = realized /
|
||
|
|
initial risk by definition).
|
||
|
|
- `exit_price` = volume-weighted mean exit price across partial-exit deals
|
||
|
|
(see §10.1).
|
||
|
|
- Missing initial SL → invalid outcome (§8).
|
||
|
|
- Zero-risk → invalid (§8).
|
||
|
|
- R is **lot-size invariant** (both numerator and denominator scale with
|
||
|
|
volume) → anti-veto risk scaling does not bias E[net R] per class; **no
|
||
|
|
reweighting** is permitted to compensate for risk scaling (ratified AA,
|
||
|
|
AE+4).
|
||
|
|
- Position reversal: NOT APPLICABLE (no reversal logic in source).
|
||
|
|
|
||
|
|
### 10.1 Partial exits
|
||
|
|
|
||
|
|
- Multiple closure deals under the same `round_trip_id` are aggregated by
|
||
|
|
**volume-weighted mean exit price**:
|
||
|
|
`exit_price = Σ(deal_volume_i × deal_price_i) / Σ(deal_volume_i)`.
|
||
|
|
- Each partial-exit deal must be individually recorded (fields R, X–AA) so the
|
||
|
|
weighted mean is auditable.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 11. Cost Representation (ratified Z)
|
||
|
|
|
||
|
|
- **Transaction costs are preserved separately** and **normalized to
|
||
|
|
initial-risk units** (ratified Z).
|
||
|
|
- Operational form (per verified addendum §4):
|
||
|
|
|
||
|
|
```
|
||
|
|
cost_R = (spread_points + commission_points + slippage_points + swap_points)
|
||
|
|
/ initial_risk_points
|
||
|
|
net R = gross R − cost_R
|
||
|
|
```
|
||
|
|
|
||
|
|
- Each cost term is defined against the broker/tester symbol specification at
|
||
|
|
execution time.
|
||
|
|
- Gross R and each cost component (spread, commission, slippage, swap) must be
|
||
|
|
analyzed and reported separately (robustness), with net R as the primary
|
||
|
|
endpoint.
|
||
|
|
- Actual numeric cost values (spread/commission/slippage/swap):
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`** (run-configuration, to be
|
||
|
|
ratified at execution planning; protocol guidance: conservative/pessimistic
|
||
|
|
values, per EXP-003 protocol §9).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 12. Zone Clustering / Dependence (ratified E, M)
|
||
|
|
|
||
|
|
- **Cluster = structural zone** `(direction, zone_low, zone_high)`.
|
||
|
|
- Multiple round-trips from the same zone are **correlated** and must **never
|
||
|
|
be treated as independent observations** (ratified M).
|
||
|
|
- Primary CI: cluster bootstrap, **10,000 resamples**, clusters = structural
|
||
|
|
zones (ratified E).
|
||
|
|
- Zone-level mean net R (equal weight per zone) is reported as a secondary
|
||
|
|
robustness view (per verified addendum §6).
|
||
|
|
- Decision assignment: each round-trip inherits the fused score recorded for
|
||
|
|
the candidate that produced its successful order attempt (entry-time score).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 13. Dataset Snapshot Requirements (ratified T, U)
|
||
|
|
|
||
|
|
A pre-run dataset identity record must be captured **before** run start and
|
||
|
|
frozen with the run. Required fields (operational form of ratified T/U, per
|
||
|
|
verified addendum §9):
|
||
|
|
|
||
|
|
| Field | Value basis |
|
||
|
|
|---|---|
|
||
|
|
| Dataset path (terminal data folder) | actual, at run start |
|
||
|
|
| Symbol / timeframe | XAUUSD / M15 |
|
||
|
|
| Model / tick mode | Model=1 (1-minute OHLC) |
|
||
|
|
| Date range | 2026-02-01 → 2026-07-31 |
|
||
|
|
| Bar count / tick count | compare vs C0: **11,639 bars / 696,947 ticks**; discrepancy → ABORT (U) |
|
||
|
|
| Source identity | HFMarketsGlobal-Demo terminal |
|
||
|
|
| Snapshot timestamp | recorded |
|
||
|
|
| Cryptographic hash of preserved dataset-identity artifacts | SHA-256 |
|
||
|
|
| MT5 build | 6090 |
|
||
|
|
| Tester agent identity | recorded |
|
||
|
|
| Broker/server identity | recorded |
|
||
|
|
|
||
|
|
- Freeze point: identity captured BEFORE run start; no history
|
||
|
|
download/sync during the run.
|
||
|
|
- Exact artifact set to be hashed for the dataset snapshot:
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`** (verified addendum proposed
|
||
|
|
history-quality log + journal excerpt).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 14. Binary / Configuration Provenance (ratified AB)
|
||
|
|
|
||
|
|
Before any execution, the exact authorized binary and configuration identity
|
||
|
|
must be captured:
|
||
|
|
|
||
|
|
| Item | Requirement |
|
||
|
|
|---|---|
|
||
|
|
| EX5 path | recorded |
|
||
|
|
| EX5 file size | recorded |
|
||
|
|
| EX5 SHA-256 | **recorded (mandatory; C0 precedent never hashed — gap to close)** |
|
||
|
|
| Build timestamp | recorded |
|
||
|
|
| Source commit | expected `bf19250` + ratified addendum |
|
||
|
|
| `.mqproj` state | **must be resolved or formally recorded** (current unstaged modification is a documented pre-existing drift; disposition is a human decision) |
|
||
|
|
| `.set` SHA-256 | recorded (C0: `732D2230…`) |
|
||
|
|
| Compiler/build environment | recorded if available |
|
||
|
|
|
||
|
|
- Binary mismatch vs provenance → **ABORT** (ratified §18).
|
||
|
|
- No binary exists today that satisfies this requirement for Gate B; no
|
||
|
|
compile is authorized by this document.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 15. Manifest and Freeze Requirements (ratified AC)
|
||
|
|
|
||
|
|
Adopting the C0 chain pattern (PRESERVED → HASHED → FROZEN) as precedent:
|
||
|
|
|
||
|
|
1. **PRESERVED:** raw execution evidence copied to
|
||
|
|
`EXP003B_RESULTS\GATE_B\RAW\` — run config, binary, dataset identity,
|
||
|
|
logs, tester report, deal/position history, telemetry, CSV, attempt log,
|
||
|
|
statistical specification.
|
||
|
|
2. **HASHED:** SHA-256 manifest of all preserved files.
|
||
|
|
3. **FROZEN:** manifest status set to FROZEN **before analysis**; after
|
||
|
|
freeze, no modification is permitted; only addition of derived artifacts
|
||
|
|
with hash-stamped provenance.
|
||
|
|
|
||
|
|
Manifest must identify: original evidence · derived evidence · execution logs
|
||
|
|
· tester report · deal history · position history · telemetry · configuration
|
||
|
|
· binary · dataset identity · statistical specification · governance metadata.
|
||
|
|
|
||
|
|
- Exact file naming/layout under `GATE_B\RAW\`:
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`** (folder location per verified
|
||
|
|
addendum §14; file names to be specified at execution planning).
|
||
|
|
- Tester report format to preserve (HTML/XML):
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`**.
|
||
|
|
- Deal/position history export method:
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`**.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 16. Evidence Preservation
|
||
|
|
|
||
|
|
- Preservation must occur **before** any analysis and **before** any freeze
|
||
|
|
transition.
|
||
|
|
- On abort (§18), immediate RAW copy + hashing per the manifest procedure.
|
||
|
|
- Full logs are gitignored and may remain at original locations, but the
|
||
|
|
preserved evidence package must include the mandatory structured records and
|
||
|
|
tester report (C0 precedent: full logs not preserved; excerpts identified as
|
||
|
|
excerpts).
|
||
|
|
- No evidence may be deleted, overwritten, normalized, or "cleaned".
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 17. Print-Only Evidence Is Not Evidence (ratified P, R, AE+7)
|
||
|
|
|
||
|
|
- **Print-only records cannot substitute for mandatory structured evidence.**
|
||
|
|
Order-attempt, position-open, management, exit, and round-trip events are
|
||
|
|
currently Print-only or absent in the source (verified in
|
||
|
|
`gate_b_pre_execution_instrumentation_readiness_audit.md` §4/§5). They do
|
||
|
|
**not** satisfy the schema.
|
||
|
|
- Structured records are mandatory for every §3 lifecycle stage; absence is a
|
||
|
|
governance event (§7) — never filled from Print lines, tester summaries,
|
||
|
|
later position state, timestamps, P&L, or assumptions.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 18. Stop / Abort Matrix — Evidence Required to Detect Each Condition
|
||
|
|
|
||
|
|
All 18 conditions are ratified (record §12, AD) with their actions, evidence
|
||
|
|
preservation, and human escalation. This table adds the **evidence required to
|
||
|
|
detect** each condition (per verified instrumentation readiness audit §13) —
|
||
|
|
no condition, action, or rule is added or changed.
|
||
|
|
|
||
|
|
| # | Condition | Ratified action | Evidence required to detect |
|
||
|
|
|---|---|---|---|
|
||
|
|
| 1 | Evidence corruption / hash mismatch | ABORT | manifest recheck; SHA-256 of all preserved files |
|
||
|
|
| 2 | Missing mandatory event | ABORT | full schema conformance check (§4/§3) |
|
||
|
|
| 3 | Dataset mismatch | ABORT | dataset snapshot vs C0 (bars/ticks) at run start |
|
||
|
|
| 4 | Binary mismatch | ABORT | binary SHA-256/size vs provenance (§14) |
|
||
|
|
| 5 | Unauthorized parameter change | ABORT | frozen `.set` vs run config |
|
||
|
|
| 6 | OOS violation | ABORT | OOS statement (Option A) audit |
|
||
|
|
| 7 | Unexpected live/broker connectivity | ABORT | runtime terminal-state monitor |
|
||
|
|
| 8 | Order-rejection cascade | CONTINUE + FLAG / rate-limit | attempt log (retcode surge) |
|
||
|
|
| 9 | Duplicate position / stacking | ABORT | position records (ticket uniqueness) |
|
||
|
|
| 10 | Impossible position state | ABORT | deal history vs position records |
|
||
|
|
| 11 | Missing exit / open at end | CENSOR + REPORT / CONTINUE | position/exit records; end-of-window census |
|
||
|
|
| 12 | Unreconcilable deal history | ABORT | deal history vs tester report P&L |
|
||
|
|
| 13 | Missing initial SL | INVALID OUTCOME / CONTINUE | CSV zone.sl + comment (candidate side) |
|
||
|
|
| 14 | Invalid R calculation | ABORT | numeric audit of entry/SL/exit fields (S, M, Y) |
|
||
|
|
| 15 | Uncontrolled repeated attempts | CONTINUE + FLAG / rate-limit | attempt log cadence |
|
||
|
|
| 16 | Telemetry failure | CONTINUE + FLAG | telemetry heartbeat/tick census |
|
||
|
|
| 17 | Tester interruption | ABORT | tester journal |
|
||
|
|
| 18 | Partial evidence loss | ABORT | evidence inventory audit |
|
||
|
|
|
||
|
|
- Nine conditions (2, 7, 8, 9, 10, 11, 12, 14, 15) are **not implementable
|
||
|
|
with current evidence**; they become detectable only after separately
|
||
|
|
authorized instrumentation. This protocol does not authorize that.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 19. Diagnostic-Only Execution Boundary (ratified V, W)
|
||
|
|
|
||
|
|
- Execution, when eventually authorized, is limited to **diagnostic MT5
|
||
|
|
Strategy Tester execution only**: no live account, no VPS/live terminal,
|
||
|
|
no broker order transmission, no real financial risk.
|
||
|
|
- `InpEnableTrading=true` is permissible only within the isolated tester
|
||
|
|
context under a separate, explicit execution authorization.
|
||
|
|
- Manual intervention is prohibited except under the defined emergency-abort
|
||
|
|
procedure (kill tester + preserve all evidence).
|
||
|
|
- Emergency-abort operational detail beyond "kill tester, preserve evidence":
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`**.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 20. Reproducibility (ratified AE)
|
||
|
|
|
||
|
|
- Governance reproducibility: satisfied by the ratified rules (all
|
||
|
|
deterministic and fully specified).
|
||
|
|
- Execution reproducibility: achieved only after the record §15 preconditions
|
||
|
|
are completed and audited (protocol artifact ratification; separate
|
||
|
|
instrumentation authorization; evidence-field implementation and
|
||
|
|
verification; binary/config/dataset freeze + hash; dataset snapshot + C0
|
||
|
|
comparison; binary/`.mqproj` drift resolution; tester-only isolation
|
||
|
|
verification; separate execution authorization review).
|
||
|
|
- This document is precondition #1 only; it does not satisfy the others.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 21. Ratified Requirement: B-Class Timing-Risk Acceptance and Batching
|
||
|
|
|
||
|
|
- The proposed evidence instrumentation is classified **B — observation with
|
||
|
|
timing risk** (per-event file/telemetry I/O) and requires explicit
|
||
|
|
governance acceptance (verified instrumentation readiness audit §6).
|
||
|
|
- **Management-event batching is mandatory** for fields V/W (§5.3).
|
||
|
|
- Acceptance of the B-class classification and batching parameters:
|
||
|
|
**`UNSPECIFIED — HUMAN DECISION REQUIRED`** (a separate human decision; not
|
||
|
|
granted by this document).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 22. Explicit Non-Authorization
|
||
|
|
|
||
|
|
This document **grants NO authorization**. In particular, it does NOT
|
||
|
|
authorize:
|
||
|
|
|
||
|
|
- source modification (.mq5/.mqh);
|
||
|
|
- `.mqproj` modification or disposition;
|
||
|
|
- instrumentation implementation (attempt/position/management/exit/round-trip
|
||
|
|
logging);
|
||
|
|
- telemetry extension;
|
||
|
|
- compilation;
|
||
|
|
- tester execution;
|
||
|
|
- Gate B execution;
|
||
|
|
- parameter optimization or sweep;
|
||
|
|
- dataset/OOS modification;
|
||
|
|
- oracle rerun;
|
||
|
|
- live/VPS/broker execution;
|
||
|
|
- Git commit or push.
|
||
|
|
|
||
|
|
Ratification of this protocol (AE+8) does not constitute instrumentation
|
||
|
|
authorization (AE+7 separation). Creation of this artifact is not
|
||
|
|
authorization to implement anything.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 23. UNSPECIFIED — HUMAN DECISION REQUIRED (complete list)
|
||
|
|
|
||
|
|
| Item | Context |
|
||
|
|
|---|---|
|
||
|
|
| Management-event batching interval/count (V/W) | §5.3, §21 |
|
||
|
|
| Rate-limit values for order-rejection cascade / repeated attempts | §18 conditions 8, 15 |
|
||
|
|
| Actual spread/commission/slippage/swap values for cost model | §11 |
|
||
|
|
| Dataset snapshot hash artifact set | §13 |
|
||
|
|
| `GATE_B\RAW\` file naming/layout | §15 |
|
||
|
|
| Tester report format to preserve (HTML/XML) | §15 |
|
||
|
|
| Deal/position history export method | §15 |
|
||
|
|
| Emergency-abort operational procedure detail | §19 |
|
||
|
|
| B-class timing-risk acceptance (explicit human decision) | §21 |
|
||
|
|
| `.mqproj` disposition (accept / revert metadata / new ratified config) | §14 |
|
||
|
|
| AE+6 power calculation (future, when assumptions known) | §2 (record AE+6) |
|
||
|
|
|
||
|
|
No item on this list is resolved by inference.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 24. Consistency Statement
|
||
|
|
|
||
|
|
This protocol was drafted by reproducing ratified rules from
|
||
|
|
`gate_b_human_ratification_decision_COMPLETED.md` and its verified supporting
|
||
|
|
audits (`post_ratification_governance_lock_audit.md`,
|
||
|
|
`gate_b_pre_execution_instrumentation_readiness_audit.md`,
|
||
|
|
`gate_b_protocol_addendum_audit.md`, Step 1–8 artifacts, EXP-003 protocol).
|
||
|
|
No ratified rule was weakened, extended, overridden, or re-interpreted. No new
|
||
|
|
statistical rule, threshold, sample requirement, OOS rule, stop condition, or
|
||
|
|
execution permission was introduced. Open items are explicitly marked
|
||
|
|
UNSPECIFIED — HUMAN DECISION REQUIRED.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 25. Final Status Block
|
||
|
|
|
||
|
|
```
|
||
|
|
EVIDENCE PROTOCOL v0.1 = CREATED (DRAFT — AWAITING HUMAN RATIFICATION)
|
||
|
|
|
||
|
|
GOVERNANCE RATIFICATION = READY FOR REVIEW (human disposition of AE+8 required)
|
||
|
|
|
||
|
|
INSTRUMENTATION = NOT AUTHORIZED
|
||
|
|
SOURCE MODIFICATION = NOT AUTHORIZED
|
||
|
|
COMPILATION = NOT AUTHORIZED
|
||
|
|
GATE B EXECUTION = NOT AUTHORIZED
|
||
|
|
|
||
|
|
RAW EVIDENCE = FROZEN
|
||
|
|
DATASET = IMMUTABLE
|
||
|
|
OOS = IMMUTABLE
|
||
|
|
|
||
|
|
NO TESTER EXECUTION
|
||
|
|
NO OPTIMIZATION
|
||
|
|
NO ORACLE RERUN
|
||
|
|
NO GIT COMMIT
|
||
|
|
NO GIT PUSH
|
||
|
|
|
||
|
|
STOP.
|
||
|
|
```
|