Trading Memory
How manual trades become scored, attributable, and auditable learning cases
🔴 Advanced — Trading Memory is a read-only audit surface, not a recommendation engine. Past results do not predict future performance.
Trading Memory connects a human decision to its confirmed execution, market outcome, evaluation, and any methodology or role-level lesson that follows. It is deliberately narrower than account history. Agent-executed spot activity can appear, but within perpetuals only human-initiated perps may enter the learning chain; automated and unknown-origin perps are excluded.
What the page shows
| Tab | What it contains |
|---|---|
| Activity | Eligible executions, their outcome state, the frameworks used before execution, and an explorer link when available. |
| What it learned | Methodology observations, versioned evaluation results, aggregate statistics, and reflected cases. |
| Your notes | Facts and constraints you explicitly maintain. These remain separate from automatically evaluated trade cases. |
The page is read-only. Correct preferences or constraints in chat or under Memory settings instead of editing evaluation history.
Which perps enter Trading Memory
| Origin | Trading Memory behavior |
|---|---|
| Human-confirmed agent trade | Included after its one-time preview is consumed and the decision, account, asset, and direction match. |
| Human trade from a supported external surface | Included only when the origin can be established as manual. |
| Autopilot or XStrategy | Kept in the automated execution audit domain; never becomes a human trading case. |
| Strategy Studio or workflow execution | Kept in the automated execution audit domain. |
| Unknown or conflicting origin | Quarantined and excluded from scoring, reflection, methodology statistics, and recall. |
An AI marker always wins over apparent manual evidence. If origin records are
unavailable or insufficient, Minara fails closed to unknown; it does not
guess that an execution was manual.
From decision to learning case
- A manual trade preview creates a decision-bound, single-use
preview_id. It is valid for 30 minutes by default and is tied to the tool, session, account, asset, direction, and normalized parameter hash. - Confirmation consumes that preview. Reuse, parameter changes, cross-account matches, and cross-asset matches are rejected.
- The execution and fills are attached to the exact decision. Position lifecycles reconstruct opens, adds, reductions, and closes.
- Eligible outcomes create immutable evaluation runs. Re-evaluation appends a new run rather than overwriting the old one.
- Only explicitly promoted primary runs update methodology statistics. A completed reflection may also become a role case, subject to Role Memory mode.
Autopilot has no human preview, so it cannot enter this chain accidentally.
Outcome states
- Not scored yet — the execution has not reached the minimum evaluation age, or it is waiting for the enabled backtest runner or market data.
- A market result such as
+2.40% in 24h— the deterministic outcome has been persisted. The optional reasoning judge may complete later. - Not scored — the row has no meaningful market result to evaluate, such as a transfer or another non-directional operation.
The default eligibility age and outcome horizon are 24 hours. When backtesting is enabled, overdue work runs once at gateway startup and then on the configured interval. See Environment Variables.
When the Frameworks column has data
Frameworks is execution-time attribution, not a label added by outcome
scoring. It is populated only when an eligible saved methodology was actually
retrieved or explicitly associated with the same decision before the confirmed
execution.
A dash means no attributable framework evidence was recorded. This is expected for direct tool calls, transfers, many older migrated rows, and trades where the agent reasoned without consulting a saved methodology. Scoring an outcome later does not invent attribution, so a dash will not automatically become a framework name after 24 hours.
Extensible evaluation profiles
Evaluation is not hard-coded to one formula. A versioned benchmark profile selects an evaluator and configuration for an asset, horizon, and dimension. Each run stores its full input snapshot plus factor-level raw value, normalized value, weight, contribution, data quality, and missing reason.
Built-in profiles cover directional return, directional excess return,
beta-adjusted or hedged return, and realized net PnL. Execution quality uses
closed PnL - fees - attributable funding; missing funding produces partial
data quality rather than a fabricated value. Wilson confidence is calculated
only for metrics that explicitly emit a binary outcome. New multi-factor
evaluators can be registered without a database migration.
Role Memory modes
Set ROLE_MEMORY_MODE before the gateway starts:
| Mode | Behavior |
|---|---|
off | Keeps existing cases for audit but creates, evaluates, recalls, and injects no new role cases. |
shadow | Default. Creates and evaluates eligible manual cases, but never recalls or injects them into formal decisions. |
active | Also recalls reflected manual cases for matching analysis roles and Institution Trader / PM prompts. Execution tools never receive case text. |
Invalid values warn and fall back to shadow. Changing the value requires a
restart. Static safety rules, SOUL, and user constraints always outrank a role
case.
Migration and audit
Legacy rows are conserved into exactly one destination: the unified manual decision chain, the automated execution audit domain, or origin quarantine. Legacy Wilson scores remain audit snapshots and never affect new profile-based statistics. Migration creates a checksummed pre-migration SQLite backup and an audit report; the runtime does not dual-read or dual-write the legacy schema.
Troubleshooting
- An eligible trade is older than 24 hours but still pending: verify the backtest switch is enabled, restart the gateway to trigger catch-up, and check price-provider logs. Dry-run mode intentionally does not update Activity.
- Outcome is visible but Frameworks is
—: no methodology evidence was attached at execution time. This is independent of scoring. - An Autopilot trade is missing: this is intentional; automated perps are excluded from human Trading Memory.
- A trade has uncertain origin: inspect the quarantine/audit data instead of forcing it into learning statistics.
See also Memory & Personalization, Self-Improving Agent, and Autopilot.