80 lines
2 KiB
Markdown
80 lines
2 KiB
Markdown
|
|
# ICHIGRID PREPROCESSING CONTRACT — 2026-05-27
|
||
|
|
|
||
|
|
## Verdict
|
||
|
|
|
||
|
|
STATUS = CONTRACT_DRAFT
|
||
|
|
MERGE_TO_ICHIGRID = FORBIDDEN
|
||
|
|
LOT047 = HOLD
|
||
|
|
PRODUCTION = NO
|
||
|
|
|
||
|
|
## Purpose
|
||
|
|
|
||
|
|
This document defines preprocessing rules for a future passive ONNX bridge in IchiGridEA MT5.
|
||
|
|
|
||
|
|
It does not authorize implementation.
|
||
|
|
|
||
|
|
## General rules
|
||
|
|
|
||
|
|
1. Every feature must be normalized deterministically.
|
||
|
|
2. Every feature must handle missing data.
|
||
|
|
3. Every feature must be Strategy Tester compatible.
|
||
|
|
4. Every feature must avoid look-ahead bias.
|
||
|
|
5. Every feature must be computed before inference.
|
||
|
|
6. ONNX inference must produce passive score or intent only.
|
||
|
|
7. No preprocessing stage may execute trades.
|
||
|
|
|
||
|
|
## Normalization rules
|
||
|
|
|
||
|
|
| FeatureGroup | Rule | OutputRange |
|
||
|
|
|---|---|---|
|
||
|
|
| Signed signal | clamp(value / scale, -1, 1) | [-1,1] |
|
||
|
|
| Risk or cost | clamp(value / max_expected, 0, 1) | [0,1] |
|
||
|
|
| Score | clamp(score, -1, 1) | [-1,1] |
|
||
|
|
| Probability | clamp(probability, 0, 1) | [0,1] |
|
||
|
|
|
||
|
|
## Missing data policy
|
||
|
|
|
||
|
|
If a feature cannot be computed:
|
||
|
|
|
||
|
|
- set feature value to 0.0 for signed neutral features;
|
||
|
|
- set feature value to 1.0 for risk-protection features when missing data increases risk;
|
||
|
|
- set missing flag in passive audit output;
|
||
|
|
- block ONNX inference if mandatory features are missing.
|
||
|
|
|
||
|
|
## No look-ahead policy
|
||
|
|
|
||
|
|
Forbidden:
|
||
|
|
- using future bar data;
|
||
|
|
- using current incomplete candle where closed candle is required;
|
||
|
|
- using Strategy Tester unavailable live-only external data;
|
||
|
|
- using manually injected future labels.
|
||
|
|
|
||
|
|
## Output interpretation
|
||
|
|
|
||
|
|
Future ONNX output may only produce:
|
||
|
|
|
||
|
|
- passive long bias;
|
||
|
|
- passive short bias;
|
||
|
|
- neutral bias;
|
||
|
|
- risk-off bias;
|
||
|
|
- confidence score.
|
||
|
|
|
||
|
|
It must not produce:
|
||
|
|
|
||
|
|
- trade execution;
|
||
|
|
- lot size execution;
|
||
|
|
- order modification;
|
||
|
|
- position close;
|
||
|
|
- grid operation.
|
||
|
|
|
||
|
|
## Required next review
|
||
|
|
|
||
|
|
Before implementation:
|
||
|
|
|
||
|
|
1. Confirm source module for every feature.
|
||
|
|
2. Confirm normalization scale for every feature.
|
||
|
|
3. Confirm timeframe source.
|
||
|
|
4. Confirm closed-bar policy.
|
||
|
|
5. Confirm missing-data behavior.
|
||
|
|
6. Confirm tester compatibility.
|
||
|
|
7. Confirm passive output mapping.
|